On 22/11/13 12:09, dinesh naga wrote:
> Hello ,
>
> #include <stdio.h>
> #include <linux/gpio.h>
> int main()
> {
> const int is17Valid = !!gpio_is_valid(17);
> if (is17Valid)
> {
> printf("17 is valid!");
> }
> else
> {
> printf("17 is not valid!");
> }
>
> return 0;
> }
>
> i am trying to compile this program and getting this error
>
> gpio.h No such file or directory
>
> tried this in beaglebone black as well as with cross compiler getting
> same error
>
> pls help me how to resolve this probelm.
>
You are trying to use kernel functions in userspace. If you wish to
manipulate GPIO's in C I would recommend taking a look at the libsoc
library.
https://github.com/jackmitch/libsoc
--
Jack Mitchell ([email protected])
Embedded Systems Engineer
Cambridgeshire, UK
http://www.embed.me.uk
--
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.