Commit FS#8387 by Adam Gashlin. Enables detection of firewire devices for charging on various Ipods. Note that charging itself is not yet implemented on these devices.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16124 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Giacomelli 2008-01-20 23:03:23 +00:00
parent c1791a540e
commit 31b6eb57b0
5 changed files with 13 additions and 9 deletions

View file

@ -102,8 +102,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */
//#define CONFIG_CHARGING CHARGING_SIMPLE
/* Hardware controlled charging? */
#define CONFIG_CHARGING CHARGING_MONITOR
/* define this if the unit can be powered or charged via USB */
#define HAVE_USB_POWER

View file

@ -89,8 +89,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */
//#define CONFIG_CHARGING CHARGING_SIMPLE
/* Hardware controlled charging? */
#define CONFIG_CHARGING CHARGING_MONITOR
/* define this if the unit can be powered or charged via USB */
#define HAVE_USB_POWER

View file

@ -92,8 +92,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */
//#define CONFIG_CHARGING CHARGING_SIMPLE
/* Hardware controlled charging? */
#define CONFIG_CHARGING CHARGING_MONITOR
/* define this if the unit can be powered or charged via USB */
#define HAVE_USB_POWER

View file

@ -99,8 +99,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
/* Hardware controlled charging? FIXME */
//#define CONFIG_CHARGING CHARGING_SIMPLE
/* Hardware controlled charging? */
#define CONFIG_CHARGING CHARGING_MONITOR
/* define this if the unit can be powered or charged via USB */
#define HAVE_USB_POWER

View file

@ -42,8 +42,12 @@ void power_init(void)
bool charger_inserted(void)
{
#ifdef IPOD_VIDEO
#if defined(IPOD_VIDEO)
return (GPIOL_INPUT_VAL & 0x08)?false:true;
#elif defined(IPOD_4G) || defined(IPOD_COLOR) \
|| defined(IPOD_MINI) || defined(IPOD_MINI2G)
/* C2 is firewire power */
return (GPIOC_INPUT_VAL & 0x04)?false:true;
#else
/* This needs filling in for other ipods. */
return false;