D2: Disable IRQs when writing to the LCD 3-wire interface, and re-instate the previous delay value.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19292 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rob Purchase 2008-12-01 20:55:33 +00:00
parent e5bf5beaee
commit 8da8159f74

View file

@ -77,7 +77,7 @@ void lcd_set_contrast(int val)
static void delay_loop(void)
{
unsigned long x;
for (x = (unsigned)(FREQ>>24); x; x--);
for (x = (unsigned)(FREQ>>23); x; x--);
}
#define DELAY delay_loop()
@ -108,8 +108,12 @@ static void ltv250qv_write(unsigned int command)
static void lcd_write_reg(unsigned char reg, unsigned short val)
{
int level = disable_irq_save();
ltv250qv_write(0x740000 | reg);
ltv250qv_write(0x760000 | val);
restore_irq(level);
}