Difference between revisions of "LED"
From ArmadeusWiki
(New page: == The linux LED driver class == On recent kernel, linux have a led driver. This led can be driven from /sys/class/leds/ directory. For APF28Dev, the led is configurable under the direc...) |
|||
Line 22: | Line 22: | ||
<pre class="apf"> | <pre class="apf"> | ||
# echo "nand-disk" > /sys/class/leds/apfdev:green:user/trigger | # echo "nand-disk" > /sys/class/leds/apfdev:green:user/trigger | ||
+ | # cat /sys/class/leds/apfdev:green:user/trigger | ||
+ | none [nand-disk] mmc0 timer heartbeat backlight gpio default-on | ||
</pre> | </pre> | ||
With this "nand-disk" option selected, the led will blink each time nand access occur (try with ''sync'' command to see it blinking). | With this "nand-disk" option selected, the led will blink each time nand access occur (try with ''sync'' command to see it blinking). |
Revision as of 08:35, 10 July 2012
The linux LED driver class
On recent kernel, linux have a led driver. This led can be driven from /sys/class/leds/ directory.
For APF28Dev, the led is configurable under the directory :
# cd /sys/class/leds/apfdev:green:user
Blinking
The blinking style can be selected with trigger file. By defaut on APF28Dev, Heartbeat is selected :
# cat /sys/class/leds/apfdev:green:user/trigger none nand-disk mmc0 timer [heartbeat] backlight gpio default-on
Blinking style can be changed with echo command :
# echo "nand-disk" > /sys/class/leds/apfdev:green:user/trigger # cat /sys/class/leds/apfdev:green:user/trigger none [nand-disk] mmc0 timer heartbeat backlight gpio default-on
With this "nand-disk" option selected, the led will blink each time nand access occur (try with sync command to see it blinking).