summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
index 445fbd3b7f..b9139ef555 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
@@ -30,13 +30,12 @@ extern void scrollwheel(unsigned wheel_value);
30static bool hold_button = false; 30static bool hold_button = false;
31#endif 31#endif
32void button_init_device(void) 32void button_init_device(void)
33{ /* activate the wheel */ 33{
34 volatile int i;
35 GPIOA_DIR &= ~(1<<6|1<<7); 34 GPIOA_DIR &= ~(1<<6|1<<7);
36 GPIOC_DIR = 0; 35 GPIOC_DIR = 0;
37 GPIOB_DIR |= (1<<4)|(1<<3)|(1<<0); 36 GPIOB_DIR |= (1<<4)|(1<<0);
38 for(i = 20; i; i--) nop; 37
39 GPIOB_PIN(4) = 1<<4; 38 GPIOB_PIN(4) = 1<<4; /* activate the wheel */
40} 39}
41 40
42unsigned read_GPIOA_67(void) 41unsigned read_GPIOA_67(void)
@@ -82,8 +81,6 @@ int button_read_device(void)
82 81
83 CCU_IO &= ~(1<<12); 82 CCU_IO &= ~(1<<12);
84 83
85 for(delay=8;delay;delay--) nop;
86
87 GPIOB_PIN(0) = 1<<0; 84 GPIOB_PIN(0) = 1<<0;
88 for(delay = 500; delay; delay--) 85 for(delay = 500; delay; delay--)
89 nop; 86 nop;