HiKey(LeMaker version):HiKey User LEDs
The 96Boards specifications requires six LEDs to be implemented on the board. The specification defines the LED colors and mechanical locations on the board. There are two activity status LEDs and four User LEDs on the HiKey board. The user LEDs can be programmed by the SoC directly.
Two activity LEDs:
- The WiFi activity LED is a Yellow type surface mount 0603 LED. The WIFI LED on the HiKey is located beside the BT LED, this LED reflects the status of the Wi-Fi device.
- The BT activity LED is a Blue Type surface mount 0603 LED. The BT LED on the HiKey board is located next to the USB OTG connector; this LED reflects the status of the Bluetooth device.
- The four user LEDs are surface mount Green Type 0603 LED.
Each board led has a directory in /sys/class/leds. By default the LEDs use the following triggers:
|wifi_active||phy0tx (WiFi Tx)|
|bt_active||hci0tx (Bluetooth Tx)|
|user_led2||mmc0 (disk access, eMMC)|
|user_led3||mmc1 (disk access, microSD card)|
|user_led4||CPU core 0 active(not used)|
Control user LED
To change a user LED status, you can do the following with root user permission:
echo heartbeat > /sys/class/leds/<led_dir>/trigger #make a LED flash using heartbeat trigger cat /sys/class/leds/<led_dir>/trigger #show the currently defined trigger echo none > /sys/class/leds/<led_dir>/trigger #remove triggers echo 1 > /sys/class/leds/<led_dir>/brightness #turn LED on echo 0 > /sys/class/leds/<led_dir>/brightness #turn LED off
where <led_dir> means the user LED definitions in the first column of the above table; Trigger types are defined in the second column of the above table.