On Tue, Dec 7, 2010 at 10:37 AM, Mathias Kriebel
> Hello again,
> I've used successfully used ' read(fileno(fs), &value, 1) ' to block my C
> program until an interruption line is high.
> But I have one more question: Can I use the gpio-event driver to write on a
> Or will I have to use something like ' system("echo 1 >
> /sys/class/gpio/gpio146/value") '
> I think writing this way would be slower.
Or you can just open /sys/class/gpio/gpio146/value once in your program:
fd = open( "/sys/class/gpio/gpio146/value", O_RDWR );
and do something like:
write( fd, "1", 1 );
when you want to set it.
Or you can use the gpio driver that I wrote over here:
which reflects the kernel gpiolib API into user-space.
Shuswap, BC, Canada