forked from len0rd/rockbox
Turn backlight ON at boot unless bootloader has already done that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11992 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0ea4d3197e
commit
73cd9f3b63
9 changed files with 35 additions and 17 deletions
|
|
@ -113,7 +113,7 @@ unsigned char charging_leds[] = { 0x00, 0x20, 0x38, 0x3C };
|
|||
|
||||
|
||||
|
||||
void __backlight_init(void)
|
||||
bool __backlight_init(void)
|
||||
{
|
||||
backlight_control = BACKLIGHT_CONTROL_IDLE;
|
||||
|
||||
|
|
@ -127,6 +127,8 @@ void __backlight_init(void)
|
|||
initial_tick_delay = 2000;
|
||||
/* put the led control on the tick list */
|
||||
tick_add_task(led_control_service);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ void __buttonlight_mode(enum buttonlight_mode mode,
|
|||
unsigned short brightness);
|
||||
|
||||
|
||||
void __backlight_init(void);
|
||||
bool __backlight_init(void);
|
||||
void __backlight_on(void);
|
||||
void __backlight_off(void);
|
||||
void __backlight_set_brightness(int val);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define __BACKLIGHT_INIT
|
||||
void __backlight_init(void);
|
||||
bool __backlight_init(void);
|
||||
void __backlight_on(void);
|
||||
void __backlight_off(void);
|
||||
void __backlight_set_brightness(int val);
|
||||
|
|
|
|||
|
|
@ -24,10 +24,12 @@
|
|||
#include "pcf50606.h"
|
||||
#include "lcd.h"
|
||||
|
||||
void __backlight_init(void)
|
||||
bool __backlight_init(void)
|
||||
{
|
||||
__backlight_set_brightness(DEFAULT_BRIGHTNESS_SETTING);
|
||||
__backlight_on();
|
||||
|
||||
return true; /* Backlight always ON after boot. */
|
||||
}
|
||||
|
||||
void __backlight_on(void)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#define BACKLIGHT_TARGET_H
|
||||
|
||||
#define __BACKLIGHT_INIT
|
||||
void __backlight_init(void);
|
||||
bool __backlight_init(void); /* Returns backlight current state (true=ON). */
|
||||
void __backlight_on(void);
|
||||
void __backlight_off(void);
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
|
|
|
|||
|
|
@ -24,11 +24,13 @@
|
|||
#include "backlight.h"
|
||||
#include "lcd.h"
|
||||
|
||||
void __backlight_init(void)
|
||||
/* Returns the current state of the backlight (true=ON, false=OFF). */
|
||||
bool __backlight_init(void)
|
||||
{
|
||||
or_l(0x00020000, &GPIO1_ENABLE);
|
||||
or_l(0x00020000, &GPIO1_FUNCTION);
|
||||
and_l(~0x00020000, &GPIO1_OUT); /* Start with the backlight ON */
|
||||
|
||||
return (GPIO1_OUT & 0x00020000) ? false : true;
|
||||
}
|
||||
|
||||
void __backlight_on(void)
|
||||
|
|
|
|||
|
|
@ -25,11 +25,13 @@
|
|||
#include "pcf50606.h"
|
||||
#include "lcd.h"
|
||||
|
||||
void __backlight_init(void)
|
||||
bool __backlight_init(void)
|
||||
{
|
||||
or_l(0x00020000, &GPIO1_ENABLE);
|
||||
or_l(0x00020000, &GPIO1_FUNCTION);
|
||||
or_l(0x00020000, &GPIO1_OUT); /* Start with the backlight ON */
|
||||
|
||||
return true; /* Backlight always ON after boot. */
|
||||
}
|
||||
|
||||
void __backlight_on(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue