diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-14 20:26:20 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-14 20:26:20 +0000 |
| commit | 41b235dacffda5a9970c913de18ad8eea74ab4d0 (patch) | |
| tree | dfc8586c487941d360cce5be8cbf88fc01a99430 | |
| parent | 14698f5a20fe67606df35ccf279b02c81f4959d5 (diff) | |
| download | rockbox-41b235dacffda5a9970c913de18ad8eea74ab4d0.zip rockbox-41b235dacffda5a9970c913de18ad8eea74ab4d0.tar.gz rockbox-41b235dacffda5a9970c913de18ad8eea74ab4d0.tar.bz2 rockbox-41b235dacffda5a9970c913de18ad8eea74ab4d0.tar.xz | |
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.h | 2 | ||||
| -rw-r--r-- | firmware/export/config-gigabeat.h | 2 | ||||
| -rw-r--r-- | firmware/export/config-h10.h | 2 | ||||
| -rw-r--r-- | firmware/export/config-iaudiox5.h | 2 | ||||
| -rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | 2 | ||||
| -rw-r--r-- | firmware/target/coldfire/iaudio/x5/backlight-x5.c | 23 |
6 files changed, 19 insertions, 14 deletions
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h index 58b736e..3a4ab69 100644 --- a/firmware/export/config-e200.h +++ b/firmware/export/config-e200.h @@ -47,6 +47,7 @@ #define LCD_DEPTH 16 /* 65536 colours */ #define LCD_PIXELFORMAT RGB565 /* rgb565 */ +#ifndef BOOTLOADER /* define this if you have LCD enable function */ #define HAVE_LCD_ENABLE @@ -54,6 +55,7 @@ should be defined as well. */ #define HAVE_LCD_SLEEP #define HAVE_LCD_SLEEP_SETTING +#endif /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP diff --git a/firmware/export/config-gigabeat.h b/firmware/export/config-gigabeat.h index 816796b..8a11c93 100644 --- a/firmware/export/config-gigabeat.h +++ b/firmware/export/config-gigabeat.h @@ -38,6 +38,7 @@ #define LCD_DEPTH 16 /* 65k colours */ #define LCD_PIXELFORMAT RGB565 /* rgb565 */ +#ifndef BOOTLOADER /* Define this if your LCD can be enabled/disabled */ #define HAVE_LCD_ENABLE @@ -47,6 +48,7 @@ /* We don't use a setting but a fixed delay after the backlight has * turned off */ #define LCD_SLEEP_TIMEOUT (5*HZ) +#endif /* BOOTLOADER */ #define CONFIG_KEYPAD GIGABEAT_PAD diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index 7e64494..071fb0f 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -47,6 +47,7 @@ #define LCD_DEPTH 16 /* 65536 colours */ #define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */ +#ifndef BOOTLOADER /* Define this if your LCD can be enabled/disabled */ #define HAVE_LCD_ENABLE @@ -55,6 +56,7 @@ * We can currently put the lcd to sleep but it won't wake up properly */ #define HAVE_LCD_SLEEP #define HAVE_LCD_SLEEP_SETTING +#endif /* define this if you can flip your LCD */ #define HAVE_LCD_FLIP diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h index d0a107b..0d6e500 100644 --- a/firmware/export/config-iaudiox5.h +++ b/firmware/export/config-iaudiox5.h @@ -59,6 +59,7 @@ #define LCD_REMOTE_PIXELFORMAT VERTICAL_INTERLEAVED +#ifndef BOOTLOADER /* Define this if your LCD can be enabled/disabled */ #define HAVE_LCD_ENABLE @@ -66,6 +67,7 @@ should be defined as well. */ #define HAVE_LCD_SLEEP #define HAVE_LCD_SLEEP_SETTING +#endif #define CONFIG_KEYPAD IAUDIO_X5M5_PAD 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 5c268f4..673f76d 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; extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src, int width, int height); -bool lcd_enabled() +bool lcd_enabled(void) { return lcd_on; } diff --git a/firmware/target/coldfire/iaudio/x5/backlight-x5.c b/firmware/target/coldfire/iaudio/x5/backlight-x5.c index 13ccad5..2a5da76 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) void _backlight_on(void) { int level; - lcd_enable(true); -#ifndef BOOTLOADER - _lcd_sleep_timer = 0; /* LCD should be awake already */ +#ifdef HAVE_LCD_SLEEP + backlight_lcd_sleep_countdown(false); /* stop counter */ +#endif +#ifdef HAVE_LCD_ENABLE + lcd_enable(true); /* power on lcd + visible display */ #endif level = disable_irq_save(); pcf50606_write(0x38, 0xb0); /* Backlight ON, GPO1INV=1, GPO1ACT=011 */ @@ -49,16 +51,11 @@ void _backlight_off(void) int level = disable_irq_save(); pcf50606_write(0x38, 0x80); /* Backlight OFF, GPO1INV=1, GPO1ACT=000 */ restore_irq(level); - lcd_enable(false); -#ifndef BOOTLOADER - /* Start LCD sleep countdown */ - if (_lcd_sleep_timeout < 0) - { - _lcd_sleep_timer = 0; /* Setting == Always */ - lcd_sleep(); - } - else - _lcd_sleep_timer = _lcd_sleep_timeout; +#ifdef HAVE_LCD_ENABLE + lcd_enable(false); /* power off visible display */ +#endif +#ifdef HAVE_LCD_SLEEP + backlight_lcd_sleep_countdown(true); /* start countdown */ #endif } |