summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-c200v2
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-c200v2')
-rw-r--r--firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c
index 858e9aed49..0fd5c36771 100644
--- a/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.c
+++ b/firmware/target/arm/as3525/sansa-c200v2/backlight-c200v2.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
29bool _backlight_init(void) 31bool _backlight_init(void)
30{ 32{
31 GPIOA_DIR |= 1<<5; 33 GPIOA_DIR |= 1<<5;
@@ -58,12 +60,20 @@ void _backlight_off(void)
58 60
59void _buttonlight_on(void) 61void _buttonlight_on(void)
60{ 62{
63 /* Needed for buttonlight and MicroSD to work at the same time */
64 /* Turn ROD control on, as the OF does */
61 GPIOD_DIR |= (1<<7); 65 GPIOD_DIR |= (1<<7);
66 SD_MCI_POWER |= (1<<7);
62 GPIOD_PIN(7) = (1<<7); 67 GPIOD_PIN(7) = (1<<7);
68 buttonlight_is_on = 1;
63} 69}
64 70
65void _buttonlight_off(void) 71void _buttonlight_off(void)
66{ 72{
67 GPIOD_DIR |= (1<<7); 73 /* Needed for buttonlight and MicroSD to work at the same time */
74 /* Turn ROD control off, as the OF does */
75 SD_MCI_POWER &= ~(1<<7);
68 GPIOD_PIN(7) = 0; 76 GPIOD_PIN(7) = 0;
77 GPIOD_DIR &= ~(1<<7);
78 buttonlight_is_on = 0;
69} 79}