diff options
Diffstat (limited to 'firmware/target/coldfire/iriver/h300/backlight-h300.c')
-rw-r--r-- | firmware/target/coldfire/iriver/h300/backlight-h300.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iriver/h300/backlight-h300.c b/firmware/target/coldfire/iriver/h300/backlight-h300.c new file mode 100644 index 0000000000..d5322c2cf7 --- /dev/null +++ b/firmware/target/coldfire/iriver/h300/backlight-h300.c | |||
@@ -0,0 +1,49 @@ | |||
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 | #include "config.h" | ||
20 | #include "cpu.h" | ||
21 | #include "kernel.h" | ||
22 | #include "thread.h" | ||
23 | #include "system.h" | ||
24 | #include "backlight.h" | ||
25 | #include "pcf50606.h" | ||
26 | #include "lcd.h" | ||
27 | |||
28 | void __backlight_on(void) | ||
29 | { | ||
30 | lcd_enable(true); | ||
31 | sleep(HZ/100); /* lcd needs time - avoid flashing for dark screens */ | ||
32 | or_l(0x00020000, &GPIO1_OUT); | ||
33 | } | ||
34 | |||
35 | void __backlight_off(void) | ||
36 | { | ||
37 | and_l(~0x00020000, &GPIO1_OUT); | ||
38 | lcd_enable(false); | ||
39 | } | ||
40 | |||
41 | void __remote_backlight_on(void) | ||
42 | { | ||
43 | and_l(~0x00000002, &GPIO1_OUT); | ||
44 | } | ||
45 | |||
46 | void __remote_backlight_off(void) | ||
47 | { | ||
48 | or_l(0x00000002, &GPIO1_OUT); | ||
49 | } | ||