aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-12-03 22:27:02 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-12-03 22:27:02 +0000
commitac9bed4bc074d881d3d9ebe8f316dccff397723a (patch)
treef1ba3c3dc7959220196a16d4a12c177a05329650 /package/base-files/files/lib
parent4615944c71dcf8e21d8e90ea48ce6a6ba00a7b4c (diff)
downloadupstream-ac9bed4bc074d881d3d9ebe8f316dccff397723a.tar.gz
upstream-ac9bed4bc074d881d3d9ebe8f316dccff397723a.tar.bz2
upstream-ac9bed4bc074d881d3d9ebe8f316dccff397723a.zip
base-files: board.d: support timer leds
Add ucidef_set_led_timer() and handling for it to config_generate. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47731
Diffstat (limited to 'package/base-files/files/lib')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults-new.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults-new.sh b/package/base-files/files/lib/functions/uci-defaults-new.sh
index 37978a839a..9fa3fa204e 100755
--- a/package/base-files/files/lib/functions/uci-defaults-new.sh
+++ b/package/base-files/files/lib/functions/uci-defaults-new.sh
@@ -422,6 +422,26 @@ ucidef_set_led_ide() {
json_select ..
}
+ucidef_set_led_timer() {
+ local cfg="led_$1"
+ local name="$2"
+ local sysfs="$3"
+ local delayon="$4"
+ local delayoff="$5"
+
+ json_select_object led
+
+ json_select_object "$1"
+ json_add_string type timer
+ json_add_string name "$name"
+ json_add_string sysfs "$sysfs"
+ json_add_int delayon "$delayon"
+ json_add_int delayoff "$delayoff"
+ json_select ..
+
+ json_select ..
+}
+
ucidef_set_led_rssi() {
local cfg="led_$1"
local name="$2"