diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-05 18:23:55 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-05 22:55:08 +0000 |
commit | 914114fd21a126be36435e7b0bc3a9f2685149c6 (patch) | |
tree | 07a0bebced0a6f8a6ffee2f948da66df31440aa9 /firmware | |
parent | c6f66cf696a4a0802dad8128dd985c7ab6489602 (diff) | |
download | rockbox-914114fd21a126be36435e7b0bc3a9f2685149c6.tar.gz rockbox-914114fd21a126be36435e7b0bc3a9f2685149c6.zip |
FS13241: Get rid of the hacky hold switch emulation on the X3ii & X20
It doesn't work properly and interferes with the power button in the keymap.
Rework WPS keymap a bit to make single-tap power emulate lock.
Change-Id: I9d9b9b4adcea3764e6e427f484e051c9bab9d13b
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config/xduoox20.h | 3 | ||||
-rw-r--r-- | firmware/export/config/xduoox3ii.h | 3 | ||||
-rw-r--r-- | firmware/target/hosted/xduoo/button-target.h | 2 | ||||
-rw-r--r-- | firmware/target/hosted/xduoo/button-xduoo.c | 34 |
4 files changed, 0 insertions, 42 deletions
diff --git a/firmware/export/config/xduoox20.h b/firmware/export/config/xduoox20.h index 4a5b63bf38..62b2d58582 100644 --- a/firmware/export/config/xduoox20.h +++ b/firmware/export/config/xduoox20.h | |||
@@ -73,9 +73,6 @@ | |||
73 | /* KeyPad configuration for plugins */ | 73 | /* KeyPad configuration for plugins */ |
74 | #define CONFIG_KEYPAD XDUOO_X20_PAD | 74 | #define CONFIG_KEYPAD XDUOO_X20_PAD |
75 | 75 | ||
76 | /* Define this if a programmable hotkey is mapped */ | ||
77 | #define HAVE_HOTKEY | ||
78 | |||
79 | /* define this if the target has volume keys which can be used in the lists */ | 76 | /* define this if the target has volume keys which can be used in the lists */ |
80 | #define HAVE_VOLUME_IN_LIST | 77 | #define HAVE_VOLUME_IN_LIST |
81 | 78 | ||
diff --git a/firmware/export/config/xduoox3ii.h b/firmware/export/config/xduoox3ii.h index e2066e453c..893fcc5e51 100644 --- a/firmware/export/config/xduoox3ii.h +++ b/firmware/export/config/xduoox3ii.h | |||
@@ -73,9 +73,6 @@ | |||
73 | /* KeyPad configuration for plugins */ | 73 | /* KeyPad configuration for plugins */ |
74 | #define CONFIG_KEYPAD XDUOO_X3II_PAD | 74 | #define CONFIG_KEYPAD XDUOO_X3II_PAD |
75 | 75 | ||
76 | /* Define this if a programmable hotkey is mapped */ | ||
77 | #define HAVE_HOTKEY | ||
78 | |||
79 | /* define this if the target has volume keys which can be used in the lists */ | 76 | /* define this if the target has volume keys which can be used in the lists */ |
80 | #define HAVE_VOLUME_IN_LIST | 77 | #define HAVE_VOLUME_IN_LIST |
81 | 78 | ||
diff --git a/firmware/target/hosted/xduoo/button-target.h b/firmware/target/hosted/xduoo/button-target.h index 6cca5c22a0..ac77a7da7d 100644 --- a/firmware/target/hosted/xduoo/button-target.h +++ b/firmware/target/hosted/xduoo/button-target.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #ifndef _BUTTON_TARGET_H_ | 20 | #ifndef _BUTTON_TARGET_H_ |
21 | #define _BUTTON_TARGET_H_ | 21 | #define _BUTTON_TARGET_H_ |
22 | 22 | ||
23 | #define HAS_BUTTON_HOLD | ||
24 | |||
25 | /* Main unit's buttons */ | 23 | /* Main unit's buttons */ |
26 | #define BUTTON_POWER 0x00000001 | 24 | #define BUTTON_POWER 0x00000001 |
27 | #define BUTTON_HOME 0x00000002 | 25 | #define BUTTON_HOME 0x00000002 |
diff --git a/firmware/target/hosted/xduoo/button-xduoo.c b/firmware/target/hosted/xduoo/button-xduoo.c index 605cd18736..99b0908378 100644 --- a/firmware/target/hosted/xduoo/button-xduoo.c +++ b/firmware/target/hosted/xduoo/button-xduoo.c | |||
@@ -38,14 +38,6 @@ | |||
38 | #include "backlight-target.h" | 38 | #include "backlight-target.h" |
39 | #include "xduoolinux_codec.h" | 39 | #include "xduoolinux_codec.h" |
40 | 40 | ||
41 | static bool soft_hold = false; | ||
42 | #ifndef BOOTLOADER | ||
43 | static unsigned soft_hold_counter = 0; | ||
44 | #define SOFT_HOLD_BUTTON BUTTON_POWER | ||
45 | #define SOFT_HOLD_CNTMAX_1 (HZ) | ||
46 | #define SOFT_HOLD_CNTMAX_2 (HZ*2) | ||
47 | #endif | ||
48 | |||
49 | #define NR_POLL_DESC 3 | 41 | #define NR_POLL_DESC 3 |
50 | static struct pollfd poll_fds[NR_POLL_DESC]; | 42 | static struct pollfd poll_fds[NR_POLL_DESC]; |
51 | 43 | ||
@@ -141,27 +133,6 @@ int button_read_device(void) | |||
141 | } | 133 | } |
142 | } | 134 | } |
143 | 135 | ||
144 | #ifndef BOOTLOADER | ||
145 | if (button_bitmap == SOFT_HOLD_BUTTON) { | ||
146 | soft_hold_counter++; | ||
147 | if (soft_hold_counter == SOFT_HOLD_CNTMAX_1) { | ||
148 | soft_hold = !soft_hold; | ||
149 | backlight_hold_changed(soft_hold); | ||
150 | } | ||
151 | else | ||
152 | if (soft_hold_counter == SOFT_HOLD_CNTMAX_2) { | ||
153 | soft_hold = false; | ||
154 | backlight_hold_changed(soft_hold); | ||
155 | } | ||
156 | } else { | ||
157 | soft_hold_counter = 0; | ||
158 | } | ||
159 | |||
160 | if((soft_hold) && (button_bitmap != SOFT_HOLD_BUTTON)) { | ||
161 | return BUTTON_NONE; | ||
162 | } | ||
163 | #endif | ||
164 | |||
165 | return button_bitmap; | 136 | return button_bitmap; |
166 | } | 137 | } |
167 | 138 | ||
@@ -187,8 +158,3 @@ void button_close_device(void) | |||
187 | close(poll_fds[i].fd); | 158 | close(poll_fds[i].fd); |
188 | } | 159 | } |
189 | } | 160 | } |
190 | |||
191 | bool button_hold(void) | ||
192 | { | ||
193 | return soft_hold; | ||
194 | } | ||