mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 13:45:03 -05:00
Commit part 1 of FS#9663 by Thomas Martitz. Enables backlight fading on the Fuze and e200v2. Also removed a bit of dead code that was copied by accident into the fuze and e200v2 config files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19791 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
da367f4bd4
commit
7278163087
4 changed files with 18 additions and 17 deletions
|
|
@ -463,9 +463,9 @@ static void backlight_set_up_fade_down(void)
|
|||
_backlight_off();
|
||||
/* h300/x5/d2 go to the last known brightness level at backight_on(),which
|
||||
* should be the lowest level to keep fading up glitch free
|
||||
* sansa e200/c200 make the backlight on only by setting the brightness,
|
||||
* so this step would be noticeable */
|
||||
#if !defined(SANSA_E200) && !defined(SANSA_C200)
|
||||
* targets which set brightness over AS3514 I2C make the backlight on only
|
||||
* by setting the brightness, so this step would be noticeable */
|
||||
#if !defined(HAVE_AS3514)
|
||||
_backlight_set_brightness(MIN_BRIGHTNESS_SETTING);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,12 @@
|
|||
/** Non-simulator section **/
|
||||
#ifndef SIMULATOR
|
||||
|
||||
/* define this if the backlight thread is used for fade, not for sim, needs
|
||||
* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||
#ifndef BOOTLOADER
|
||||
#define USE_BACKLIGHT_SW_FADING
|
||||
#endif
|
||||
|
||||
/* Define this if you have an AMS AS3525*/
|
||||
#define CONFIG_CPU AS3525
|
||||
|
||||
|
|
@ -200,8 +206,3 @@
|
|||
#define DEFAULT_REC_MIC_GAIN 23
|
||||
#define DEFAULT_REC_LEFT_GAIN 23
|
||||
#define DEFAULT_REC_RIGHT_GAIN 23
|
||||
|
||||
#ifdef E200R_INSTALLER
|
||||
#define IRAMORIG 0x40004000
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,12 @@
|
|||
/** Non-simulator section **/
|
||||
#ifndef SIMULATOR
|
||||
|
||||
/* define this if the backlight thread is used for fade, not for sim, needs
|
||||
* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||
#ifndef BOOTLOADER
|
||||
#define USE_BACKLIGHT_SW_FADING
|
||||
#endif
|
||||
|
||||
/* Define this if you have an AMS AS3525*/
|
||||
#define CONFIG_CPU AS3525
|
||||
|
||||
|
|
@ -200,8 +206,3 @@
|
|||
#define DEFAULT_REC_MIC_GAIN 23
|
||||
#define DEFAULT_REC_LEFT_GAIN 23
|
||||
#define DEFAULT_REC_RIGHT_GAIN 23
|
||||
|
||||
#ifdef E200R_INSTALLER
|
||||
#define IRAMORIG 0x40004000
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,7 @@
|
|||
|
||||
void _backlight_set_brightness(int brightness)
|
||||
{
|
||||
if (brightness > 0)
|
||||
_backlight_on();
|
||||
else
|
||||
_backlight_off();
|
||||
ascodec_write(AS3514_DCDC15, brightness);
|
||||
}
|
||||
|
||||
void _backlight_on(void)
|
||||
|
|
@ -42,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
|
||||
ascodec_write(AS3514_DCDC15, backlight_brightness);
|
||||
#endif
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue