base-files: add support for heartbeat led trigger

This patch adds support for creation heartbeat led trigger with,
for example, this command:

	ucidef_set_led_heartbeat "..." "..." "..."

from /etc/board.d/01_leds.

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
This commit is contained in:
Alexey Smirnov 2022-01-04 10:11:51 +03:00 committed by Petr Štetiar
parent e1e4cbde5c
commit 66071729a2
1 changed files with 9 additions and 0 deletions

View File

@ -418,6 +418,15 @@ ucidef_set_led_default() {
json_select ..
}
ucidef_set_led_heartbeat() {
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger heartbeat
json_select ..
json_select ..
}
ucidef_set_led_gpio() {
local gpio="$4"
local inverted="$5"