forked from len0rd/rockbox
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
|
|
@ -29,13 +29,13 @@
|
|||
static const int brightness_vals[16] =
|
||||
{255,237,219,201,183,165,147,130,112,94,76,58,40,22,5,0};
|
||||
|
||||
void _backlight_set_brightness(int brightness)
|
||||
void backlight_hw_brightness(int brightness)
|
||||
{
|
||||
outl(0x80000000 | (brightness_vals[brightness-1] << 16), 0x7000a000);
|
||||
}
|
||||
#endif
|
||||
|
||||
void _backlight_on(void)
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true);
|
||||
|
|
@ -45,7 +45,7 @@ void _backlight_on(void)
|
|||
GPO32_VAL |= 0x400;
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
GPO32_ENABLE |= 0x400;
|
||||
GPO32_VAL &=~0x400;
|
||||
|
|
@ -60,7 +60,7 @@ void _backlight_off(void)
|
|||
static unsigned short buttonight_brightness = DEFAULT_BRIGHTNESS_SETTING - 1;
|
||||
static unsigned short buttonlight_status = 0;
|
||||
|
||||
void _buttonlight_on(void)
|
||||
void buttonlight_hw_on(void)
|
||||
{
|
||||
if (!buttonlight_status)
|
||||
{
|
||||
|
|
@ -69,7 +69,7 @@ void _buttonlight_on(void)
|
|||
}
|
||||
}
|
||||
|
||||
void _buttonlight_off(void)
|
||||
void buttonlight_hw_off(void)
|
||||
{
|
||||
if (buttonlight_status)
|
||||
{
|
||||
|
|
@ -78,7 +78,7 @@ void _buttonlight_off(void)
|
|||
}
|
||||
}
|
||||
|
||||
void _buttonlight_set_brightness(int brightness)
|
||||
void buttonlight_hw_brightness(int brightness)
|
||||
{
|
||||
buttonight_brightness = brightness - 1;
|
||||
touchpad_set_buttonlights(BUTTONLIGHT_MASK, buttonight_brightness);
|
||||
|
|
|
|||
|
|
@ -21,18 +21,18 @@
|
|||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define _backlight_init() true
|
||||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
#define backlight_hw_init() true
|
||||
void backlight_hw_on(void);
|
||||
void backlight_hw_off(void);
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
void _backlight_set_brightness(int brightness);
|
||||
void backlight_hw_brightness(int brightness);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void _buttonlight_on(void);
|
||||
void _buttonlight_off(void);
|
||||
void _buttonlight_set_brightness(int brightness);
|
||||
void buttonlight_hw_on(void);
|
||||
void buttonlight_hw_off(void);
|
||||
void buttonlight_hw_brightness(int brightness);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@
|
|||
static const int brightness_vals[16] =
|
||||
{255,237,219,201,183,165,147,130,112,94,76,58,40,22,5,0};
|
||||
|
||||
void _backlight_set_brightness(int brightness)
|
||||
void backlight_hw_brightness(int brightness)
|
||||
{
|
||||
outl(0x80000000 | (brightness_vals[brightness-1] << 16), 0x7000a000);
|
||||
}
|
||||
#endif
|
||||
|
||||
void _backlight_on(void)
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true);
|
||||
|
|
@ -45,7 +45,7 @@ void _backlight_on(void)
|
|||
GPO32_VAL |= 0x400;
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
GPO32_ENABLE |= 0x400;
|
||||
GPO32_VAL &= ~0x400;
|
||||
|
|
@ -60,7 +60,7 @@ void _backlight_off(void)
|
|||
static unsigned short buttonight_brightness = DEFAULT_BRIGHTNESS_SETTING - 1;
|
||||
static unsigned short buttonlight_status = 0;
|
||||
|
||||
void _buttonlight_on(void)
|
||||
void buttonlight_hw_on(void)
|
||||
{
|
||||
if (!buttonlight_status)
|
||||
{
|
||||
|
|
@ -77,7 +77,7 @@ void _buttonlight_on(void)
|
|||
}
|
||||
}
|
||||
|
||||
void _buttonlight_off(void)
|
||||
void buttonlight_hw_off(void)
|
||||
{
|
||||
if (buttonlight_status)
|
||||
{
|
||||
|
|
@ -89,7 +89,7 @@ void _buttonlight_off(void)
|
|||
}
|
||||
}
|
||||
|
||||
void _buttonlight_set_brightness(int brightness)
|
||||
void buttonlight_hw_brightness(int brightness)
|
||||
{
|
||||
touchpad_set_parameter(0x01,0x21,0x01);
|
||||
touchpad_set_parameter(0x00,0x22,0x15);
|
||||
|
|
|
|||
|
|
@ -21,18 +21,18 @@
|
|||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define _backlight_init() true
|
||||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
#define backlight_hw_init() true
|
||||
void backlight_hw_on(void);
|
||||
void backlight_hw_off(void);
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
void _backlight_set_brightness(int brightness);
|
||||
void backlight_hw_brightness(int brightness);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void _buttonlight_on(void);
|
||||
void _buttonlight_off(void);
|
||||
void _buttonlight_set_brightness(int brightness);
|
||||
void buttonlight_hw_on(void);
|
||||
void buttonlight_hw_off(void);
|
||||
void buttonlight_hw_brightness(int brightness);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ bool ide_powered(void)
|
|||
|
||||
void power_off(void)
|
||||
{
|
||||
_backlight_off();
|
||||
backlight_hw_off();
|
||||
sleep(HZ/10);
|
||||
|
||||
/* power off bit */
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@
|
|||
#include "synaptics-mep.h"
|
||||
#include "lcd.h"
|
||||
|
||||
void _backlight_set_brightness(int brightness)
|
||||
void backlight_hw_brightness(int brightness)
|
||||
{
|
||||
ascodec_write(AS3514_DCDC15, brightness);
|
||||
}
|
||||
|
||||
void _backlight_on(void)
|
||||
void backlight_hw_on(void)
|
||||
{
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(true); /* power on lcd + visible display */
|
||||
|
|
@ -40,13 +40,13 @@ void _backlight_on(void)
|
|||
#if (CONFIG_BACKLIGHT_FADING != BACKLIGHT_FADING_SW_SETTING) /* in bootloader/sim */
|
||||
/* if we set the brightness to the settings value, then fading up
|
||||
* is glitchy */
|
||||
_backlight_set_brightness(backlight_brightness);
|
||||
backlight_hw_brightness(backlight_brightness);
|
||||
#endif
|
||||
}
|
||||
|
||||
void _backlight_off(void)
|
||||
void backlight_hw_off(void)
|
||||
{
|
||||
_backlight_set_brightness(0);
|
||||
backlight_hw_brightness(0);
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
lcd_enable(false); /* power off visible display */
|
||||
#endif
|
||||
|
|
@ -58,7 +58,7 @@ void _backlight_off(void)
|
|||
#define BUTTONLIGHT_MAX 0x0f
|
||||
static unsigned short buttonlight_status = 0;
|
||||
|
||||
void _buttonlight_on(void)
|
||||
void buttonlight_hw_on(void)
|
||||
{
|
||||
if (!buttonlight_status)
|
||||
{
|
||||
|
|
@ -68,7 +68,7 @@ void _buttonlight_on(void)
|
|||
}
|
||||
}
|
||||
|
||||
void _buttonlight_off(void)
|
||||
void buttonlight_hw_off(void)
|
||||
{
|
||||
if (buttonlight_status)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@
|
|||
#ifndef BACKLIGHT_TARGET_H
|
||||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define _backlight_init() true
|
||||
void _backlight_on(void);
|
||||
void _backlight_off(void);
|
||||
void _backlight_set_brightness(int brightness);
|
||||
#define backlight_hw_init() true
|
||||
void backlight_hw_on(void);
|
||||
void backlight_hw_off(void);
|
||||
void backlight_hw_brightness(int brightness);
|
||||
int __backlight_is_on(void);
|
||||
|
||||
#ifdef HAVE_BUTTON_LIGHT
|
||||
void _buttonlight_on(void);
|
||||
void _buttonlight_off(void);
|
||||
void buttonlight_hw_on(void);
|
||||
void buttonlight_hw_off(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue