diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-03-22 14:17:45 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-03-22 14:17:45 +0000 |
commit | 13618007b36b60dda1425ada261308a3624224c3 (patch) | |
tree | aa893db25dd138de4ed0aaf0fa055f76a4fbaeea /firmware/target | |
parent | cff2a54e7cbc369621c41a04a1bb67110da81443 (diff) | |
download | rockbox-13618007b36b60dda1425ada261308a3624224c3.tar.gz rockbox-13618007b36b60dda1425ada261308a3624224c3.zip |
Backlight for iAudio X5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9185 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rwxr-xr-x | firmware/target/coldfire/iaudio/x5/backlight-target.h | 25 | ||||
-rwxr-xr-x | firmware/target/coldfire/iaudio/x5/backlight-x5.c | 38 |
2 files changed, 63 insertions, 0 deletions
diff --git a/firmware/target/coldfire/iaudio/x5/backlight-target.h b/firmware/target/coldfire/iaudio/x5/backlight-target.h new file mode 100755 index 0000000000..5b6f7e1f8f --- /dev/null +++ b/firmware/target/coldfire/iaudio/x5/backlight-target.h | |||
@@ -0,0 +1,25 @@ | |||
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 | void __backlight_on(void); | ||
23 | void __backlight_off(void); | ||
24 | |||
25 | #endif | ||
diff --git a/firmware/target/coldfire/iaudio/x5/backlight-x5.c b/firmware/target/coldfire/iaudio/x5/backlight-x5.c new file mode 100755 index 0000000000..e48e55d27b --- /dev/null +++ b/firmware/target/coldfire/iaudio/x5/backlight-x5.c | |||
@@ -0,0 +1,38 @@ | |||
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 "system.h" | ||
22 | #include "backlight.h" | ||
23 | #include "pcf50606.h" | ||
24 | |||
25 | void __backlight_on(void) | ||
26 | { | ||
27 | int level = set_irq_level(HIGHEST_IRQ_LEVEL); | ||
28 | pcf50606_write(0x38, 0x30); /* Backlight ON */ | ||
29 | set_irq_level(level); | ||
30 | } | ||
31 | |||
32 | void __backlight_off(void) | ||
33 | { | ||
34 | int level = set_irq_level(HIGHEST_IRQ_LEVEL); | ||
35 | pcf50606_write(0x38, 0x70); /* Backlight OFF */ | ||
36 | set_irq_level(level); | ||
37 | } | ||
38 | |||