mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
ramips: enable LED button for TP-Link EC330-G5u v1
The device already has LED push button (KEY_LIGHTS_TOGGLE)
and exported GPIO control "led-light". This commit adds
button handler script for switching on/off all device LEDs.
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit d955b41275
)
This commit is contained in:
parent
a48d0bdb77
commit
91221d9e74
16
target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle
Executable file
16
target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[[ "${ACTION}" = "released" ]] || exit 0
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
case "$(board_name)" in
|
||||||
|
tplink,ec330-g5u-v1)
|
||||||
|
led_light="/sys/class/gpio/led-light/value"
|
||||||
|
echo "$((!$(cat $led_light)))" > "$led_light"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
Loading…
Reference in New Issue
Block a user