summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/1g2g
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-07-27 12:05:54 +0000
committerJens Arnold <amiconn@rockbox.org>2007-07-27 12:05:54 +0000
commit021c0868dd6a9ac01f01db36a7b08cf7ad6737df (patch)
tree635d37509ce564e05b2065511912e7a436163510 /firmware/target/arm/ipod/1g2g
parentb701322fea42c809092f50e252f45ddfc38293c3 (diff)
downloadrockbox-021c0868dd6a9ac01f01db36a7b08cf7ad6737df.tar.gz
rockbox-021c0868dd6a9ac01f01db36a7b08cf7ad6737df.zip
iPod 2nd gen: * Fake battery voltage of 4.00V so rockbox doesn't shutdown (ADC is not yet implemented). * Fix button hold polarity for main rockbox. * Implement backlight inversion (the 1st/2nd gen backlight works in a way that makes the LCD look inverted when active). * Fix default contrast and clean up target tree.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14022 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/1g2g')
-rw-r--r--firmware/target/arm/ipod/1g2g/backlight-1g2g.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/firmware/target/arm/ipod/1g2g/backlight-1g2g.c b/firmware/target/arm/ipod/1g2g/backlight-1g2g.c
new file mode 100644
index 0000000000..88d638f4e3
--- /dev/null
+++ b/firmware/target/arm/ipod/1g2g/backlight-1g2g.c
@@ -0,0 +1,34 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 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 "system.h"
21#include "backlight.h"
22#include "lcd.h"
23
24void __backlight_on(void)
25{
26 outl(inl(0xc0001000) | 0x02, 0xc0001000);
27 lcd_set_backlight_inversion(true);
28}
29
30void __backlight_off(void)
31{
32 outl(inl(0xc0001000) & ~0x02, 0xc0001000);
33 lcd_set_backlight_inversion(false);
34}