|
|
|
Re: gpiolib on at91 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Joe wrote: > Hi all! > > From what i've read on the ML, Ryan Mallon ported the gpiolib to AT91 > platform (many thanks), but could maybe point me someone to an > example/appropriate documentation on how to implement the use of the > gpiolib into the board support file? > Grepping and google failed me unfortunately. > The hardware is nothing fancy, just 4 dip-switches intended to set some > configuration options, and therefore i think the cleanest approach would > be to be able to see "1" or "0" in somewhere sysfs/gpio. > Are there any hints maybe? > Echo the number of the gpio pin to /sys/class/gpio/export, and then a directory should appear under /sys/class/gpio. Pins default to input, so you should be able to cat /sys/class/gpio/gpioNNN/value to see the state of the pin. b.g. -- Bill Gatliff bgat@xxxxxxxxxxxxxxx ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [Linux Arm] [Fedora ARM] [Gcc Help] [Git] [DCCP] [IETF Announce] [Security] [PDAs] [Linux] [Linux Book List] [Linux MIPS] [Yosemite Campsites] [Photos]
![]() |
|