[armadillo ~]# cat /sys/class/leds/[LED]/brightness
0
Figure 5.44. Displaying the State of an LED
5.4.2. Using Triggers
A trigger to turn an LED on and off can be set by writing a value to the trigger file under the LED class directory. Valid
values to write to the trigger file are shown below.
Table 5.8. trigger Types
Configuration
Description
none
No trigger is set.
mmc0
Act as the SD Interface (CON4) access lamp.
mmc2
Act as the eMMC access lamp.
timer
Blink on and off at certain intervals. After setting this trigger, delay_on and delay_off files appear under the LED class directory
which can be used to set the on and off times in millisecond increments.
heartbeat
Blink on and off like a heart beat.
default-on
Used mainly from the Linux kernel. The LED will turn on.
When the following command is run, the LED will repeatedly turn on for two seconds and off for one second.
[armadillo ~]# echo timer > /sys/class/leds/[LED]/trigger
[armadillo ~]# echo 2000 > /sys/class/leds/[LED]/delay_on
[armadillo ~]# echo 1000 > /sys/class/leds/[LED]/delay_off
Figure 5.45. Specifying timer for the LED Trigger
The current trigger of the LED can be obtained by reading the trigger file. The value enclosed in [] is the current trigger.
[armadillo ~]# cat /sys/class/leds/[LED]/trigger
[none] rc-feedback nand-disk mmc0 mmc2 timer oneshot heartbeat backlight gpio de
fault-on rfkill0 phy0rx phy0tx phy0assoc phy0radio phy0tpt rfkill1
Figure 5.46. Displaying the LED Trigger
5.5. RTC
Armadillo-IoT uses the RTC functionality of the Board Management IC.
To retain the time even if the power is turned off, an external battery (for example: CR1220) can be connected to the RTC
backup interface (CON13).
5.5.1. Setting the Time on the RTC
There are two types of time on Linux: the system clock managed by the Linux kernel and the hardware clock managed
by the RTC. In order to set the time in the RTC, first set the system clock. Following that, make the hardware clock match
the system clock.
The system clock is set using the date command. For the date command argument, specify the time to be set in the format
[MMDDhhmmCCYY.ss]. The meaning of each field of the time format is as follows.
Armadillo-IoT Gateway G3Product Manual - INTL
Operational Checks
74