mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -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
|
|
@ -28,22 +28,22 @@
|
|||
static const int log_brightness[12] = {0,4,8,12,20,28,40,60,88,124,176,255};
|
||||
|
||||
/* Returns the current state of the backlight (true=ON, false=OFF). */
|
||||
bool _backlight_init(void)
|
||||
bool backlight_hw_init(void)
|
||||
{
|
||||
return (GPO32_ENABLE & 0x1000000) ? true : false;
|
||||
}
|
||||
|
||||
void _backlight_hw_on(void)
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
GPO32_ENABLE |= 0x1000000;
|
||||
}
|
||||
|
||||
void _backlight_hw_off(void)
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
GPO32_ENABLE &= ~0x1000000;
|
||||
}
|
||||
|
||||
void _buttonlight_set_brightness(int brightness)
|
||||
void buttonlight_hw_brightness(int brightness)
|
||||
{
|
||||
/* clamp the brightness value */
|
||||
brightness = MAX(0, MIN(15, brightness));
|
||||
|
|
@ -51,13 +51,13 @@ void _buttonlight_set_brightness(int brightness)
|
|||
outl(MIN_BRIGHTNESS-(log_brightness[brightness - 1] << 16), 0x7000a010);
|
||||
}
|
||||
|
||||
void _buttonlight_on(void)
|
||||
void buttonlight_hw_on(void)
|
||||
{
|
||||
/* turn on all touchpad leds */
|
||||
GPIOA_OUTPUT_VAL |= BUTTONLIGHT_ALL;
|
||||
}
|
||||
|
||||
void _buttonlight_off(void)
|
||||
void buttonlight_hw_off(void)
|
||||
{
|
||||
/* turn off all touchpad leds */
|
||||
GPIOA_OUTPUT_VAL &= ~BUTTONLIGHT_ALL;
|
||||
|
|
|
|||
|
|
@ -22,23 +22,20 @@
|
|||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
bool _backlight_init(void); /* Returns backlight current state (true=ON). */
|
||||
bool backlight_hw_init(void); /* Returns backlight current state (true=ON). */
|
||||
void _backlight_hw_on(void);
|
||||
void _backlight_hw_off(void);
|
||||
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
void _remote_backlight_on(void);
|
||||
void _remote_backlight_off(void);
|
||||
void remote_backlight_hw_on(void);
|
||||
void remote_backlight_hw_off(void);
|
||||
#endif
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
#define _backlight_on() _backlight_hw_on()
|
||||
#define _backlight_off() _backlight_hw_off()
|
||||
#else
|
||||
#define _backlight_on_isr() _backlight_hw_on()
|
||||
#define _backlight_off_isr() _backlight_hw_off()
|
||||
#define _backlight_on_normal() _backlight_hw_on()
|
||||
#define _backlight_off_normal() _backlight_hw_off()
|
||||
#ifndef BOOTLOADER
|
||||
#define _backlight_on_isr() backlight_hw_on()
|
||||
#define _backlight_off_isr() backlight_hw_off()
|
||||
#define _backlight_on_normal() backlight_hw_on()
|
||||
#define _backlight_off_normal() backlight_hw_off()
|
||||
#define _BACKLIGHT_FADE_BOOST
|
||||
#endif
|
||||
|
||||
|
|
@ -53,8 +50,8 @@ void _remote_backlight_off(void);
|
|||
BUTTONLIGHT_DISPLAY | BUTTONLIGHT_LEFT | \
|
||||
BUTTONLIGHT_RIGHT | BUTTONLIGHT_SCROLL)
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -552,13 +552,13 @@ void lcd_remote_update_rect(int x, int y, int width, int height)
|
|||
rc_status |= RC_UPDATE_LCD;
|
||||
}
|
||||
|
||||
void _remote_backlight_on(void)
|
||||
void remote_backlight_hw_on(void)
|
||||
{
|
||||
rc_status |= RC_BACKLIGHT_ON;
|
||||
rc_status |= RC_UPDATE_CONTROLLER;
|
||||
}
|
||||
|
||||
void _remote_backlight_off(void)
|
||||
void remote_backlight_hw_off(void)
|
||||
{
|
||||
rc_status &= ~RC_BACKLIGHT_ON;
|
||||
rc_status |= RC_UPDATE_CONTROLLER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue