diff options
author | Nils Wallménius <nils@rockbox.org> | 2009-02-15 08:50:31 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2009-02-15 08:50:31 +0000 |
commit | 32d7c6a8631feb85340cf5b0fd8284d282082ca2 (patch) | |
tree | e914aaa7ff248ee4f5a125a5fc10f1be92350145 | |
parent | 1a5ed1b05d1679a0d9f1acc0fda914a11d501dae (diff) |
Firewire charger detection for ipod 3G, patch by Boris Gjenero. Fixes FS#9900
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20008 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/config-ipod3g.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/ipod/power-ipod.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index fad3d3d0fb..0262fbde3f 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h @@ -114,7 +114,7 @@ #define BATTERY_TYPES_COUNT 1 /* only one type */ /* Hardware controlled charging? FIXME */ -//#define CONFIG_CHARGING CHARGING_SIMPLE +#define CONFIG_CHARGING CHARGING_SIMPLE #ifndef SIMULATOR diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c index cb93fe398f..4c6df882c6 100644 --- a/firmware/target/arm/ipod/power-ipod.c +++ b/firmware/target/arm/ipod/power-ipod.c @@ -60,6 +60,11 @@ unsigned int power_input_status(void) if ((GPIOC_INPUT_VAL & 0x04) == 0) status = POWER_INPUT_MAIN_CHARGER; /* */ +#elif defined(IPOD_3G) + /* firewire power */ + if ((GPIOC_INPUT_VAL & 0x10) == 0) + status = POWER_INPUT_MAIN_CHARGER; + /* */ #else /* This needs filling in for other ipods. */ #endif |