|
Hi all, this is my first post. I'm very sorry if this question has been answered already, but I've looked all over for the last few weeks with no luck.
I need to wiggle and read GPIO pins on my AT91SAM9260. I'm working with the EK, but will move to a custom board soon. So far I have a root fs built with Buildroot, a resulting uClibc toolchain and a 2.6.30 kernel built using that toolchain. Using SAM-BA, I've flashed AT91Bootstrap, U-Boot and environment variables, my kernel and my fs; I started with the pre-built ones provided here, but finally got new ones to build.
I've read that I can access PIO pins from /sys/class/gpio using the export file. However, when I try to write to it, I get an error message in dmesg. I've also heard that /dev/gpio can be used, but have had no luck in creating that node. Moreover, I've heard of memory mapping the PIO registers but can't find any example code or guidance towards creating my own.
Has anybody ran into this and conquered it? It seems that with the GPIO kernel driver alive it shouldn't be too hard to use GPIO, but this has been eluding me for some time.
Thanks!
|