summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorMichael Chicoine <mc2739@gmail.com>2010-05-28 12:19:26 +0000
committerMichael Chicoine <mc2739@gmail.com>2010-05-28 12:19:26 +0000
commit0ae59df3fa49a31889d4889c5c8bad1c9519379a (patch)
tree7abd5881c63b137e1928f7c5be627e1cc8801138 /firmware/target
parentbdb6bf553596918d0d329670dcc8c370d645608e (diff)
Simplify lcd invert
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26353 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index 5a4c58f5b3..438020fb68 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -79,11 +79,6 @@ static bool display_on = false; /* is the display turned on? */
#define R_ENTRY_MODE_VERT 0x7038
#define R_ENTRY_MODE_SOLID_VERT 0x1038
-/* Reverse Flag */
-#define R_DISP_CONTROL_NORMAL 0x0004
-#define R_DISP_CONTROL_REV 0x0000
-static unsigned short r_disp_control_rev = R_DISP_CONTROL_NORMAL;
-
static inline void lcd_delay(int x)
{
do {
@@ -148,12 +143,9 @@ void lcd_set_contrast(int val)
void lcd_set_invert_display(bool yesno)
{
- r_disp_control_rev = yesno ? R_DISP_CONTROL_REV :
- R_DISP_CONTROL_NORMAL;
-
if (display_on)
{
- lcd_write_reg(R_DISP_CONTROL1, 0x0033 | r_disp_control_rev);
+ lcd_write_reg(R_DISP_CONTROL1, yesno ? 0x33 : 0x37);
}
}
@@ -195,7 +187,7 @@ static void _display_on(void)
lcd_write_reg(R_COMPARE_REG2, 0);
/* GON = 0, DTE = 0, D1-0 = 00b */
- lcd_write_reg(R_DISP_CONTROL1, 0x0000 | r_disp_control_rev);
+ lcd_write_reg(R_DISP_CONTROL1, 0x0000);
/* Front porch lines: 2; Back porch lines: 2; */
lcd_write_reg(R_DISP_CONTROL2, 0x0203);
@@ -269,7 +261,7 @@ static void _display_on(void)
lcd_write_reg(R_1ST_SCR_DRV_POS, (LCD_HEIGHT-1) << 8);
lcd_write_reg(R_2ND_SCR_DRV_POS, (LCD_HEIGHT-1) << 8);
- lcd_write_reg(R_DISP_CONTROL1, 0x0033 | r_disp_control_rev);
+ lcd_write_reg(R_DISP_CONTROL1, 0x0037);
display_on = true; /* must be done before calling lcd_update() */
lcd_update();