summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/backlight-e200v2-fuze.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/backlight-e200v2-fuze.c')
-rw-r--r--firmware/target/arm/as3525/backlight-e200v2-fuze.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/backlight-e200v2-fuze.c b/firmware/target/arm/as3525/backlight-e200v2-fuze.c
index 30c6d4b22f..61c2b1db79 100644
--- a/firmware/target/arm/as3525/backlight-e200v2-fuze.c
+++ b/firmware/target/arm/as3525/backlight-e200v2-fuze.c
@@ -26,6 +26,8 @@
26#include "ascodec-target.h" 26#include "ascodec-target.h"
27#include "as3514.h" 27#include "as3514.h"
28 28
29int buttonlight_is_on = 0;
30
29void _backlight_set_brightness(int brightness) 31void _backlight_set_brightness(int brightness)
30{ 32{
31 ascodec_write(AS3514_DCDC15, brightness); 33 ascodec_write(AS3514_DCDC15, brightness);
@@ -53,12 +55,20 @@ void _backlight_off(void)
53 55
54void _buttonlight_on(void) 56void _buttonlight_on(void)
55{ 57{
58 /* Needed for buttonlight and MicroSD to work at the same time */
59 /* Turn ROD control on, as the OF does */
56 GPIOD_DIR |= (1<<7); 60 GPIOD_DIR |= (1<<7);
61 SD_MCI_POWER |= (1<<7);
57 GPIOD_PIN(7) = (1<<7); 62 GPIOD_PIN(7) = (1<<7);
63 buttonlight_is_on = 1;
58} 64}
59 65
60void _buttonlight_off(void) 66void _buttonlight_off(void)
61{ 67{
68 /* Needed for buttonlight and MicroSD to work at the same time */
69 /* Turn ROD control off, as the OF does */
70 SD_MCI_POWER &= ~(1<<7);
62 GPIOD_PIN(7) = 0; 71 GPIOD_PIN(7) = 0;
63 GPIOD_DIR &= ~(1<<7); 72 GPIOD_DIR &= ~(1<<7);
73 buttonlight_is_on = 0;
64} 74}