gpiolib.c is a simple library to manage the gpio via sysfs in C.
#define GPIO_IN 1 #define GPIO_OUT 0 gpioexport(80); gpiosetdir(80,GPIO_OUT); for (;;) { gpiosetbits(80); gpioclearbits(80); }
#define GPIO_IN 1 #define GPIO_OUT 0 gpioexport(80); for (;;) { printf("%d\n",gpiogetbits(84)); }
The gpiolib.c library is available on Github.