mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
fuzev2: fix buttonlight flashing on µSD access (2nd try)
it would still flash when the light was off it turns out that if B5 is set to input the light can't be turned on but we can still select between µSD slot and internal storage git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26059 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
90ea991dff
commit
79cfc221a5
2 changed files with 2 additions and 5 deletions
|
|
@ -35,9 +35,6 @@ void _backlight_set_brightness(int brightness)
|
|||
|
||||
bool _backlight_init(void)
|
||||
{
|
||||
GPIOB_DIR |= 1<<5; /* for buttonlight, stuff below seems to be needed
|
||||
for buttonlight as well*/
|
||||
|
||||
ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80);
|
||||
ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10);
|
||||
|
||||
|
|
@ -62,6 +59,7 @@ void _backlight_off(void)
|
|||
|
||||
void _buttonlight_on(void)
|
||||
{
|
||||
GPIOB_DIR |= 1<<5;
|
||||
GPIOB_PIN(5) = (1<<5);
|
||||
buttonlight_is_on = 1;
|
||||
}
|
||||
|
|
@ -69,5 +67,6 @@ void _buttonlight_on(void)
|
|||
void _buttonlight_off(void)
|
||||
{
|
||||
GPIOB_PIN(5) = 0;
|
||||
GPIOB_DIR &= ~(1<<5);
|
||||
buttonlight_is_on = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue