Aria Ti am335x GPIO control

From Ariaboard Wiki
Revision as of 00:16, 16 April 2015 by C2h2 (talk | contribs) (Created page with " ==Control GPIO via Shell== ===init=== # mount -t debugfs none /sys/kernel/debug # echo 7 > /sys/kernel/debug/omap_mux/mcasp0_ahclkx # echo 117 > /sys/class/gpio/export #...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Control GPIO via Shell

init

# mount -t debugfs none /sys/kernel/debug
# echo 7 > /sys/kernel/debug/omap_mux/mcasp0_ahclkx
# echo 117 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio117/direction

on and off

# echo 1 > /sys/class/gpio/gpio117/value #on
# echo 0 > /sys/class/gpio/gpio117/value #off

LED IO test

# while f=1 ;do echo 1 > /sys/class/gpio/gpio117/value ; sleep 1 ;echo 0 > /sys/class/gpio/gpio117/value ;sleep 1 ;done