forked from len0rd/rockbox
Backlight support for Sansa, including brightness. Thanks to Rene
Peinthor and FS#6608. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12186 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1a2dddc346
commit
a7af649766
3 changed files with 23 additions and 0 deletions
|
|
@ -16,6 +16,12 @@
|
|||
/* define this if you have a colour LCD */
|
||||
#define HAVE_LCD_COLOR 1
|
||||
|
||||
#define HAVE_BACKLIGHT_BRIGHTNESS
|
||||
/* Main LCD backlight brightness range and defaults */
|
||||
#define MIN_BRIGHTNESS_SETTING 1
|
||||
#define MAX_BRIGHTNESS_SETTING 12
|
||||
#define DEFAULT_BRIGHTNESS_SETTING 6
|
||||
|
||||
/* define this if you have access to the quickscreen */
|
||||
#define HAVE_QUICKSCREEN
|
||||
|
||||
|
|
|
|||
|
|
@ -16,10 +16,26 @@
|
|||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "config.h"
|
||||
#include "backlight-target.h"
|
||||
#include "system.h"
|
||||
#include "backlight.h"
|
||||
#include "i2c-pp.h"
|
||||
|
||||
static unsigned short backlight_brightness;
|
||||
|
||||
void __backlight_set_brightness(int brightness)
|
||||
{
|
||||
backlight_brightness = brightness;
|
||||
pp_i2c_send( 0x46, 0x23, backlight_brightness);
|
||||
}
|
||||
|
||||
void __backlight_on(void)
|
||||
{
|
||||
pp_i2c_send( 0x46, 0x23, backlight_brightness);
|
||||
}
|
||||
|
||||
void __backlight_off(void)
|
||||
{
|
||||
pp_i2c_send( 0x46, 0x23, 0x0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,5 +21,6 @@
|
|||
|
||||
void __backlight_on(void);
|
||||
void __backlight_off(void);
|
||||
void __backlight_set_brightness(int brightness);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue