Hi Team,
I am working with colibri vf50 with angstrom running on it. I want to access the GPIO pins through C language program.So is there any C library available for this or any other way to implement this.
Thanks
Amit Kumar
Hi Team,
I am working with colibri vf50 with angstrom running on it. I want to access the GPIO pins through C language program.So is there any C library available for this or any other way to implement this.
Thanks
Amit Kumar
Accessing GPIOs in Linux user space is via GPIO sysfs files, one can access the GPIO sysfs files with normal file operations. As an example have a look at this or this. Have a look at this article and kernel documentation for more information.
There are C libraries which wrap the GPIO sysfs access into functions, e.g. libsoc.
Where can I find the file libsoc_gpio.h from this example? This file comes with the embedded linux?
One can install libsoc as mentioned in this readme file here.
For quick testing I would suggest to try this method as libsoc is linked statically.
or
Add the libsoc package to image and build the custom image and SDK which will have libsoc libs and includes. Have a look at this article for more information related to Open Embedded aka Yocto build setup and look at this article for SDK related information.
Thanks! I’ll try it!