Skip to content

Commit eeabfaa

Browse files
committed
tweak gesturs and disable
1 parent 5cc8b7b commit eeabfaa

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

wifi-button/DEBIAN/postinst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cp $SRC/gpio_pull.dtbo /boot/overlays # can't let dpkg do that 'cause chmod does
1717
#[[ -f /etc/sensorgnome/network.txt ]] || cp $SRC/network.txt /etc/sensorgnome
1818

1919
# enable and start/restart gestures and wifi_init units
20-
for U in wifi-init gestures rfunblock net-mods; do
20+
for U in wifi-init rfunblock net-mods; do # gestures
2121
# code from debhelper's postinst-systemd-enable template
2222
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
2323
# This will only remove masks created by d-s-h on package removal.

wifi-button/gpio-init.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,16 @@ echo "Enabling GPIO $LED_GPIO for LED and GPIO $SW_GPIO for button"
4141

4242
dir=$PWD
4343
cd /sys/class/gpio
44-
[[ -e gpio$LED_GPIO ]] || echo $LED_GPIO > export
45-
echo out > gpio$LED_GPIO/direction
46-
echo 0 > gpio$LED_GPIO/value
47-
48-
[[ -e gpio$SW_GPIO ]] || echo $SW_GPIO > export
49-
echo 1 > gpio$SW_GPIO/active_low
44+
# [[ -e gpio$LED_GPIO ]] || echo $LED_GPIO > export
45+
# echo out > gpio$LED_GPIO/direction
46+
# echo 0 > gpio$LED_GPIO/value
47+
pinctrl set $LED_GPIO op
48+
pinctrl set $LED_GPIO dl
49+
50+
# [[ -e gpio$SW_GPIO ]] || echo $SW_GPIO > export
51+
# echo 1 > gpio$SW_GPIO/active_low
52+
pinctrl set $SW_GPIO ip
53+
pinctrl set $SW_GPIO pu
5054

5155
cd $dir
5256
cat <<EOF >$1

0 commit comments

Comments
 (0)