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
This commit is contained in:
Nils Wallménius 2009-02-15 08:50:31 +00:00
parent 1a5ed1b05d
commit 32d7c6a863
2 changed files with 6 additions and 1 deletions

View file

@ -114,7 +114,7 @@
#define BATTERY_TYPES_COUNT 1 /* only one type */ #define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */ /* Hardware controlled charging? FIXME */
//#define CONFIG_CHARGING CHARGING_SIMPLE #define CONFIG_CHARGING CHARGING_SIMPLE
#ifndef SIMULATOR #ifndef SIMULATOR

View file

@ -60,6 +60,11 @@ unsigned int power_input_status(void)
if ((GPIOC_INPUT_VAL & 0x04) == 0) if ((GPIOC_INPUT_VAL & 0x04) == 0)
status = POWER_INPUT_MAIN_CHARGER; status = POWER_INPUT_MAIN_CHARGER;
/* */ /* */
#elif defined(IPOD_3G)
/* firewire power */
if ((GPIOC_INPUT_VAL & 0x10) == 0)
status = POWER_INPUT_MAIN_CHARGER;
/* */
#else #else
/* This needs filling in for other ipods. */ /* This needs filling in for other ipods. */
#endif #endif