Just getting started with the BeagleBone and trying to do a simple GPIO example without using the user space methods. Perhaps I am missing something obvious but when I compile the following on the beaglebone:
#include <stdio.h>
#include <linux/gpio.h>
int main()
{
int err = 0;
err = gpio_request(113, "testGPIO");
printf("Hello C world!\n");
return 0;
}
I get this:
xuser@beaglebone:~/testCprog$ gcc -o gpiotest hello.c
hello.c:2:24: fatal error: linux/gpio.h: No such file or directory
compilation terminated.
I realize that the program is incomplete. I am just calling a function described in the gpio.txt file from the linux documentation but, in order to do that, I need to know where the correct include files are.
Is there something that I am missing? Where is the file located?
Sorry for the newbiness of my question...