From 386503502b2794021f5de431a32bad41dfe5c2d9 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sat, 18 Jul 2009 11:31:19 +0000 Subject: Various Nano2g changes - enable the rest of crt0.S (including clock setup) and make the nano2g bootloader do something useful (displaying gpio ports). Also add checks for the fifo-full condition in the LCD driver - required after enabling all the crt0.S inits git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21948 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c') diff --git a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c index 481e548440..3cbff75ffd 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c +++ b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c @@ -60,21 +60,28 @@ static int xoffset; /* needed for flip */ static inline void s5l_lcd_write_cmd_data(int cmd, int data) { + while (LCD_STATUS & 0x10); LCD_WCMD = cmd >> 8; + while (LCD_STATUS & 0x10); LCD_WCMD = cmd & 0xff; + while (LCD_STATUS & 0x10); LCD_WDATA = data >> 8; + while (LCD_STATUS & 0x10); LCD_WDATA = data & 0xff; } static inline void s5l_lcd_write_cmd(unsigned short cmd) { + while (LCD_STATUS & 0x10); LCD_WCMD = cmd; } static inline void s5l_lcd_write_data(int data) { + while (LCD_STATUS & 0x10); LCD_WDATA = data >> 8; + while (LCD_STATUS & 0x10); LCD_WDATA = data & 0xff; } @@ -185,7 +192,9 @@ void lcd_update(void) for (x = 0; x < LCD_WIDTH; x++) { pixel = *(p++); + while (LCD_STATUS & 0x10); LCD_WDATA = (pixel & 0xff00) >> 8; + while (LCD_STATUS & 0x10); LCD_WDATA = pixel & 0xff; } } -- cgit v1.2.3