by ~fgiff » Tue Dec 06, 2011 10:41 am
As with non-android Linux, you can manipulate GPIOs from userspace using sysfs, though you almost certainly will need root privileges to do so.
To toggle USR_LED for example, you can use the following commands from the serial console:
echo 142 > /sys/class/gpio/export # Export GPIO142 (USR_LED on schematic) to userspace
echo out > /sys/class/gpio/gpio142 # Set GPIO142 as an output
echo 1 > /sys/class/gpio/gpio142/value # Set GPIO142 ON (turn on USR_LED)
echo 0 > /sys/class/gpio/gpio142/value # Set GPIO142 OFF (turn off USR_LED)