diff options
Diffstat (limited to 'firmware/target/arm/sandisk/sansa-e200/lcd-e200.c')
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c index b3c05fb48c..39ceb9b8e0 100644 --- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c | |||
@@ -27,11 +27,9 @@ | |||
27 | #include "lcd.h" | 27 | #include "lcd.h" |
28 | #include "lcd-target.h" | 28 | #include "lcd-target.h" |
29 | 29 | ||
30 | extern bool lcd_active(void); | ||
31 | extern void lcd_set_active(bool active); | ||
32 | |||
33 | /* Power and display status */ | 30 | /* Power and display status */ |
34 | static bool power_on = false; /* Is the power turned on? */ | 31 | extern bool lcd_on; /* lcd-memframe.c */ |
32 | static bool power_on = false; /* Is the power turned on? */ | ||
35 | 33 | ||
36 | /* Reverse Flag */ | 34 | /* Reverse Flag */ |
37 | #define R_DISP_CONTROL_NORMAL 0x0004 | 35 | #define R_DISP_CONTROL_NORMAL 0x0004 |
@@ -309,7 +307,7 @@ static void lcd_display_on(void) | |||
309 | lcd_send_msg(0x70, R_RAM_WRITE_DATA); | 307 | lcd_send_msg(0x70, R_RAM_WRITE_DATA); |
310 | 308 | ||
311 | /* tell that we're on now */ | 309 | /* tell that we're on now */ |
312 | lcd_set_active(true); | 310 | lcd_on = true; |
313 | } | 311 | } |
314 | 312 | ||
315 | 313 | ||
@@ -318,7 +316,7 @@ static void lcd_display_on(void) | |||
318 | static void lcd_display_off(void) | 316 | static void lcd_display_off(void) |
319 | { | 317 | { |
320 | /* block drawing operations and changing of first */ | 318 | /* block drawing operations and changing of first */ |
321 | lcd_set_active(false); | 319 | lcd_on = false; |
322 | 320 | ||
323 | /* NO2-0=01, SDT1-0=00, EQ1-0=00, DIV1-0=00, RTN3-0=0000 */ | 321 | /* NO2-0=01, SDT1-0=00, EQ1-0=00, DIV1-0=00, RTN3-0=0000 */ |
324 | lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x4000); | 322 | lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x4000); |
@@ -422,7 +420,7 @@ void lcd_init_device(void) | |||
422 | LCD_FB_BASE_REG = (long)lcd_driver_framebuffer; | 420 | LCD_FB_BASE_REG = (long)lcd_driver_framebuffer; |
423 | 421 | ||
424 | power_on = true; | 422 | power_on = true; |
425 | lcd_set_active(true); | 423 | lcd_on = true; |
426 | 424 | ||
427 | lcd_set_invert_display(false); | 425 | lcd_set_invert_display(false); |
428 | lcd_set_flip(false); | 426 | lcd_set_flip(false); |
@@ -434,7 +432,7 @@ void lcd_init_device(void) | |||
434 | #if defined(HAVE_LCD_ENABLE) | 432 | #if defined(HAVE_LCD_ENABLE) |
435 | void lcd_enable(bool on) | 433 | void lcd_enable(bool on) |
436 | { | 434 | { |
437 | if (on == lcd_active()) | 435 | if (on == lcd_on) |
438 | return; | 436 | return; |
439 | 437 | ||
440 | if (on) | 438 | if (on) |
@@ -465,9 +463,8 @@ void lcd_sleep(void) | |||
465 | if (power_on) | 463 | if (power_on) |
466 | { | 464 | { |
467 | /* Turn off display */ | 465 | /* Turn off display */ |
468 | if (lcd_active()) | 466 | if (lcd_on) |
469 | lcd_display_off(); | 467 | lcd_display_off(); |
470 | |||
471 | power_on = false; | 468 | power_on = false; |
472 | } | 469 | } |
473 | 470 | ||
@@ -499,7 +496,7 @@ void lcd_set_invert_display(bool yesno) | |||
499 | r_disp_control_rev = yesno ? R_DISP_CONTROL_REV : | 496 | r_disp_control_rev = yesno ? R_DISP_CONTROL_REV : |
500 | R_DISP_CONTROL_NORMAL; | 497 | R_DISP_CONTROL_NORMAL; |
501 | 498 | ||
502 | if (lcd_active()) | 499 | if (lcd_on) |
503 | { | 500 | { |
504 | /* PT1-0=00, VLE2-1=00, SPT=0, IB6(??)=1, GON=1, CL=0, | 501 | /* PT1-0=00, VLE2-1=00, SPT=0, IB6(??)=1, GON=1, CL=0, |
505 | DTE=1, REV=x, D1-0=11 */ | 502 | DTE=1, REV=x, D1-0=11 */ |