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:
parent
c1791a540e
commit
31b6eb57b0
5 changed files with 13 additions and 9 deletions
|
@ -102,8 +102,8 @@
|
||||||
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
/* Hardware controlled charging? FIXME */
|
/* Hardware controlled charging? */
|
||||||
//#define CONFIG_CHARGING CHARGING_SIMPLE
|
#define CONFIG_CHARGING CHARGING_MONITOR
|
||||||
|
|
||||||
/* define this if the unit can be powered or charged via USB */
|
/* define this if the unit can be powered or charged via USB */
|
||||||
#define HAVE_USB_POWER
|
#define HAVE_USB_POWER
|
||||||
|
|
|
@ -89,8 +89,8 @@
|
||||||
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
/* Hardware controlled charging? FIXME */
|
/* Hardware controlled charging? */
|
||||||
//#define CONFIG_CHARGING CHARGING_SIMPLE
|
#define CONFIG_CHARGING CHARGING_MONITOR
|
||||||
|
|
||||||
/* define this if the unit can be powered or charged via USB */
|
/* define this if the unit can be powered or charged via USB */
|
||||||
#define HAVE_USB_POWER
|
#define HAVE_USB_POWER
|
||||||
|
|
|
@ -92,8 +92,8 @@
|
||||||
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
/* Hardware controlled charging? FIXME */
|
/* Hardware controlled charging? */
|
||||||
//#define CONFIG_CHARGING CHARGING_SIMPLE
|
#define CONFIG_CHARGING CHARGING_MONITOR
|
||||||
|
|
||||||
/* define this if the unit can be powered or charged via USB */
|
/* define this if the unit can be powered or charged via USB */
|
||||||
#define HAVE_USB_POWER
|
#define HAVE_USB_POWER
|
||||||
|
|
|
@ -99,8 +99,8 @@
|
||||||
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
/* Hardware controlled charging? FIXME */
|
/* Hardware controlled charging? */
|
||||||
//#define CONFIG_CHARGING CHARGING_SIMPLE
|
#define CONFIG_CHARGING CHARGING_MONITOR
|
||||||
|
|
||||||
/* define this if the unit can be powered or charged via USB */
|
/* define this if the unit can be powered or charged via USB */
|
||||||
#define HAVE_USB_POWER
|
#define HAVE_USB_POWER
|
||||||
|
|
|
@ -42,8 +42,12 @@ void power_init(void)
|
||||||
|
|
||||||
bool charger_inserted(void)
|
bool charger_inserted(void)
|
||||||
{
|
{
|
||||||
#ifdef IPOD_VIDEO
|
#if defined(IPOD_VIDEO)
|
||||||
return (GPIOL_INPUT_VAL & 0x08)?false:true;
|
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
|
#else
|
||||||
/* This needs filling in for other ipods. */
|
/* This needs filling in for other ipods. */
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue