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>
(cherry picked from commit 66071729a2)
This commit is contained in:
Alexey Smirnov 2022-01-04 10:11:51 +03:00 committed by Christian Lamparter
parent c07c565ea6
commit 1ea34b9621
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"