mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 15:56:49 +00:00
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:
parent
c07c565ea6
commit
1ea34b9621
@ -418,6 +418,15 @@ ucidef_set_led_default() {
|
|||||||
json_select ..
|
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() {
|
ucidef_set_led_gpio() {
|
||||||
local gpio="$4"
|
local gpio="$4"
|
||||||
local inverted="$5"
|
local inverted="$5"
|
||||||
|
Loading…
Reference in New Issue
Block a user