diff options
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c')
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c index 1bc16babdd..29e145053c 100644 --- a/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c +++ b/firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c | |||
@@ -35,9 +35,6 @@ void _backlight_set_brightness(int brightness) | |||
35 | 35 | ||
36 | bool _backlight_init(void) | 36 | bool _backlight_init(void) |
37 | { | 37 | { |
38 | GPIOB_DIR |= 1<<5; /* for buttonlight, stuff below seems to be needed | ||
39 | for buttonlight as well*/ | ||
40 | |||
41 | ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80); | 38 | ascodec_write_pmu(AS3543_BACKLIGHT, 1, 0x80); |
42 | ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); | 39 | ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10); |
43 | 40 | ||
@@ -62,6 +59,7 @@ void _backlight_off(void) | |||
62 | 59 | ||
63 | void _buttonlight_on(void) | 60 | void _buttonlight_on(void) |
64 | { | 61 | { |
62 | GPIOB_DIR |= 1<<5; | ||
65 | GPIOB_PIN(5) = (1<<5); | 63 | GPIOB_PIN(5) = (1<<5); |
66 | buttonlight_is_on = 1; | 64 | buttonlight_is_on = 1; |
67 | } | 65 | } |
@@ -69,5 +67,6 @@ void _buttonlight_on(void) | |||
69 | void _buttonlight_off(void) | 67 | void _buttonlight_off(void) |
70 | { | 68 | { |
71 | GPIOB_PIN(5) = 0; | 69 | GPIOB_PIN(5) = 0; |
70 | GPIOB_DIR &= ~(1<<5); | ||
72 | buttonlight_is_on = 0; | 71 | buttonlight_is_on = 0; |
73 | } | 72 | } |