diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2008-03-05 00:21:56 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2008-03-05 00:21:56 +0000 |
commit | 562b9de7cbf3affed3979a8884c31b716734b03c (patch) | |
tree | 283d01b5a54e285ea1f0df49c1f13066bdfd8ac5 /firmware/target/arm | |
parent | 6ef63a53737ba772ea4ffddcb16d6a3979644f79 (diff) | |
download | rockbox-562b9de7cbf3affed3979a8884c31b716734b03c.tar.gz rockbox-562b9de7cbf3affed3979a8884c31b716734b03c.zip |
D2: Make lcd_init_device() actually turn on the LCD, in preparation for booting the main image. Previously this required an explicit lcd_enable(true).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16523 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c index 181c58669e..7514f93886 100644 --- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | |||
@@ -222,12 +222,14 @@ void lcd_enable(bool on) | |||
222 | 222 | ||
223 | if (on) | 223 | if (on) |
224 | { | 224 | { |
225 | lcd_display_on(); /* Turn on display */ | 225 | LCDC_CTRL |= 1; /* controller enable */ |
226 | lcd_update(); /* Resync display */ | 226 | GPIOA_SET = (1<<6); /* backlight enable - not visible otherwise */ |
227 | lcd_update(); /* Resync display */ | ||
227 | } | 228 | } |
228 | else | 229 | else |
229 | { | 230 | { |
230 | lcd_display_off(); /* Turn off display */ | 231 | LCDC_CTRL &= ~1; /* controller disable */ |
232 | GPIOA_CLEAR = (1<<6); /* backlight off */ | ||
231 | } | 233 | } |
232 | } | 234 | } |
233 | 235 | ||
@@ -236,6 +238,7 @@ bool lcd_enabled(void) | |||
236 | return display_on; | 238 | return display_on; |
237 | } | 239 | } |
238 | 240 | ||
241 | /* TODO: implement lcd_sleep() and separate out the power on/off functions */ | ||
239 | 242 | ||
240 | void lcd_init_device(void) | 243 | void lcd_init_device(void) |
241 | { | 244 | { |
@@ -264,22 +267,28 @@ void lcd_init_device(void) | |||
264 | 267 | ||
265 | LCDC_I1BASE = (unsigned int)lcd_framebuffer; /* dirty, dirty hack */ | 268 | LCDC_I1BASE = (unsigned int)lcd_framebuffer; /* dirty, dirty hack */ |
266 | LCDC_I1SIZE = (LCD_HEIGHT<<16) | LCD_WIDTH; /* image 1 size */ | 269 | LCDC_I1SIZE = (LCD_HEIGHT<<16) | LCD_WIDTH; /* image 1 size */ |
267 | //LCDC_I1POS = (0<<16) | 0; /* position */ | 270 | LCDC_I1POS = (0<<16) | 0; /* position */ |
268 | //LCDC_I1OFF = 0; /* address offset */ | 271 | LCDC_I1OFF = 0; /* address offset */ |
269 | //LCDC_I1SCALE = 0; /* scaling */ | 272 | LCDC_I1SCALE = 0; /* scaling */ |
270 | LCDC_I1CTRL = 5; /* 565bpp (7 = 888bpp) */ | 273 | LCDC_I1CTRL = 5; /* 565bpp (7 = 888bpp) */ |
271 | //LCDC_CTRL &= ~(1<<28); | 274 | LCDC_CTRL &= ~(1<<28); |
272 | 275 | ||
273 | LCDC_CLKDIV = (LCDC_CLKDIV &~ 0xFF00FF) | (1<<16) | 2; /* and this means? */ | 276 | LCDC_CLKDIV = (LCDC_CLKDIV &~ 0xFF00FF) | (1<<16) | 2; /* and this means? */ |
274 | 277 | ||
275 | /* set and clear various flags - not investigated yet */ | 278 | /* set and clear various flags - not investigated yet */ |
276 | //LCDC_CTRL &~ 0x090006AA; /* clear bits 1,3,5,7,9,10,24,27 */ | 279 | LCDC_CTRL &~ 0x090006AA; /* clear bits 1,3,5,7,9,10,24,27 */ |
277 | LCDC_CTRL |= 0x02800144; /* set bits 2,6,8,25,23 */ | 280 | LCDC_CTRL |= 0x02800144; /* set bits 2,6,8,25,23 */ |
278 | LCDC_CTRL = (LCDC_CTRL &~ 0xF0000) | 0x20000; | 281 | LCDC_CTRL = (LCDC_CTRL &~ 0xF0000) | 0x20000; |
279 | //LCDC_CTRL = (LCDC_CTRL &~ 0x700000) | 0x700000; | 282 | LCDC_CTRL = (LCDC_CTRL &~ 0x700000) | 0x700000; |
280 | 283 | ||
281 | /* enable LCD controller */ | 284 | /* enable LCD controller */ |
282 | LCDC_CTRL |= 1; | 285 | LCDC_CTRL |= 1; |
286 | |||
287 | /* enable LTV250QV panel */ | ||
288 | lcd_display_on(); | ||
289 | |||
290 | /* turn on the backlight, without it the LCD is not visible at all */ | ||
291 | GPIOA_SET = (1<<6); | ||
283 | } | 292 | } |
284 | 293 | ||
285 | 294 | ||