From 9ed450b23b5a209de913216604ca4a8d6eebcb71 Mon Sep 17 00:00:00 2001 From: funman Date: Tue, 27 Apr 2010 21:01:31 +0000 Subject: [PATCH] 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 5693ea0fa..fa126c0a9 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) -- 2.11.4.GIT