diff options
Diffstat (limited to 'firmware/target/coldfire/iriver/h100')
-rw-r--r-- | firmware/target/coldfire/iriver/h100/backlight-h100.c | 10 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/h100/backlight-target.h | 35 |
2 files changed, 40 insertions, 5 deletions
diff --git a/firmware/target/coldfire/iriver/h100/backlight-h100.c b/firmware/target/coldfire/iriver/h100/backlight-h100.c index 7cff965ff9..1c3dded5e5 100644 --- a/firmware/target/coldfire/iriver/h100/backlight-h100.c +++ b/firmware/target/coldfire/iriver/h100/backlight-h100.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include "lcd.h" | 25 | #include "lcd.h" |
26 | 26 | ||
27 | /* Returns the current state of the backlight (true=ON, false=OFF). */ | 27 | /* Returns the current state of the backlight (true=ON, false=OFF). */ |
28 | bool __backlight_init(void) | 28 | bool _backlight_init(void) |
29 | { | 29 | { |
30 | or_l(0x00020000, &GPIO1_ENABLE); | 30 | or_l(0x00020000, &GPIO1_ENABLE); |
31 | or_l(0x00020000, &GPIO1_FUNCTION); | 31 | or_l(0x00020000, &GPIO1_FUNCTION); |
@@ -33,22 +33,22 @@ bool __backlight_init(void) | |||
33 | return (GPIO1_OUT & 0x00020000) ? false : true; | 33 | return (GPIO1_OUT & 0x00020000) ? false : true; |
34 | } | 34 | } |
35 | 35 | ||
36 | void __backlight_on(void) | 36 | void _backlight_hw_on(void) |
37 | { | 37 | { |
38 | and_l(~0x00020000, &GPIO1_OUT); | 38 | and_l(~0x00020000, &GPIO1_OUT); |
39 | } | 39 | } |
40 | 40 | ||
41 | void __backlight_off(void) | 41 | void _backlight_hw_off(void) |
42 | { | 42 | { |
43 | or_l(0x00020000, &GPIO1_OUT); | 43 | or_l(0x00020000, &GPIO1_OUT); |
44 | } | 44 | } |
45 | 45 | ||
46 | void __remote_backlight_on(void) | 46 | void _remote_backlight_on(void) |
47 | { | 47 | { |
48 | and_l(~0x00000800, &GPIO_OUT); | 48 | and_l(~0x00000800, &GPIO_OUT); |
49 | } | 49 | } |
50 | 50 | ||
51 | void __remote_backlight_off(void) | 51 | void _remote_backlight_off(void) |
52 | { | 52 | { |
53 | or_l(0x00000800, &GPIO_OUT); | 53 | or_l(0x00000800, &GPIO_OUT); |
54 | } | 54 | } |
diff --git a/firmware/target/coldfire/iriver/h100/backlight-target.h b/firmware/target/coldfire/iriver/h100/backlight-target.h new file mode 100644 index 0000000000..6697fb19c3 --- /dev/null +++ b/firmware/target/coldfire/iriver/h100/backlight-target.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006 by Linus Nielsen Feltzing | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | #ifndef BACKLIGHT_TARGET_H | ||
20 | #define BACKLIGHT_TARGET_H | ||
21 | |||
22 | bool _backlight_init(void); /* Returns backlight current state (true=ON). */ | ||
23 | void _backlight_hw_on(void); | ||
24 | void _backlight_hw_off(void); | ||
25 | |||
26 | #define _backlight_on_isr() _backlight_hw_on() | ||
27 | #define _backlight_off_isr() _backlight_hw_off() | ||
28 | #define _backlight_on_normal() _backlight_hw_on() | ||
29 | #define _backlight_off_normal() _backlight_hw_off() | ||
30 | #define _BACKLIGHT_FADE_BOOST | ||
31 | |||
32 | void _remote_backlight_on(void); | ||
33 | void _remote_backlight_off(void); | ||
34 | |||
35 | #endif | ||