diff options
author | Dave Chapman <dave@dchapman.com> | 2009-07-18 11:31:19 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2009-07-18 11:31:19 +0000 |
commit | 386503502b2794021f5de431a32bad41dfe5c2d9 (patch) | |
tree | 19e3b216233cfc7c529633458f2aa80a157e81a9 /firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | |
parent | d58e3584772189715f54b4035cd13eac4270058e (diff) | |
download | rockbox-386503502b2794021f5de431a32bad41dfe5c2d9.tar.gz rockbox-386503502b2794021f5de431a32bad41dfe5c2d9.zip |
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
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c')
-rw-r--r-- | firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | 9 |
1 files changed, 9 insertions, 0 deletions
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 */ | |||
60 | 60 | ||
61 | static inline void s5l_lcd_write_cmd_data(int cmd, int data) | 61 | static inline void s5l_lcd_write_cmd_data(int cmd, int data) |
62 | { | 62 | { |
63 | while (LCD_STATUS & 0x10); | ||
63 | LCD_WCMD = cmd >> 8; | 64 | LCD_WCMD = cmd >> 8; |
65 | while (LCD_STATUS & 0x10); | ||
64 | LCD_WCMD = cmd & 0xff; | 66 | LCD_WCMD = cmd & 0xff; |
65 | 67 | ||
68 | while (LCD_STATUS & 0x10); | ||
66 | LCD_WDATA = data >> 8; | 69 | LCD_WDATA = data >> 8; |
70 | while (LCD_STATUS & 0x10); | ||
67 | LCD_WDATA = data & 0xff; | 71 | LCD_WDATA = data & 0xff; |
68 | } | 72 | } |
69 | 73 | ||
70 | static inline void s5l_lcd_write_cmd(unsigned short cmd) | 74 | static inline void s5l_lcd_write_cmd(unsigned short cmd) |
71 | { | 75 | { |
76 | while (LCD_STATUS & 0x10); | ||
72 | LCD_WCMD = cmd; | 77 | LCD_WCMD = cmd; |
73 | } | 78 | } |
74 | 79 | ||
75 | static inline void s5l_lcd_write_data(int data) | 80 | static inline void s5l_lcd_write_data(int data) |
76 | { | 81 | { |
82 | while (LCD_STATUS & 0x10); | ||
77 | LCD_WDATA = data >> 8; | 83 | LCD_WDATA = data >> 8; |
84 | while (LCD_STATUS & 0x10); | ||
78 | LCD_WDATA = data & 0xff; | 85 | LCD_WDATA = data & 0xff; |
79 | } | 86 | } |
80 | 87 | ||
@@ -185,7 +192,9 @@ void lcd_update(void) | |||
185 | for (x = 0; x < LCD_WIDTH; x++) { | 192 | for (x = 0; x < LCD_WIDTH; x++) { |
186 | pixel = *(p++); | 193 | pixel = *(p++); |
187 | 194 | ||
195 | while (LCD_STATUS & 0x10); | ||
188 | LCD_WDATA = (pixel & 0xff00) >> 8; | 196 | LCD_WDATA = (pixel & 0xff00) >> 8; |
197 | while (LCD_STATUS & 0x10); | ||
189 | LCD_WDATA = pixel & 0xff; | 198 | LCD_WDATA = pixel & 0xff; |
190 | } | 199 | } |
191 | } | 200 | } |