diff options
Diffstat (limited to 'firmware/target/hosted/xduoo')
-rw-r--r-- | firmware/target/hosted/xduoo/button-target.h | 2 | ||||
-rw-r--r-- | firmware/target/hosted/xduoo/button-xduoo.c | 34 |
2 files changed, 0 insertions, 36 deletions
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 | } | ||