mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
fuzev2: remove some delays from button driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25638 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e6934b86fd
commit
5521717958
1 changed files with 4 additions and 7 deletions
|
|
@ -30,13 +30,12 @@ extern void scrollwheel(unsigned wheel_value);
|
||||||
static bool hold_button = false;
|
static bool hold_button = false;
|
||||||
#endif
|
#endif
|
||||||
void button_init_device(void)
|
void button_init_device(void)
|
||||||
{ /* activate the wheel */
|
{
|
||||||
volatile int i;
|
|
||||||
GPIOA_DIR &= ~(1<<6|1<<7);
|
GPIOA_DIR &= ~(1<<6|1<<7);
|
||||||
GPIOC_DIR = 0;
|
GPIOC_DIR = 0;
|
||||||
GPIOB_DIR |= (1<<4)|(1<<3)|(1<<0);
|
GPIOB_DIR |= (1<<4)|(1<<0);
|
||||||
for(i = 20; i; i--) nop;
|
|
||||||
GPIOB_PIN(4) = 1<<4;
|
GPIOB_PIN(4) = 1<<4; /* activate the wheel */
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned read_GPIOA_67(void)
|
unsigned read_GPIOA_67(void)
|
||||||
|
|
@ -82,8 +81,6 @@ int button_read_device(void)
|
||||||
|
|
||||||
CCU_IO &= ~(1<<12);
|
CCU_IO &= ~(1<<12);
|
||||||
|
|
||||||
for(delay=8;delay;delay--) nop;
|
|
||||||
|
|
||||||
GPIOB_PIN(0) = 1<<0;
|
GPIOB_PIN(0) = 1<<0;
|
||||||
for(delay = 500; delay; delay--)
|
for(delay = 500; delay; delay--)
|
||||||
nop;
|
nop;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue