summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-07-20 05:55:32 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-07-20 05:55:32 +0000
commited616c604a1e9a4cbd201aacaa7182d8f7174393 (patch)
tree3b409f0affcf902cf8a742bd8cd6ff269486f8da /firmware/target/arm/as3525
parentc6b838695ccd141596140dfc9612a1fb07c1c832 (diff)
downloadrockbox-ed616c604a1e9a4cbd201aacaa7182d8f7174393.tar.gz
rockbox-ed616c604a1e9a4cbd201aacaa7182d8f7174393.zip
buttonlight for new fuzev2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27501 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c12
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 6797903ba9..eebe9b945f 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)
38 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80); 38 ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80);
39 ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); 39 ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10);
40 40
41 /* needed for button light */
42 if (fuzev2_variant == 1)
43 ascodec_write_pmu(0x1a, 1, 0x30); /* MUX_PWGD = PWM */
44
41 return true; 45 return true;
42} 46}
43 47
@@ -65,6 +69,10 @@ void _buttonlight_on(void)
65 GPIOB_PIN(5) = (1<<5); 69 GPIOB_PIN(5) = (1<<5);
66 buttonlight_is_on = 1; 70 buttonlight_is_on = 1;
67 } 71 }
72 else
73 {
74 ascodec_write_pmu(0x1a, 6, 0x80); /* PWM inverted */
75 }
68} 76}
69 77
70void _buttonlight_off(void) 78void _buttonlight_off(void)
@@ -75,4 +83,8 @@ void _buttonlight_off(void)
75 GPIOB_DIR &= ~(1<<5); 83 GPIOB_DIR &= ~(1<<5);
76 buttonlight_is_on = 0; 84 buttonlight_is_on = 0;
77 } 85 }
86 else
87 {
88 ascodec_write_pmu(0x1a, 6, 0); /* PWM not inverted */
89 }
78} 90}