diff options
Diffstat (limited to 'firmware/target/arm/as3525')
-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 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 | ||
70 | void _buttonlight_off(void) | 78 | void _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 | } |