mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Get rid of stupid _backlight_* function names
_remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
This commit is contained in:
parent
2a3e1628a5
commit
89ba7e818c
148 changed files with 679 additions and 687 deletions
|
|
@ -74,7 +74,7 @@ static unsigned char buttonlight_target;
|
|||
static unsigned short buttonlight_trigger_now;
|
||||
|
||||
/* Assumes that the backlight has been initialized */
|
||||
void _backlight_set_brightness(int brightness)
|
||||
void backlight_hw_brightness(int brightness)
|
||||
{
|
||||
/* stop the interrupt from messing us up */
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
|
|
@ -335,7 +335,7 @@ static void __backlight_dim(bool dim_now)
|
|||
backlight_control = BACKLIGHT_CONTROL_FADE;
|
||||
}
|
||||
|
||||
void _backlight_on(void)
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true); /* power on lcd + visible display */
|
||||
|
|
@ -343,7 +343,7 @@ void _backlight_on(void)
|
|||
__backlight_dim(false);
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
__backlight_dim(true);
|
||||
}
|
||||
|
|
@ -373,12 +373,12 @@ static void __buttonlight_dim(bool dim_now)
|
|||
buttonlight_control = BUTTONLIGHT_CONTROL_FADE;
|
||||
}
|
||||
|
||||
void _buttonlight_on(void)
|
||||
void buttonlight_hw_on(void)
|
||||
{
|
||||
__buttonlight_dim(false);
|
||||
}
|
||||
|
||||
void _buttonlight_off(void)
|
||||
void buttonlight_hw_off(void)
|
||||
{
|
||||
#ifndef BOOTLOADER
|
||||
if(buttonlight_get_current_timeout() > 0)
|
||||
|
|
@ -388,7 +388,7 @@ void _buttonlight_off(void)
|
|||
__buttonlight_off();
|
||||
}
|
||||
|
||||
void _buttonlight_set_brightness(int brightness)
|
||||
void buttonlight_hw_brightness(int brightness)
|
||||
{
|
||||
/* stop the interrupt from messing us up */
|
||||
buttonlight_control = BUTTONLIGHT_CONTROL_IDLE;
|
||||
|
|
@ -396,7 +396,7 @@ void _buttonlight_set_brightness(int brightness)
|
|||
buttonlight_control = BUTTONLIGHT_CONTROL_SET;
|
||||
}
|
||||
|
||||
bool _backlight_init(void)
|
||||
bool backlight_hw_init(void)
|
||||
{
|
||||
unsigned char brightness = log_brightness[DEFAULT_BRIGHTNESS_SETTING];
|
||||
buttonlight_brightness = brightness;
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ void __buttonlight_trigger(void);
|
|||
/* See enum buttonlight_mode for available functions */
|
||||
void __buttonlight_mode(enum buttonlight_mode mode);
|
||||
|
||||
bool _backlight_init(void);
|
||||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
void _backlight_set_brightness(int brightness);
|
||||
bool backlight_hw_init(void);
|
||||
void backlight_hw_on(void);
|
||||
void backlight_hw_off(void);
|
||||
void backlight_hw_brightness(int brightness);
|
||||
|
||||
void _buttonlight_set_brightness(int brightness);
|
||||
void _buttonlight_on(void);
|
||||
void _buttonlight_off(void);
|
||||
void buttonlight_hw_brightness(int brightness);
|
||||
void buttonlight_hw_on(void);
|
||||
void buttonlight_hw_off(void);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ void power_off(void)
|
|||
int(*reboot_point)(void);
|
||||
reboot_point=(void*)(unsigned char*) 0x00000000;
|
||||
/* turn off backlight and wait for 1 second */
|
||||
_backlight_off();
|
||||
_buttonlight_off();
|
||||
backlight_hw_off();
|
||||
buttonlight_hw_off();
|
||||
sleep(HZ);
|
||||
|
||||
/* Do this to allow the drive to properly reset when player restarts
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static unsigned char backlight_target;
|
|||
|
||||
|
||||
/* Assumes that the backlight has been initialized */
|
||||
void _backlight_set_brightness(int brightness)
|
||||
void backlight_hw_brightness(int brightness)
|
||||
{
|
||||
if (brightness < 0)
|
||||
brightness = 0;
|
||||
|
|
@ -86,22 +86,22 @@ static void led_control_service(void)
|
|||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
break;
|
||||
case BACKLIGHT_CONTROL_OFF:
|
||||
_backlight_set_brightness(0);
|
||||
backlight_hw_brightness(0);
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
break;
|
||||
case BACKLIGHT_CONTROL_ON:
|
||||
_backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
||||
backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
break;
|
||||
case BACKLIGHT_CONTROL_SET:
|
||||
/* TODO: This is probably wrong since it sets a fixed value.
|
||||
It was a fixed value of 255 before, but that was even more wrong
|
||||
since it accessed the log_brightness buffer out of bounds */
|
||||
_backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
||||
backlight_hw_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
break;
|
||||
case BACKLIGHT_CONTROL_FADE:
|
||||
_backlight_set_brightness(0);
|
||||
backlight_hw_brightness(0);
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -127,7 +127,7 @@ static void __backlight_dim(bool dim_now)
|
|||
backlight_control = BACKLIGHT_CONTROL_FADE;
|
||||
}
|
||||
|
||||
void _backlight_on(void)
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true); /* power on lcd + visible display */
|
||||
|
|
@ -135,13 +135,13 @@ void _backlight_on(void)
|
|||
__backlight_dim(false);
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
__backlight_dim(true);
|
||||
}
|
||||
|
||||
|
||||
bool _backlight_init(void)
|
||||
bool backlight_hw_init(void)
|
||||
{
|
||||
unsigned char brightness = log_brightness[DEFAULT_BRIGHTNESS_SETTING];
|
||||
_backlight_brightness = brightness;
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
#define GPIO_LCD_PWR (1 << 4) /* GPIO.G4 */
|
||||
|
||||
bool _backlight_init(void);
|
||||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
void _backlight_set_brightness(int brightness);
|
||||
bool backlight_hw_init(void);
|
||||
void backlight_hw_on(void);
|
||||
void backlight_hw_off(void);
|
||||
void backlight_hw_brightness(int brightness);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue