aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorAlexey Smirnov <s.alexey@gmail.com>2022-01-04 10:11:51 +0300
committerPetr Štetiar <ynezz@true.cz>2022-02-19 13:10:01 +0100
commit66071729a27919e555752fce25210b1b035eb319 (patch)
treef5163d760f613216e3fe3603aa34f9733a241a12 /package
parente1e4cbde5ceb228e60fff1fc752cb90d9a7df2ab (diff)
downloadupstream-66071729a27919e555752fce25210b1b035eb319.tar.gz
upstream-66071729a27919e555752fce25210b1b035eb319.tar.bz2
upstream-66071729a27919e555752fce25210b1b035eb319.zip
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>
Diffstat (limited to 'package')
-rw-r--r--package/base-files/files/lib/functions/uci-defaults.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
index 02882f43ca..f96e645e73 100644
--- a/package/base-files/files/lib/functions/uci-defaults.sh
+++ b/package/base-files/files/lib/functions/uci-defaults.sh
@@ -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"