diff options
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clipv2/button-clip.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-clipv2/button-clip.c b/firmware/target/arm/as3525/sansa-clipv2/button-clip.c index c14d67cb60..1356bfbc55 100644 --- a/firmware/target/arm/as3525/sansa-clipv2/button-clip.c +++ b/firmware/target/arm/as3525/sansa-clipv2/button-clip.c | |||
@@ -130,8 +130,19 @@ bool button_hold(void) | |||
130 | #ifndef BOOTLOADER | 130 | #ifndef BOOTLOADER |
131 | static bool hold_button_old = false; | 131 | static bool hold_button_old = false; |
132 | #endif | 132 | #endif |
133 | |||
134 | GPIOA_DIR |= 1<<7; | ||
135 | GPIOA_PIN(7) = 1<<7; | ||
136 | |||
137 | int delay = 50; | ||
138 | while(delay--) | ||
139 | asm("nop"); | ||
140 | |||
133 | bool hold_button = (GPIOA_PIN(3) != 0); | 141 | bool hold_button = (GPIOA_PIN(3) != 0); |
134 | 142 | ||
143 | GPIOA_PIN(7) = 0; | ||
144 | GPIOA_DIR &= ~(1<<7); | ||
145 | |||
135 | #ifndef BOOTLOADER | 146 | #ifndef BOOTLOADER |
136 | /* light handling */ | 147 | /* light handling */ |
137 | if (hold_button != hold_button_old) | 148 | if (hold_button != hold_button_old) |