From 021c0868dd6a9ac01f01db36a7b08cf7ad6737df Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 27 Jul 2007 12:05:54 +0000 Subject: 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 --- firmware/target/arm/ipod/1g2g/backlight-1g2g.c | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 firmware/target/arm/ipod/1g2g/backlight-1g2g.c (limited to 'firmware/target/arm/ipod/1g2g') 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 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2002 by Linus Nielsen Feltzing + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "config.h" +#include "system.h" +#include "backlight.h" +#include "lcd.h" + +void __backlight_on(void) +{ + outl(inl(0xc0001000) | 0x02, 0xc0001000); + lcd_set_backlight_inversion(true); +} + +void __backlight_off(void) +{ + outl(inl(0xc0001000) & ~0x02, 0xc0001000); + lcd_set_backlight_inversion(false); +} -- cgit v1.2.3