I've been reading about the linux GPIO functions and tried to make a small example using the function gpio_is_valid, but the compile fails because it can't find linux/gpio.h.
#include <iostream>
#include <linux/gpio.h>
int main()
{
const bool is17Valid = !!gpio_is_valid(17);
if (is17Valid)
{
std::cout << "17 is valid!" << std::endl;
}
else
{
std::cout << "17 is *not* valid!" << std::endl;
}
return 0;
}
Is linux/gpio.h available on the Raspberry Pi? If not, are none of the functions described in the linux documentation available?
I'm using the original Debian "Squeeze" image.