summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/config-clip.h1
-rw-r--r--firmware/target/arm/as3525/sansa-clip/backlight-clip.c23
2 files changed, 0 insertions, 24 deletions
diff --git a/firmware/export/config-clip.h b/firmware/export/config-clip.h
index b05d2c5091..7fb6c41fba 100644
--- a/firmware/export/config-clip.h
+++ b/firmware/export/config-clip.h
@@ -104,7 +104,6 @@
104 104
105/* Define this for LCD backlight available */ 105/* Define this for LCD backlight available */
106#define HAVE_BACKLIGHT 106#define HAVE_BACKLIGHT
107//#define HAVE_BACKLIGHT_BRIGHTNESS /* TODO */
108 107
109/* define this if you have a flash memory storage */ 108/* define this if you have a flash memory storage */
110#define HAVE_FLASH_STORAGE 109#define HAVE_FLASH_STORAGE
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}