projects
/
openwrt
/
staging
/
hauke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ca4f8c
)
base-files: gpio switch: fix inverted logic
author
Mathias Kresin
<dev@kresin.me>
Sun, 14 Jan 2018 23:28:03 +0000
(
00:28
+0100)
committer
Mathias Kresin
<dev@kresin.me>
Thu, 18 Jan 2018 06:22:36 +0000
(07:22 +0100)
GPIOs are exported as active high to the sysfs, hence the logic need to be
inverted.
Fixes: e66c47fb14f5 ("base-files: gpio switch: set output value with
direction")
Signed-off-by: Mathias Kresin <dev@kresin.me>
package/base-files/files/etc/init.d/gpio_switch
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/init.d/gpio_switch
b/package/base-files/files/etc/init.d/gpio_switch
index b67950a992c59bd85ac5052de392986adc29a85a..32c142f110233b7c85472df7def2cbaeb44b5483 100755
(executable)
--- a/
package/base-files/files/etc/init.d/gpio_switch
+++ b/
package/base-files/files/etc/init.d/gpio_switch
@@
-24,7
+24,7
@@
load_gpio_switch()
[ -d "$gpio_path" ] || sleep 1
}
# set the pin to output with high or low pin value
- { [ "$value" = "0" ] && echo "
high" || echo "low
"; } >"$gpio_path/direction"
+ { [ "$value" = "0" ] && echo "
low" || echo "high
"; } >"$gpio_path/direction"
}
service_triggers()