summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/x5/backlight-x5.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-03-22 14:17:45 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-03-22 14:17:45 +0000
commit13618007b36b60dda1425ada261308a3624224c3 (patch)
treeaa893db25dd138de4ed0aaf0fa055f76a4fbaeea /firmware/target/coldfire/iaudio/x5/backlight-x5.c
parentcff2a54e7cbc369621c41a04a1bb67110da81443 (diff)
downloadrockbox-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/coldfire/iaudio/x5/backlight-x5.c')
-rwxr-xr-xfirmware/target/coldfire/iaudio/x5/backlight-x5.c38
1 files changed, 38 insertions, 0 deletions
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
25void __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
32void __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