From 93c94cd05287820013cc3256718c042a97c0aac2 Mon Sep 17 00:00:00 2001 From: funman Date: Tue, 13 Apr 2010 19:34:47 +0000 Subject: [PATCH] fuzev2: remove some delays from button driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25638 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c | 11 ++++------- 1 file 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 445fbd3b7..b9139ef55 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); static bool hold_button = false; #endif void button_init_device(void) -{ /* activate the wheel */ - volatile int i; +{ GPIOA_DIR &= ~(1<<6|1<<7); GPIOC_DIR = 0; - GPIOB_DIR |= (1<<4)|(1<<3)|(1<<0); - for(i = 20; i; i--) nop; - GPIOB_PIN(4) = 1<<4; + GPIOB_DIR |= (1<<4)|(1<<0); + + GPIOB_PIN(4) = 1<<4; /* activate the wheel */ } unsigned read_GPIOA_67(void) @@ -82,8 +81,6 @@ int button_read_device(void) CCU_IO &= ~(1<<12); - for(delay=8;delay;delay--) nop; - GPIOB_PIN(0) = 1<<0; for(delay = 500; delay; delay--) nop; -- 2.11.4.GIT