DART-SD410 Android Using user LED
From Variscite Wiki
Using user LED
User LED1 (D6) connected to GPIO21 of the CPU. The LED1 is defined in the apq8016-var-sd410.dtsi file under gpio-leds section.
general1 { gpios = <&msm_gpio 21 0>; label = "led1"; linux,default-trigger = "none"; default-state = "off"; retain-state-suspended; };
You can access the LED device via serial console by:
$ su # cd /sys/class/leds/led1 # echo 1 > brightness Writing any value other then 0 will turn the led on # echo 0 > brightness The led will turn off
You can view available triggers by typing:
# cat trigger The output will be: [none] boot-indication usb-online mmc0 mmc1 battery-charging-or-full battery-charging battery-full battery-charging-blink-full-solid wlan-indication-led
Set the trigger to mmc0 device by typing:
# echo mmc0 > trigger
Test it by reading mmc0 device:
# dd if=/dev/block/mmcblk0 of=/dev/null bs=128 count=1000000