mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Change the clipv2 button driver to use fixed delays rather than processor cycle counting.
Also introduce a new delay needed for frequency scaling. Change-Id: I575a503a8ca44358fcd5512fd951fe9c7bbde31c
This commit is contained in:
parent
1015088d90
commit
784790dbec
1 changed files with 2 additions and 4 deletions
|
|
@ -118,10 +118,7 @@ bool button_hold(void)
|
||||||
#ifdef SANSA_CLIPV2
|
#ifdef SANSA_CLIPV2
|
||||||
GPIOA_DIR |= 1<<7;
|
GPIOA_DIR |= 1<<7;
|
||||||
GPIOA_PIN(7) = 1<<7;
|
GPIOA_PIN(7) = 1<<7;
|
||||||
|
udelay(2);
|
||||||
int delay = 50;
|
|
||||||
while(delay--)
|
|
||||||
asm("nop");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool hold_button = (GPIOA_PIN(3) != 0);
|
bool hold_button = (GPIOA_PIN(3) != 0);
|
||||||
|
|
@ -129,6 +126,7 @@ bool button_hold(void)
|
||||||
#ifdef SANSA_CLIPV2
|
#ifdef SANSA_CLIPV2
|
||||||
GPIOA_PIN(7) = 0;
|
GPIOA_PIN(7) = 0;
|
||||||
GPIOA_DIR &= ~(1<<7);
|
GPIOA_DIR &= ~(1<<7);
|
||||||
|
udelay(4);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue