diff options
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r-- | firmware/target/arm/as3525/sansa-clip/backlight-clip.c | 35 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-clip/backlight-target.h | 19 |
2 files changed, 15 insertions, 39 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/backlight-clip.c b/firmware/target/arm/as3525/sansa-clip/backlight-clip.c deleted file mode 100644 index d22b04b34e..0000000000 --- a/firmware/target/arm/as3525/sansa-clip/backlight-clip.c +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright © 2008 Rafaël Carré | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include "backlight-target.h" | ||
23 | #include "as3525.h" | ||
24 | |||
25 | void _buttonlight_on(void) | ||
26 | { | ||
27 | GPIOD_DIR |= (1<<7); | ||
28 | GPIOD_PIN(7) = (1<<7); /* set pin d7 high */ | ||
29 | } | ||
30 | |||
31 | void _buttonlight_off(void) | ||
32 | { | ||
33 | GPIOD_DIR |= (1<<7); | ||
34 | GPIOD_PIN(7) = 0; /* set pin d7 low */ | ||
35 | } | ||
diff --git a/firmware/target/arm/as3525/sansa-clip/backlight-target.h b/firmware/target/arm/as3525/sansa-clip/backlight-target.h index 5a6ae34728..f836fb9ab2 100644 --- a/firmware/target/arm/as3525/sansa-clip/backlight-target.h +++ b/firmware/target/arm/as3525/sansa-clip/backlight-target.h | |||
@@ -25,8 +25,6 @@ | |||
25 | #include "lcd.h" | 25 | #include "lcd.h" |
26 | #include "backlight.h" | 26 | #include "backlight.h" |
27 | 27 | ||
28 | #define _backlight_init() true | ||
29 | |||
30 | static inline void _backlight_on(void) | 28 | static inline void _backlight_on(void) |
31 | { | 29 | { |
32 | lcd_enable(true); | 30 | lcd_enable(true); |
@@ -37,7 +35,20 @@ static inline void _backlight_off(void) | |||
37 | lcd_enable(false); | 35 | lcd_enable(false); |
38 | } | 36 | } |
39 | 37 | ||
40 | void _buttonlight_on(void); | 38 | static inline bool _backlight_init(void) |
41 | void _buttonlight_off(void); | 39 | { |
40 | GPIOD_DIR |= (1<<7); /* for button light */ | ||
41 | return true; | ||
42 | } | ||
43 | |||
44 | static inline void _buttonlight_on(void) | ||
45 | { | ||
46 | GPIOD_PIN(7) = (1<<7); | ||
47 | } | ||
48 | |||
49 | static inline void _buttonlight_off(void) | ||
50 | { | ||
51 | GPIOD_PIN(7) = 0; | ||
52 | } | ||
42 | 53 | ||
43 | #endif | 54 | #endif |