mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
Fix reds. Also note my r19221 commit message had a typo - shoudld have been e200/c200, not e100.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19224 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
28f06901f7
commit
b70f575023
10 changed files with 19 additions and 22 deletions
|
|
@ -48,6 +48,10 @@
|
|||
#define BACKLIGHT_FULL_INIT
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
int backlight_brightness = DEFAULT_BRIGHTNESS_SETTING;
|
||||
#endif
|
||||
|
||||
#ifdef USE_BACKLIGHT_SW_FADING
|
||||
#include "backlight-thread-fading.h"
|
||||
#endif
|
||||
|
|
@ -139,10 +143,6 @@ static int backlight_timeout_plugged = 5*HZ;
|
|||
static int backlight_on_button_hold = 0;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
int backlight_brightness = DEFAULT_BRIGHTNESS_SETTING;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
static int buttonlight_timer;
|
||||
int _buttonlight_timeout = 5*HZ;
|
||||
|
|
@ -928,8 +928,8 @@ void backlight_set_brightness(int val)
|
|||
else if (val > MAX_BRIGHTNESS_SETTING)
|
||||
val = MAX_BRIGHTNESS_SETTING;
|
||||
|
||||
_backlight_set_brightness(val);
|
||||
backlight_brightness = val;
|
||||
_backlight_set_brightness(val);
|
||||
#ifdef USE_BACKLIGHT_SW_FADING
|
||||
/* receive backlight brightness */
|
||||
_backlight_fade_update_state(val);
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@ void backlight_set_fade_in(bool value);
|
|||
void backlight_set_fade_out(bool value);
|
||||
#endif
|
||||
|
||||
extern int backlight_brightness;
|
||||
|
||||
void backlight_set_timeout_plugged(int value);
|
||||
|
||||
#ifdef HAS_BUTTON_HOLD
|
||||
|
|
@ -82,6 +80,7 @@ void sim_remote_backlight(int value);
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
extern int backlight_brightness;
|
||||
void backlight_set_brightness(int val);
|
||||
#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,9 @@
|
|||
|
||||
/* 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 a PortalPlayer PP5024 */
|
||||
#define CONFIG_CPU PP5022
|
||||
|
|
|
|||
|
|
@ -124,7 +124,9 @@
|
|||
|
||||
/* 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 a TCC7801 */
|
||||
#define CONFIG_CPU TCC7801
|
||||
|
|
|
|||
|
|
@ -131,7 +131,9 @@
|
|||
|
||||
/* 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 a PortalPlayer PP5024 */
|
||||
#define CONFIG_CPU PP5024
|
||||
|
|
|
|||
|
|
@ -116,8 +116,9 @@
|
|||
|
||||
/* 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 your LCD can be enabled/disabled */
|
||||
#define HAVE_LCD_ENABLE
|
||||
|
|
|
|||
|
|
@ -124,8 +124,11 @@
|
|||
|
||||
#ifndef SIMULATOR
|
||||
|
||||
/* define this if the backlight thread is used for fade, not for sim */
|
||||
/* 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 your LCD can set contrast */
|
||||
#define HAVE_LCD_CONTRAST
|
||||
|
|
|
|||
|
|
@ -26,12 +26,8 @@
|
|||
#include "ascodec-target.h"
|
||||
#include "as3514.h"
|
||||
|
||||
static unsigned short backlight_brightness = DEFAULT_BRIGHTNESS_SETTING;
|
||||
|
||||
void _backlight_set_brightness(int brightness)
|
||||
{
|
||||
backlight_brightness = brightness;
|
||||
|
||||
if (brightness > 0)
|
||||
_backlight_on();
|
||||
else
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
void _backlight_set_brightness(int brightness);
|
||||
int __backlight_is_on(void);
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void _buttonlight_on(void);
|
||||
void _buttonlight_off(void);
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ enum buttonlight_states
|
|||
BUTTONLIGHT_CONTROL_FADE,
|
||||
} buttonlight_control;
|
||||
|
||||
|
||||
static unsigned char backlight_brightness;
|
||||
static unsigned char buttonlight_brightness;
|
||||
static unsigned char backlight_target;
|
||||
static unsigned char buttonlight_target;
|
||||
|
|
@ -74,11 +72,6 @@ static unsigned short buttonlight_trigger_now;
|
|||
/* Assumes that the backlight has been initialized */
|
||||
void _backlight_set_brightness(int brightness)
|
||||
{
|
||||
/* clamp the brightness value */
|
||||
brightness = MAX(1, MIN(12, brightness));
|
||||
/* stop the interrupt from messing us up */
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
backlight_brightness = log_brightness[brightness - 1];
|
||||
backlight_control = BACKLIGHT_CONTROL_SET;
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +153,7 @@ static void led_control_service(void)
|
|||
if(!(sc606regCONFval&0x03))
|
||||
break;
|
||||
sc606_changed=true;
|
||||
sc606regAval=backlight_brightness;
|
||||
sc606regAval=log_brightness[backlight_brightness - 1];
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
break;
|
||||
case BACKLIGHT_CONTROL_FADE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue