summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/button-e200v2-fuze.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/button-e200v2-fuze.c')
-rw-r--r--firmware/target/arm/as3525/button-e200v2-fuze.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/button-e200v2-fuze.c b/firmware/target/arm/as3525/button-e200v2-fuze.c
index 6a9f02959c..5518f981e8 100644
--- a/firmware/target/arm/as3525/button-e200v2-fuze.c
+++ b/firmware/target/arm/as3525/button-e200v2-fuze.c
@@ -32,7 +32,7 @@
32#define WHEEL_COUNTER_DIV 4 32#define WHEEL_COUNTER_DIV 4
33#define ACCEL_INCREMENT 2 33#define ACCEL_INCREMENT 2
34#define ACCEL_SHIFT 2 34#define ACCEL_SHIFT 2
35#define BUTTON_DELAY 45 35#define BUTTON_DELAY 30
36#endif 36#endif
37 37
38#ifdef SANSA_E200V2 38#ifdef SANSA_E200V2
@@ -246,6 +246,11 @@ static int button_gpio(void)
246 int btn = BUTTON_NONE; 246 int btn = BUTTON_NONE;
247 if(hold_button) 247 if(hold_button)
248 return btn; 248 return btn;
249
250 /* disable DBOP output while changing GPIO pins that share lines with it */
251 DBOP_CTRL &= ~(1<<16);
252 button_delay();
253
249 /* set afsel, so that we can read our buttons */ 254 /* set afsel, so that we can read our buttons */
250 GPIOC_AFSEL &= ~(1<<2|1<<3|1<<4|1<<5|1<<6); 255 GPIOC_AFSEL &= ~(1<<2|1<<3|1<<4|1<<5|1<<6);
251 /* set dir so we can read our buttons (but reset the C pins first) */ 256 /* set dir so we can read our buttons (but reset the C pins first) */
@@ -276,7 +281,8 @@ static int button_gpio(void)
276 /* return to settings needed for lcd */ 281 /* return to settings needed for lcd */
277 GPIOC_DIR |= (1<<2|1<<3|1<<4|1<<5|1<<6); 282 GPIOC_DIR |= (1<<2|1<<3|1<<4|1<<5|1<<6);
278 GPIOC_AFSEL |= (1<<2|1<<3|1<<4|1<<5|1<<6); 283 GPIOC_AFSEL |= (1<<2|1<<3|1<<4|1<<5|1<<6);
279 284
285 DBOP_CTRL |= (1<<16); /* enable output again */
280 return btn; 286 return btn;
281} 287}
282 288