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
|
#define BACKLIGHT_FULL_INIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||||
|
int backlight_brightness = DEFAULT_BRIGHTNESS_SETTING;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_BACKLIGHT_SW_FADING
|
#ifdef USE_BACKLIGHT_SW_FADING
|
||||||
#include "backlight-thread-fading.h"
|
#include "backlight-thread-fading.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -139,10 +143,6 @@ static int backlight_timeout_plugged = 5*HZ;
|
||||||
static int backlight_on_button_hold = 0;
|
static int backlight_on_button_hold = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
|
||||||
int backlight_brightness = DEFAULT_BRIGHTNESS_SETTING;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_BUTTON_LIGHT
|
#ifdef HAVE_BUTTON_LIGHT
|
||||||
static int buttonlight_timer;
|
static int buttonlight_timer;
|
||||||
int _buttonlight_timeout = 5*HZ;
|
int _buttonlight_timeout = 5*HZ;
|
||||||
|
|
@ -928,8 +928,8 @@ void backlight_set_brightness(int val)
|
||||||
else if (val > MAX_BRIGHTNESS_SETTING)
|
else if (val > MAX_BRIGHTNESS_SETTING)
|
||||||
val = MAX_BRIGHTNESS_SETTING;
|
val = MAX_BRIGHTNESS_SETTING;
|
||||||
|
|
||||||
_backlight_set_brightness(val);
|
|
||||||
backlight_brightness = val;
|
backlight_brightness = val;
|
||||||
|
_backlight_set_brightness(val);
|
||||||
#ifdef USE_BACKLIGHT_SW_FADING
|
#ifdef USE_BACKLIGHT_SW_FADING
|
||||||
/* receive backlight brightness */
|
/* receive backlight brightness */
|
||||||
_backlight_fade_update_state(val);
|
_backlight_fade_update_state(val);
|
||||||
|
|
|
||||||
|
|
@ -43,8 +43,6 @@ void backlight_set_fade_in(bool value);
|
||||||
void backlight_set_fade_out(bool value);
|
void backlight_set_fade_out(bool value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int backlight_brightness;
|
|
||||||
|
|
||||||
void backlight_set_timeout_plugged(int value);
|
void backlight_set_timeout_plugged(int value);
|
||||||
|
|
||||||
#ifdef HAS_BUTTON_HOLD
|
#ifdef HAS_BUTTON_HOLD
|
||||||
|
|
@ -82,6 +80,7 @@ void sim_remote_backlight(int value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||||
|
extern int backlight_brightness;
|
||||||
void backlight_set_brightness(int val);
|
void backlight_set_brightness(int val);
|
||||||
#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
|
#endif /* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,9 @@
|
||||||
|
|
||||||
/* define this if the backlight thread is used for fade, not for sim, needs
|
/* define this if the backlight thread is used for fade, not for sim, needs
|
||||||
* HAVE_BACKLIGHT_BRIGHTNESS */
|
* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||||
|
#ifndef BOOTLOADER
|
||||||
#define USE_BACKLIGHT_SW_FADING
|
#define USE_BACKLIGHT_SW_FADING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if you have a PortalPlayer PP5024 */
|
/* Define this if you have a PortalPlayer PP5024 */
|
||||||
#define CONFIG_CPU PP5022
|
#define CONFIG_CPU PP5022
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,9 @@
|
||||||
|
|
||||||
/* define this if the backlight thread is used for fade, not for sim, needs
|
/* define this if the backlight thread is used for fade, not for sim, needs
|
||||||
* HAVE_BACKLIGHT_BRIGHTNESS */
|
* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||||
|
#ifndef BOOTLOADER
|
||||||
#define USE_BACKLIGHT_SW_FADING
|
#define USE_BACKLIGHT_SW_FADING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if you have a TCC7801 */
|
/* Define this if you have a TCC7801 */
|
||||||
#define CONFIG_CPU TCC7801
|
#define CONFIG_CPU TCC7801
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,9 @@
|
||||||
|
|
||||||
/* define this if the backlight thread is used for fade, not for sim, needs
|
/* define this if the backlight thread is used for fade, not for sim, needs
|
||||||
* HAVE_BACKLIGHT_BRIGHTNESS */
|
* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||||
|
#ifndef BOOTLOADER
|
||||||
#define USE_BACKLIGHT_SW_FADING
|
#define USE_BACKLIGHT_SW_FADING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if you have a PortalPlayer PP5024 */
|
/* Define this if you have a PortalPlayer PP5024 */
|
||||||
#define CONFIG_CPU PP5024
|
#define CONFIG_CPU PP5024
|
||||||
|
|
|
||||||
|
|
@ -116,8 +116,9 @@
|
||||||
|
|
||||||
/* define this if the backlight thread is used for fade, not for sim, needs
|
/* define this if the backlight thread is used for fade, not for sim, needs
|
||||||
* HAVE_BACKLIGHT_BRIGHTNESS */
|
* HAVE_BACKLIGHT_BRIGHTNESS */
|
||||||
|
#ifndef BOOTLOADER
|
||||||
#define USE_BACKLIGHT_SW_FADING
|
#define USE_BACKLIGHT_SW_FADING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if your LCD can be enabled/disabled */
|
/* Define this if your LCD can be enabled/disabled */
|
||||||
#define HAVE_LCD_ENABLE
|
#define HAVE_LCD_ENABLE
|
||||||
|
|
|
||||||
|
|
@ -124,8 +124,11 @@
|
||||||
|
|
||||||
#ifndef SIMULATOR
|
#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
|
#define USE_BACKLIGHT_SW_FADING
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if your LCD can set contrast */
|
/* Define this if your LCD can set contrast */
|
||||||
#define HAVE_LCD_CONTRAST
|
#define HAVE_LCD_CONTRAST
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,8 @@
|
||||||
#include "ascodec-target.h"
|
#include "ascodec-target.h"
|
||||||
#include "as3514.h"
|
#include "as3514.h"
|
||||||
|
|
||||||
static unsigned short backlight_brightness = DEFAULT_BRIGHTNESS_SETTING;
|
|
||||||
|
|
||||||
void _backlight_set_brightness(int brightness)
|
void _backlight_set_brightness(int brightness)
|
||||||
{
|
{
|
||||||
backlight_brightness = brightness;
|
|
||||||
|
|
||||||
if (brightness > 0)
|
if (brightness > 0)
|
||||||
_backlight_on();
|
_backlight_on();
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
void _backlight_on(void);
|
void _backlight_on(void);
|
||||||
void _backlight_off(void);
|
void _backlight_off(void);
|
||||||
void _backlight_set_brightness(int brightness);
|
void _backlight_set_brightness(int brightness);
|
||||||
int __backlight_is_on(void);
|
|
||||||
#ifdef HAVE_BUTTON_LIGHT
|
#ifdef HAVE_BUTTON_LIGHT
|
||||||
void _buttonlight_on(void);
|
void _buttonlight_on(void);
|
||||||
void _buttonlight_off(void);
|
void _buttonlight_off(void);
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,6 @@ enum buttonlight_states
|
||||||
BUTTONLIGHT_CONTROL_FADE,
|
BUTTONLIGHT_CONTROL_FADE,
|
||||||
} buttonlight_control;
|
} buttonlight_control;
|
||||||
|
|
||||||
|
|
||||||
static unsigned char backlight_brightness;
|
|
||||||
static unsigned char buttonlight_brightness;
|
static unsigned char buttonlight_brightness;
|
||||||
static unsigned char backlight_target;
|
static unsigned char backlight_target;
|
||||||
static unsigned char buttonlight_target;
|
static unsigned char buttonlight_target;
|
||||||
|
|
@ -74,11 +72,6 @@ static unsigned short buttonlight_trigger_now;
|
||||||
/* Assumes that the backlight has been initialized */
|
/* Assumes that the backlight has been initialized */
|
||||||
void _backlight_set_brightness(int brightness)
|
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;
|
backlight_control = BACKLIGHT_CONTROL_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,7 +153,7 @@ static void led_control_service(void)
|
||||||
if(!(sc606regCONFval&0x03))
|
if(!(sc606regCONFval&0x03))
|
||||||
break;
|
break;
|
||||||
sc606_changed=true;
|
sc606_changed=true;
|
||||||
sc606regAval=backlight_brightness;
|
sc606regAval=log_brightness[backlight_brightness - 1];
|
||||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||||
break;
|
break;
|
||||||
case BACKLIGHT_CONTROL_FADE:
|
case BACKLIGHT_CONTROL_FADE:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue