diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/ipod/backlight-target.h | 12 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/backlight-meg-fx.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/backlight-c200_e200.c | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/firmware/target/arm/ipod/backlight-target.h b/firmware/target/arm/ipod/backlight-target.h index 1a23ecf8be..4190739474 100644 --- a/firmware/target/arm/ipod/backlight-target.h +++ b/firmware/target/arm/ipod/backlight-target.h @@ -27,6 +27,12 @@ void _backlight_led_on(void); void _backlight_led_off(void); void _backlight_hw_enable(bool on); +#ifdef BOOTLOADER +#define _backlight_on() do { _backlight_hw_enable(true); \ + _backlight_led_on(); } while(0) +#define _backlight_off() do { _backlight_led_off(); \ + _backlight_hw_enable(false); } while(0) +#else /* !BOOTLOADER */ #define _backlight_on_isr() _backlight_led_on() #define _backlight_off_isr() _backlight_led_off() #define _backlight_on_normal() do { _backlight_hw_enable(true); \ @@ -34,6 +40,7 @@ void _backlight_hw_enable(bool on); #define _backlight_off_normal() do { _backlight_led_off(); \ _backlight_hw_enable(false); } while(0) #define _BACKLIGHT_FADE_ENABLE +#endif /* !BOOTLOADER */ #elif defined HAVE_BACKLIGHT_PWM_FADING @@ -41,10 +48,15 @@ void _backlight_hw_enable(bool on); void _backlight_hw_on(void); void _backlight_hw_off(void); +#ifdef BOOTLOADER +#define _backlight_on() _backlight_hw_on() +#define _backlight_off() _backlight_hw_off() +#else #define _backlight_on_isr() _backlight_hw_on() #define _backlight_off_isr() _backlight_hw_off() #define _backlight_on_normal() _backlight_hw_on() #define _backlight_off_normal() _backlight_hw_off() +#endif #else diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/backlight-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/backlight-meg-fx.c index ee8801f99b..645f3c1e09 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/backlight-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/backlight-meg-fx.c @@ -377,9 +377,11 @@ void _buttonlight_on(void) void _buttonlight_off(void) { +#ifndef BOOTLOADER if(_buttonlight_timeout>0) __buttonlight_dim(true); else +#endif __buttonlight_off(); } diff --git a/firmware/target/arm/sandisk/backlight-c200_e200.c b/firmware/target/arm/sandisk/backlight-c200_e200.c index fad1018d38..9eeb05072e 100644 --- a/firmware/target/arm/sandisk/backlight-c200_e200.c +++ b/firmware/target/arm/sandisk/backlight-c200_e200.c @@ -41,7 +41,7 @@ void _backlight_on(void) #ifdef HAVE_LCD_ENABLE lcd_enable(true); /* power on lcd */ #endif -#ifdef HAVE_LCD_SLEEP +#if defined(HAVE_LCD_SLEEP) && !defined(BOOTLOADER) _lcd_sleep_timer = 0; /* LCD should be awake already */ #endif pp_i2c_send(AS3514_I2C_ADDR, DCDC15, backlight_brightness); @@ -53,7 +53,7 @@ void _backlight_off(void) #ifdef HAVE_LCD_ENABLE lcd_enable(false); /* power off lcd */ #endif -#ifdef HAVE_LCD_SLEEP +#if defined(HAVE_LCD_SLEEP) && !defined(BOOTLOADER) /* Start LCD sleep countdown */ if (_lcd_sleep_timeout < 0) { |