summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/iriver
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-03-17 04:01:11 +0000
committerThomas Martitz <kugel@rockbox.org>2009-03-17 04:01:11 +0000
commit9771c9c77190910309901ceaf3400b3e2c94a536 (patch)
tree584c2302ad0c825635a3af1c28ccd742c86fcf1e /firmware/target/arm/iriver
parent7e7d8ebfefc047f92ead430a79b3444b95b919a5 (diff)
downloadrockbox-9771c9c77190910309901ceaf3400b3e2c94a536.tar.gz
rockbox-9771c9c77190910309901ceaf3400b3e2c94a536.tar.bz2
rockbox-9771c9c77190910309901ceaf3400b3e2c94a536.zip
One more try: Fix remaining reds and yellows
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20335 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver')
-rw-r--r--firmware/target/arm/iriver/h10/lcd-h10_20gb.c71
1 files changed, 36 insertions, 35 deletions
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
index 5bc2ebc2b3..7b42dfe4d9 100644
--- a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
+++ b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
@@ -274,6 +274,7 @@ static void lcd_power_on(void)
power_on = true;
}
+#ifdef HAVE_LCD_SLEEP
static void lcd_power_off(void)
{
/* Display must be off first */
@@ -302,32 +303,17 @@ static void lcd_power_off(void)
lcd_write_reg(R_POWER_CONTROL1, 0x0000);
}
-static void lcd_display_on(void)
+void lcd_sleep(void)
{
- /* Be sure power is on first */
- if (!power_on)
- lcd_power_on();
-
- /** Display ON Sequence **/
- /* Per datasheet Rev.1.10, Jun.21.2003, p. 97 */
-
- /* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=01 */
- lcd_write_reg(R_DISP_CONTROL, 0x0001);
-
- sleep(HZ/25); /* Wait 2 frames or more */
-
- /* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=01 */
- lcd_write_reg(R_DISP_CONTROL, 0x0021 | disp_control_rev);
- /* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=11 */
- lcd_write_reg(R_DISP_CONTROL, 0x0023 | disp_control_rev);
-
- sleep(HZ/25); /* Wait 2 frames or more */
-
- /* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=1, REV=x, D1-0=11 */
- lcd_write_reg(R_DISP_CONTROL, 0x0033 | disp_control_rev);
+ if (power_on)
+ lcd_power_off();
- display_on = true;
+ /* Set standby mode */
+ /* BT2-0=000, DC2-0=000, AP2-0=000, SLP=0, STB=1 */
+ lcd_write_reg(R_POWER_CONTROL1, 0x0001);
}
+#endif
+
static void lcd_display_off(void)
{
@@ -353,6 +339,33 @@ static void lcd_display_off(void)
}
#if defined(HAVE_LCD_ENABLE)
+static void lcd_display_on(void)
+{
+ /* Be sure power is on first */
+ if (!power_on)
+ lcd_power_on();
+
+ /** Display ON Sequence **/
+ /* Per datasheet Rev.1.10, Jun.21.2003, p. 97 */
+
+ /* PT1-0=00, VLE2-1=00, SPT=0, GON=0, DTE=0, REV=0, D1-0=01 */
+ lcd_write_reg(R_DISP_CONTROL, 0x0001);
+
+ sleep(HZ/25); /* Wait 2 frames or more */
+
+ /* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=01 */
+ lcd_write_reg(R_DISP_CONTROL, 0x0021 | disp_control_rev);
+ /* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=0, REV=x, D1-0=11 */
+ lcd_write_reg(R_DISP_CONTROL, 0x0023 | disp_control_rev);
+
+ sleep(HZ/25); /* Wait 2 frames or more */
+
+ /* PT1-0=00, VLE2-1=00, SPT=0, GON=1, DTE=1, REV=x, D1-0=11 */
+ lcd_write_reg(R_DISP_CONTROL, 0x0033 | disp_control_rev);
+
+ display_on = true;
+}
+
void lcd_enable(bool on)
{
if (on == display_on)
@@ -373,18 +386,6 @@ void lcd_enable(bool on)
}
#endif
-#ifdef HAVE_LCD_SLEEP
-void lcd_sleep(void)
-{
- if (power_on)
- lcd_power_off();
-
- /* Set standby mode */
- /* BT2-0=000, DC2-0=000, AP2-0=000, SLP=0, STB=1 */
- lcd_write_reg(R_POWER_CONTROL1, 0x0001);
-}
-#endif
-
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
bool lcd_active(void)
{