mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
HD200 - small fix in backlight code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25766 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2a50270e44
commit
572ac53359
1 changed files with 6 additions and 1 deletions
|
|
@ -27,13 +27,15 @@
|
|||
#include "backlight-target.h"
|
||||
#include "lcd.h"
|
||||
|
||||
static bool _backlight_on = false;
|
||||
static bool _backlight_on = true;
|
||||
static int _brightness = DEFAULT_BRIGHTNESS_SETTING;
|
||||
|
||||
/* Returns the current state of the backlight (true=ON, false=OFF). */
|
||||
bool _backlight_init(void)
|
||||
{
|
||||
#ifdef BOOTLOADER
|
||||
and_l(~(1<<28),&GPIO_OUT);
|
||||
#endif
|
||||
or_l((1<<28),&GPIO_FUNCTION);
|
||||
or_l((1<<28),&GPIO_ENABLE);
|
||||
return true;
|
||||
|
|
@ -61,6 +63,9 @@ void _backlight_set_brightness(int val)
|
|||
{
|
||||
unsigned char i;
|
||||
|
||||
if( _brightness == val && _backlight_on == true )
|
||||
return;
|
||||
|
||||
and_l(~(1<<28),&GPIO_OUT);
|
||||
sleep(4);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue