diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2010-07-20 05:55:32 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-07-20 05:55:32 +0000 |
| commit | ed616c604a1e9a4cbd201aacaa7182d8f7174393 (patch) | |
| tree | 3b409f0affcf902cf8a742bd8cd6ff269486f8da | |
| parent | c6b838695ccd141596140dfc9612a1fb07c1c832 (diff) | |
| download | rockbox-ed616c604a1e9a4cbd201aacaa7182d8f7174393.zip rockbox-ed616c604a1e9a4cbd201aacaa7182d8f7174393.tar.gz rockbox-ed616c604a1e9a4cbd201aacaa7182d8f7174393.tar.bz2 rockbox-ed616c604a1e9a4cbd201aacaa7182d8f7174393.tar.xz | |
buttonlight for new fuzev2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27501 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c index 6797903..eebe9b9 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c +++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c @@ -38,6 +38,10 @@ bool _backlight_init(void) ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80); ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); + /* needed for button light */ + if (fuzev2_variant == 1) + ascodec_write_pmu(0x1a, 1, 0x30); /* MUX_PWGD = PWM */ + return true; } @@ -65,6 +69,10 @@ void _buttonlight_on(void) GPIOB_PIN(5) = (1<<5); buttonlight_is_on = 1; } + else + { + ascodec_write_pmu(0x1a, 6, 0x80); /* PWM inverted */ + } } void _buttonlight_off(void) @@ -75,4 +83,8 @@ void _buttonlight_off(void) GPIOB_DIR &= ~(1<<5); buttonlight_is_on = 0; } + else + { + ascodec_write_pmu(0x1a, 6, 0); /* PWM not inverted */ + } } |