diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-04-13 19:34:47 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-04-13 19:34:47 +0000 |
commit | 55217179582a779cb2ff255a33271edbf3096940 (patch) | |
tree | 4ecb8d0fe9df9e828fef361363a2ef3da95d586c /firmware/target/arm | |
parent | e6934b86fdcddbf9893227ef8fe47bff6d9566a2 (diff) | |
download | rockbox-55217179582a779cb2ff255a33271edbf3096940.tar.gz rockbox-55217179582a779cb2ff255a33271edbf3096940.zip |
fuzev2: remove some delays from button driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25638 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c | 11 |
1 files 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 445fbd3b7f..b9139ef555 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); | |||
30 | static bool hold_button = false; | 30 | static bool hold_button = false; |
31 | #endif | 31 | #endif |
32 | void button_init_device(void) | 32 | void button_init_device(void) |
33 | { /* activate the wheel */ | 33 | { |
34 | volatile int i; | ||
35 | GPIOA_DIR &= ~(1<<6|1<<7); | 34 | GPIOA_DIR &= ~(1<<6|1<<7); |
36 | GPIOC_DIR = 0; | 35 | GPIOC_DIR = 0; |
37 | GPIOB_DIR |= (1<<4)|(1<<3)|(1<<0); | 36 | GPIOB_DIR |= (1<<4)|(1<<0); |
38 | for(i = 20; i; i--) nop; | 37 | |
39 | GPIOB_PIN(4) = 1<<4; | 38 | GPIOB_PIN(4) = 1<<4; /* activate the wheel */ |
40 | } | 39 | } |
41 | 40 | ||
42 | unsigned read_GPIOA_67(void) | 41 | unsigned read_GPIOA_67(void) |
@@ -82,8 +81,6 @@ int button_read_device(void) | |||
82 | 81 | ||
83 | CCU_IO &= ~(1<<12); | 82 | CCU_IO &= ~(1<<12); |
84 | 83 | ||
85 | for(delay=8;delay;delay--) nop; | ||
86 | |||
87 | GPIOB_PIN(0) = 1<<0; | 84 | GPIOB_PIN(0) = 1<<0; |
88 | for(delay = 500; delay; delay--) | 85 | for(delay = 500; delay; delay--) |
89 | nop; | 86 | nop; |