summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/arm/as3525/sansa-clip/backlight-clip.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/backlight-clip.c b/firmware/target/arm/as3525/sansa-clip/backlight-clip.c
index 2064f0992f..d22b04b34e 100644
--- a/firmware/target/arm/as3525/sansa-clip/backlight-clip.c
+++ b/firmware/target/arm/as3525/sansa-clip/backlight-clip.c
@@ -22,37 +22,14 @@
22#include "backlight-target.h" 22#include "backlight-target.h"
23#include "as3525.h" 23#include "as3525.h"
24 24
25/* TODO : backlight brightness */
26
27/* XXX : xpd is used for SD/MCI interface
28 * If interrupts are used to access this interface, they should be
29 * disabled in _buttonlight_on/off ()
30 */
31
32void _buttonlight_on(void) 25void _buttonlight_on(void)
33{ 26{
34 int saved_ccu_io;
35
36 saved_ccu_io = CCU_IO; /* save XPD setting */
37
38 CCU_IO &= ~(3<<2); /* setup xpd as GPIO */
39
40 GPIOD_DIR |= (1<<7); 27 GPIOD_DIR |= (1<<7);
41 GPIOD_PIN(7) = (1<<7); /* set pin d7 high */ 28 GPIOD_PIN(7) = (1<<7); /* set pin d7 high */
42
43 CCU_IO = saved_ccu_io; /* restore the previous XPD setting */
44} 29}
45 30
46void _buttonlight_off(void) 31void _buttonlight_off(void)
47{ 32{
48 int saved_ccu_io;
49
50 saved_ccu_io = CCU_IO; /* save XPD setting */
51
52 CCU_IO &= ~(3<<2); /* setup xpd as GPIO */
53
54 GPIOD_DIR |= (1<<7); 33 GPIOD_DIR |= (1<<7);
55 GPIOD_PIN(7) = 0; /* set pin d7 low */ 34 GPIOD_PIN(7) = 0; /* set pin d7 low */
56
57 CCU_IO = saved_ccu_io; /* restore the previous XPD setting */
58} 35}