summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-01-26 23:21:49 +0000
committerThomas Martitz <kugel@rockbox.org>2009-01-26 23:21:49 +0000
commit12a0ed3b8dd5d8996abf827115f526e21e838872 (patch)
tree00ec62e04cf0e4bc4ea9c7bc0f5b8893e198c7cd /firmware/target
parent4e1b7bf7286c3994e34ca11f740a2165d9b5a001 (diff)
Commit FS#9724, which reworks the preprocessor defines related to backlight fading to a CONFIG_BACKLIGHT_FADING style. The apps/ code will only see which setting is supposed to be used, specific backlight fading handling is kept in firmware, slightly reword the manual text about software fading too with regards to the Gigabeat S
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19860 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/backlight-e200v2-fuze.c4
-rw-r--r--firmware/target/arm/ipod/backlight-target.h3
-rw-r--r--firmware/target/arm/philips/sa9200/backlight-sa9200.c7
-rw-r--r--firmware/target/arm/sandisk/backlight-c200_e200.c7
4 files changed, 13 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/backlight-e200v2-fuze.c b/firmware/target/arm/as3525/backlight-e200v2-fuze.c
index c26d3919c3..465713a1fc 100644
--- a/firmware/target/arm/as3525/backlight-e200v2-fuze.c
+++ b/firmware/target/arm/as3525/backlight-e200v2-fuze.c
@@ -39,7 +39,9 @@ void _backlight_on(void)
#ifdef HAVE_LCD_ENABLE
lcd_enable(true); /* power on lcd + visible display */
#endif
-#ifndef USE_BACKLIGHT_SW_FADING
+#if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING) /* in bootloader/sim */
+ /* if we set the brightness to the settings value, then fading up
+ * is glitchy */
ascodec_write(AS3514_DCDC15, backlight_brightness);
#endif
}
diff --git a/firmware/target/arm/ipod/backlight-target.h b/firmware/target/arm/ipod/backlight-target.h
index 3c4bc04521..ce1b938526 100644
--- a/firmware/target/arm/ipod/backlight-target.h
+++ b/firmware/target/arm/ipod/backlight-target.h
@@ -50,7 +50,8 @@ bool _backlight_init(void);
void _backlight_on(void);
void _backlight_off(void);
-#elif defined HAVE_BACKLIGHT_PWM_FADING /* Mini G1, G2 */
+/* Mini G1, G2, Video, Nano */
+#elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
#define _backlight_init() true
void _backlight_hw_on(void);
diff --git a/firmware/target/arm/philips/sa9200/backlight-sa9200.c b/firmware/target/arm/philips/sa9200/backlight-sa9200.c
index 4221959a0d..5c967a84ea 100644
--- a/firmware/target/arm/philips/sa9200/backlight-sa9200.c
+++ b/firmware/target/arm/philips/sa9200/backlight-sa9200.c
@@ -39,15 +39,16 @@ void _backlight_on(void)
#ifdef HAVE_LCD_ENABLE
lcd_enable(true); /* power on lcd + visible display */
#endif
-#ifndef USE_BACKLIGHT_SW_FADING
- /* that part ain't useful when fading */
+#if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING) /* in bootloader/sim */
+ /* if we set the brightness to the settings value, then fading up
+ * is glitchy */
_backlight_set_brightness(backlight_brightness);
#endif
}
void _backlight_off(void)
{
- ascodec_write(AS3514_DCDC15, 0x0);
+ _backlight_set_brightness(0);
#ifdef HAVE_LCD_ENABLE
lcd_enable(false); /* power off visible display */
#endif
diff --git a/firmware/target/arm/sandisk/backlight-c200_e200.c b/firmware/target/arm/sandisk/backlight-c200_e200.c
index 67e0cddac9..5a2e98a278 100644
--- a/firmware/target/arm/sandisk/backlight-c200_e200.c
+++ b/firmware/target/arm/sandisk/backlight-c200_e200.c
@@ -39,15 +39,16 @@ void _backlight_on(void)
#ifdef HAVE_LCD_ENABLE
lcd_enable(true); /* power on lcd + visible display */
#endif
-#ifndef USE_BACKLIGHT_SW_FADING
- /* that part ain't useful when fading */
+#if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING) /* in bootloader/sim */
+ /* if we set the brightness to the settings value, then fading up
+ * is glitchy */
_backlight_set_brightness(backlight_brightness);
#endif
}
void _backlight_off(void)
{
- ascodec_write(AS3514_DCDC15, 0x0);
+ _backlight_set_brightness(0);
#ifdef HAVE_LCD_ENABLE
lcd_enable(false); /* power off visible display */
#endif