mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
D2: Fix another timing loop that broke when we switched to the EABI compiler, this time in the LCD driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27395 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c9a4fb0d0d
commit
8a07e78a06
1 changed files with 5 additions and 2 deletions
|
|
@ -77,9 +77,12 @@ void lcd_set_contrast(int val)
|
||||||
/* Delay loop based on CPU frequency (FREQ>>23 is 3..22 for 32MHz..192MHz) */
|
/* Delay loop based on CPU frequency (FREQ>>23 is 3..22 for 32MHz..192MHz) */
|
||||||
static void delay_loop(void)
|
static void delay_loop(void)
|
||||||
{
|
{
|
||||||
unsigned long x;
|
asm volatile (" mov %[freq], %[freq], asr#23 \n\t"
|
||||||
for (x = (unsigned)(FREQ>>23); x; x--);
|
"1: subs %[freq], %[freq], #1 \n\t"
|
||||||
|
" bne 1b"
|
||||||
|
: : [freq] "r" (cpu_frequency) : "memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DELAY delay_loop()
|
#define DELAY delay_loop()
|
||||||
|
|
||||||
static void ltv250qv_write(unsigned int command)
|
static void ltv250qv_write(unsigned int command)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue