summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-14 20:26:20 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-14 20:26:20 +0000
commit41b235dacffda5a9970c913de18ad8eea74ab4d0 (patch)
treedfc8586c487941d360cce5be8cbf88fc01a99430
parent14698f5a20fe67606df35ccf279b02c81f4959d5 (diff)
downloadrockbox-41b235dacffda5a9970c913de18ad8eea74ab4d0.tar.gz
rockbox-41b235dacffda5a9970c913de18ad8eea74ab4d0.zip
Fix red. No bother with lcd power management calls in bootloader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17508 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/config-e200.h2
-rw-r--r--firmware/export/config-gigabeat.h2
-rw-r--r--firmware/export/config-h10.h2
-rw-r--r--firmware/export/config-iaudiox5.h2
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c2
-rw-r--r--firmware/target/coldfire/iaudio/x5/backlight-x5.c23
6 files changed, 19 insertions, 14 deletions
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index 58b736e27c..3a4ab69082 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -47,6 +47,7 @@
47#define LCD_DEPTH 16 /* 65536 colours */ 47#define LCD_DEPTH 16 /* 65536 colours */
48#define LCD_PIXELFORMAT RGB565 /* rgb565 */ 48#define LCD_PIXELFORMAT RGB565 /* rgb565 */
49 49
50#ifndef BOOTLOADER
50/* define this if you have LCD enable function */ 51/* define this if you have LCD enable function */
51#define HAVE_LCD_ENABLE 52#define HAVE_LCD_ENABLE
52 53
@@ -54,6 +55,7 @@
54 should be defined as well. */ 55 should be defined as well. */
55#define HAVE_LCD_SLEEP 56#define HAVE_LCD_SLEEP
56#define HAVE_LCD_SLEEP_SETTING 57#define HAVE_LCD_SLEEP_SETTING
58#endif
57 59
58/* define this if you can flip your LCD */ 60/* define this if you can flip your LCD */
59#define HAVE_LCD_FLIP 61#define HAVE_LCD_FLIP
diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h
index 816796b706..8a11c936ff 100644
--- a/firmware/export/config-gigabeat.h
+++ b/firmware/export/config-gigabeat.h
@@ -38,6 +38,7 @@
38#define LCD_DEPTH 16 /* 65k colours */ 38#define LCD_DEPTH 16 /* 65k colours */
39#define LCD_PIXELFORMAT RGB565 /* rgb565 */ 39#define LCD_PIXELFORMAT RGB565 /* rgb565 */
40 40
41#ifndef BOOTLOADER
41/* Define this if your LCD can be enabled/disabled */ 42/* Define this if your LCD can be enabled/disabled */
42#define HAVE_LCD_ENABLE 43#define HAVE_LCD_ENABLE
43 44
@@ -47,6 +48,7 @@
47/* We don't use a setting but a fixed delay after the backlight has 48/* We don't use a setting but a fixed delay after the backlight has
48 * turned off */ 49 * turned off */
49#define LCD_SLEEP_TIMEOUT (5*HZ) 50#define LCD_SLEEP_TIMEOUT (5*HZ)
51#endif /* BOOTLOADER */
50 52
51#define CONFIG_KEYPAD GIGABEAT_PAD 53#define CONFIG_KEYPAD GIGABEAT_PAD
52 54
diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h
index 7e64494061..071fb0f650 100644
--- a/firmware/export/config-h10.h
+++ b/firmware/export/config-h10.h
@@ -47,6 +47,7 @@
47#define LCD_DEPTH 16 /* 65536 colours */ 47#define LCD_DEPTH 16 /* 65536 colours */
48#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ 48#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */
49 49
50#ifndef BOOTLOADER
50/* Define this if your LCD can be enabled/disabled */ 51/* Define this if your LCD can be enabled/disabled */
51#define HAVE_LCD_ENABLE 52#define HAVE_LCD_ENABLE
52 53
@@ -55,6 +56,7 @@
55 * We can currently put the lcd to sleep but it won't wake up properly */ 56 * We can currently put the lcd to sleep but it won't wake up properly */
56#define HAVE_LCD_SLEEP 57#define HAVE_LCD_SLEEP
57#define HAVE_LCD_SLEEP_SETTING 58#define HAVE_LCD_SLEEP_SETTING
59#endif
58 60
59/* define this if you can flip your LCD */ 61/* define this if you can flip your LCD */
60#define HAVE_LCD_FLIP 62#define HAVE_LCD_FLIP
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index d0a107b28d..0d6e50053f 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -59,6 +59,7 @@
59 59
60#define LCD_REMOTE_PIXELFORMAT VERTICAL_INTERLEAVED 60#define LCD_REMOTE_PIXELFORMAT VERTICAL_INTERLEAVED
61 61
62#ifndef BOOTLOADER
62/* Define this if your LCD can be enabled/disabled */ 63/* Define this if your LCD can be enabled/disabled */
63#define HAVE_LCD_ENABLE 64#define HAVE_LCD_ENABLE
64 65
@@ -66,6 +67,7 @@
66 should be defined as well. */ 67 should be defined as well. */
67#define HAVE_LCD_SLEEP 68#define HAVE_LCD_SLEEP
68#define HAVE_LCD_SLEEP_SETTING 69#define HAVE_LCD_SLEEP_SETTING
70#endif
69 71
70#define CONFIG_KEYPAD IAUDIO_X5M5_PAD 72#define CONFIG_KEYPAD IAUDIO_X5M5_PAD
71 73
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
index 5c268f42b8..673f76d616 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
@@ -40,7 +40,7 @@ extern struct viewport* current_vp;
40extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src, 40extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src,
41 int width, int height); 41 int width, int height);
42 42
43bool lcd_enabled() 43bool lcd_enabled(void)
44{ 44{
45 return lcd_on; 45 return lcd_on;
46} 46}
diff --git a/firmware/target/coldfire/iaudio/x5/backlight-x5.c b/firmware/target/coldfire/iaudio/x5/backlight-x5.c
index 13ccad5adf..2a5da7615c 100644
--- a/firmware/target/coldfire/iaudio/x5/backlight-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/backlight-x5.c
@@ -35,9 +35,11 @@ bool _backlight_init(void)
35void _backlight_on(void) 35void _backlight_on(void)
36{ 36{
37 int level; 37 int level;
38 lcd_enable(true); 38#ifdef HAVE_LCD_SLEEP
39#ifndef BOOTLOADER 39 backlight_lcd_sleep_countdown(false); /* stop counter */
40 _lcd_sleep_timer = 0; /* LCD should be awake already */ 40#endif
41#ifdef HAVE_LCD_ENABLE
42 lcd_enable(true); /* power on lcd + visible display */
41#endif 43#endif
42 level = disable_irq_save(); 44 level = disable_irq_save();
43 pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */ 45 pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */
@@ -49,16 +51,11 @@ void _backlight_off(void)
49 int level = disable_irq_save(); 51 int level = disable_irq_save();
50 pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */ 52 pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */
51 restore_irq(level); 53 restore_irq(level);
52 lcd_enable(false); 54#ifdef HAVE_LCD_ENABLE
53#ifndef BOOTLOADER 55 lcd_enable(false); /* power off visible display */
54 /* Start LCD sleep countdown */ 56#endif
55 if (_lcd_sleep_timeout < 0) 57#ifdef HAVE_LCD_SLEEP
56 { 58 backlight_lcd_sleep_countdown(true); /* start countdown */
57 _lcd_sleep_timer = 0; /* Setting == Always */
58 lcd_sleep();
59 }
60 else
61 _lcd_sleep_timer = _lcd_sleep_timeout;
62#endif 59#endif
63} 60}
64 61