diff options
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c index d23fb432d6..fcda5226ca 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c +++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c | |||
@@ -232,6 +232,10 @@ int button_read_device(void) | |||
232 | 232 | ||
233 | CCU_IO &= ~(1<<12); | 233 | CCU_IO &= ~(1<<12); |
234 | 234 | ||
235 | /* B1 is shared with FM i2c */ | ||
236 | bool gpiob_pin0_dir = GPIOB_DIR & (1<<1); | ||
237 | GPIOB_DIR &= ~(1<<1); | ||
238 | |||
235 | GPIOB_PIN(0) = 1<<0; | 239 | GPIOB_PIN(0) = 1<<0; |
236 | udelay(4); | 240 | udelay(4); |
237 | 241 | ||
@@ -266,6 +270,9 @@ int button_read_device(void) | |||
266 | } | 270 | } |
267 | } | 271 | } |
268 | 272 | ||
273 | if(gpiob_pin0_dir) | ||
274 | GPIOB_DIR |= 1<<1; | ||
275 | |||
269 | CCU_IO |= 1<<12; | 276 | CCU_IO |= 1<<12; |
270 | 277 | ||
271 | #ifdef HAS_BUTTON_HOLD | 278 | #ifdef HAS_BUTTON_HOLD |