From 3e37460357cc446931cab7cbf7fbc844d183db0a Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Tue, 27 Apr 2010 21:01:31 +0000 Subject: Fuzev2 button fixes - remove udelay(1) and use the previous busy loop : the delay was too long for proper hold detection - remove the 2nd delay (unneeded) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25741 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c index 5693ea0fa3..fa126c0a95 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c +++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c @@ -233,14 +233,13 @@ int button_read_device(void) CCU_IO &= ~(1<<12); GPIOB_PIN(0) = 1<<0; - udelay(1); + for(delay = 500; delay; delay--) + nop; gpiod6 = GPIOD_PIN(6); GPIOB_PIN(0) = 0; - udelay(1); - if (GPIOC_PIN(1) & 1<<1) btn |= BUTTON_DOWN; if (GPIOC_PIN(2) & 1<<2) -- cgit v1.2.3