diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-03-17 04:46:11 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-03-17 04:46:11 +0000 |
commit | 5c16ba4c4d5c0caf68d47e6ffb6f5a2f5923fed0 (patch) | |
tree | da356d34d8cc50f1e0032b3061070247aa807a4b | |
parent | d0e834aa7349fab6367e74d0df88575dfd854496 (diff) | |
download | rockbox-5c16ba4c4d5c0caf68d47e6ffb6f5a2f5923fed0.tar.gz rockbox-5c16ba4c4d5c0caf68d47e6ffb6f5a2f5923fed0.zip |
Fix very last yellows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20337 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/iriver/h10/lcd-h10_20gb.c | 7 | ||||
-rw-r--r-- | firmware/target/coldfire/iaudio/x5/lcd-x5.c | 85 |
2 files changed, 48 insertions, 44 deletions
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c index 547999aed3..4e6aebadd2 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c +++ b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c | |||
@@ -39,7 +39,9 @@ static int lcd_contrast; | |||
39 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; | 39 | static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0; |
40 | 40 | ||
41 | /* Forward declarations */ | 41 | /* Forward declarations */ |
42 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | ||
42 | static void lcd_display_off(void); | 43 | static void lcd_display_off(void); |
44 | #endif | ||
43 | 45 | ||
44 | /* register defines for the Renesas HD66773R */ | 46 | /* register defines for the Renesas HD66773R */ |
45 | #define R_START_OSC 0x00 | 47 | #define R_START_OSC 0x00 |
@@ -314,7 +316,7 @@ void lcd_sleep(void) | |||
314 | } | 316 | } |
315 | #endif | 317 | #endif |
316 | 318 | ||
317 | #if defined(HAVE_LCD_ENABLE) | 319 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
318 | static void lcd_display_off(void) | 320 | static void lcd_display_off(void) |
319 | { | 321 | { |
320 | display_on = false; | 322 | display_on = false; |
@@ -337,6 +339,9 @@ static void lcd_display_off(void) | |||
337 | /* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */ | 339 | /* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */ |
338 | lcd_write_reg(R_DISP_CONTROL, 0x0000); | 340 | lcd_write_reg(R_DISP_CONTROL, 0x0000); |
339 | } | 341 | } |
342 | #endif | ||
343 | |||
344 | #if defined(HAVE_LCD_ENABLE) | ||
340 | static void lcd_display_on(void) | 345 | static void lcd_display_on(void) |
341 | { | 346 | { |
342 | /* Be sure power is on first */ | 347 | /* Be sure power is on first */ |
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c index 190b87547d..98eb5deb94 100644 --- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c +++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c | |||
@@ -52,9 +52,6 @@ static unsigned short r_gate_scan_start_pos = 0x0002; | |||
52 | static unsigned short r_drv_output_control = 0x0313; | 52 | static unsigned short r_drv_output_control = 0x0313; |
53 | static unsigned short r_horiz_ram_addr_pos = 0x7f00; | 53 | static unsigned short r_horiz_ram_addr_pos = 0x7f00; |
54 | 54 | ||
55 | /* Forward declarations */ | ||
56 | static void lcd_display_off(void); | ||
57 | |||
58 | /* A15(0x8000) && CS1->CS, A1(0x0002)->RS */ | 55 | /* A15(0x8000) && CS1->CS, A1(0x0002)->RS */ |
59 | #define LCD_CMD *(volatile unsigned short *)0xf0008000 | 56 | #define LCD_CMD *(volatile unsigned short *)0xf0008000 |
60 | #define LCD_DATA *(volatile unsigned short *)0xf0008002 | 57 | #define LCD_DATA *(volatile unsigned short *)0xf0008002 |
@@ -267,46 +264,6 @@ static void lcd_power_on(void) | |||
267 | power_on = true; | 264 | power_on = true; |
268 | } | 265 | } |
269 | 266 | ||
270 | #if defined(HAVE_LCD_SLEEP) | ||
271 | static void lcd_power_off(void) | ||
272 | { | ||
273 | /* Display must be off first */ | ||
274 | if (display_on) | ||
275 | lcd_display_off(); | ||
276 | |||
277 | power_on = false; | ||
278 | |||
279 | /** Power OFF sequence **/ | ||
280 | /* Per datasheet Rev.1.10, Jun.21.2003, p. 99 */ | ||
281 | |||
282 | /* Step-up1 halt setting bit */ | ||
283 | /* BT2-0=110, DC2-0=001, AP2-0=011, SLP=0, STB=0 */ | ||
284 | lcd_write_reg(R_POWER_CONTROL1, 0x062c); | ||
285 | /* Step-up3,4 halt setting bit */ | ||
286 | /* VRL3-0=0100, PON=0, VRH3-0=0001 */ | ||
287 | lcd_write_reg(R_POWER_CONTROL4, 0x0401); | ||
288 | /* VCOMG=0, VDV4-0=xxxxx, VCM4-0=11000 */ | ||
289 | lcd_write_reg(R_POWER_CONTROL5, 0x0018 | lcd_contrast); | ||
290 | |||
291 | /* Wait 100ms or more */ | ||
292 | sleep(HZ/10); | ||
293 | |||
294 | /* Step-up2,amp halt setting bit */ | ||
295 | /* BT2-0=000, DC2-0=000, AP2-0=000, SLP=0, STB=0 */ | ||
296 | lcd_write_reg(R_POWER_CONTROL1, 0x0000); | ||
297 | } | ||
298 | |||
299 | void lcd_sleep(void) | ||
300 | { | ||
301 | if (power_on) | ||
302 | lcd_power_off(); | ||
303 | |||
304 | /* Set standby mode */ | ||
305 | /* BT2-0=000, DC2-0=000, AP2-0=000, SLP=0, STB=1 */ | ||
306 | lcd_write_reg(R_POWER_CONTROL1, 0x0001); | ||
307 | } | ||
308 | #endif | ||
309 | |||
310 | static void lcd_display_on(void) | 267 | static void lcd_display_on(void) |
311 | { | 268 | { |
312 | /* Be sure power is on first */ | 269 | /* Be sure power is on first */ |
@@ -334,6 +291,7 @@ static void lcd_display_on(void) | |||
334 | display_on = true; | 291 | display_on = true; |
335 | } | 292 | } |
336 | 293 | ||
294 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | ||
337 | static void lcd_display_off(void) | 295 | static void lcd_display_off(void) |
338 | { | 296 | { |
339 | display_on = false; | 297 | display_on = false; |
@@ -356,6 +314,47 @@ static void lcd_display_off(void) | |||
356 | /* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */ | 314 | /* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=00 */ |
357 | lcd_write_reg(R_DISP_CONTROL, 0x0000); | 315 | lcd_write_reg(R_DISP_CONTROL, 0x0000); |
358 | } | 316 | } |
317 | #endif | ||
318 | |||
319 | #if defined(HAVE_LCD_SLEEP) | ||
320 | static void lcd_power_off(void) | ||
321 | { | ||
322 | /* Display must be off first */ | ||
323 | if (display_on) | ||
324 | lcd_display_off(); | ||
325 | |||
326 | power_on = false; | ||
327 | |||
328 | /** Power OFF sequence **/ | ||
329 | /* Per datasheet Rev.1.10, Jun.21.2003, p. 99 */ | ||
330 | |||
331 | /* Step-up1 halt setting bit */ | ||
332 | /* BT2-0=110, DC2-0=001, AP2-0=011, SLP=0, STB=0 */ | ||
333 | lcd_write_reg(R_POWER_CONTROL1, 0x062c); | ||
334 | /* Step-up3,4 halt setting bit */ | ||
335 | /* VRL3-0=0100, PON=0, VRH3-0=0001 */ | ||
336 | lcd_write_reg(R_POWER_CONTROL4, 0x0401); | ||
337 | /* VCOMG=0, VDV4-0=xxxxx, VCM4-0=11000 */ | ||
338 | lcd_write_reg(R_POWER_CONTROL5, 0x0018 | lcd_contrast); | ||
339 | |||
340 | /* Wait 100ms or more */ | ||
341 | sleep(HZ/10); | ||
342 | |||
343 | /* Step-up2,amp halt setting bit */ | ||
344 | /* BT2-0=000, DC2-0=000, AP2-0=000, SLP=0, STB=0 */ | ||
345 | lcd_write_reg(R_POWER_CONTROL1, 0x0000); | ||
346 | } | ||
347 | |||
348 | void lcd_sleep(void) | ||
349 | { | ||
350 | if (power_on) | ||
351 | lcd_power_off(); | ||
352 | |||
353 | /* Set standby mode */ | ||
354 | /* BT2-0=000, DC2-0=000, AP2-0=000, SLP=0, STB=1 */ | ||
355 | lcd_write_reg(R_POWER_CONTROL1, 0x0001); | ||
356 | } | ||
357 | #endif | ||
359 | 358 | ||
360 | /* LCD init */ | 359 | /* LCD init */ |
361 | void lcd_init_device(void) | 360 | void lcd_init_device(void) |