From: Matthew B. <ma...@aw...> - 2009-08-27 07:51:45
|
Hi all I'm trying to track down the cleanest way of manipulating a GPIO signal on my gumstix board. I understand the IN/OUT and AF1, GPIO settings as I can get things working in shell-script land using `echo "GPIO OUT SET" > /proc/gpio/GPIO81` and that sort of thing. but in C, I presume its a bit cludgy to say something resembling - system("echo... /proc/gpio/, etc, etc"); I have found an example here http://docwiki.gumstix.org/index.php/Sample_code/C/gpregs which seems to be giving a nice wrapper around some functions. I am not willing to try it first though, as I've read about the kernel space versus user space limitations. I probably can't break anything and I'll look silly for being so cautious, but does anyone know if this is the way to work directly with hte GPIO lines in C, or am I barking up the wrong tree? thanks for any help. Best regards Matt Bowles Embedded Systems Engineer aWma Pty Ltd Water Control Solutions Design - Manufacture - Install ------------------------------------------------------------------------- Phone 0427 680 641 Web www.awma.au.com <http://www.awma.au.com/> Email ma...@aw... |