mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 21:55:10 -05:00
Add iPod 3G and iPod Color/Photo (FS#9072) current consumption and battery discharge curves to allow reasonable runtime estimation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24709 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
53b1af7a61
commit
909e4c6c06
3 changed files with 55 additions and 24 deletions
|
|
@ -127,6 +127,13 @@
|
||||||
/* Hardware controlled charging? FIXME */
|
/* Hardware controlled charging? FIXME */
|
||||||
#define CONFIG_CHARGING CHARGING_SIMPLE
|
#define CONFIG_CHARGING CHARGING_SIMPLE
|
||||||
|
|
||||||
|
/* define current usage levels */
|
||||||
|
#define CURRENT_NORMAL 275 /* ~4h (1100mAh) */
|
||||||
|
#define CURRENT_BACKLIGHT 20 /* FIXME: this needs adjusting */
|
||||||
|
#if defined(HAVE_RECORDING)
|
||||||
|
#define CURRENT_RECORD 35 /* FIXME: this needs adjusting */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if you have a PortalPlayer PP5002 */
|
/* Define this if you have a PortalPlayer PP5002 */
|
||||||
#define CONFIG_CPU PP5002
|
#define CONFIG_CPU PP5002
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,13 @@
|
||||||
/* 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
|
||||||
|
|
||||||
|
/* define current usage levels */
|
||||||
|
#define CURRENT_NORMAL 69 /* ~10h (700mAh), see FS#9072 */
|
||||||
|
#define CURRENT_BACKLIGHT 20 /* FIXME: this needs adjusting */
|
||||||
|
#if defined(HAVE_RECORDING)
|
||||||
|
#define CURRENT_RECORD 35 /* FIXME: this needs adjusting */
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define Apple remote tuner */
|
/* Define Apple remote tuner */
|
||||||
#define CONFIG_TUNER IPOD_REMOTE_TUNER
|
#define CONFIG_TUNER IPOD_REMOTE_TUNER
|
||||||
#define HAVE_RDS_CAP
|
#define HAVE_RDS_CAP
|
||||||
|
|
|
||||||
|
|
@ -28,44 +28,55 @@
|
||||||
|
|
||||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||||
{
|
{
|
||||||
#ifdef IPOD_NANO
|
#if defined(IPOD_NANO)
|
||||||
3330
|
3330
|
||||||
#elif defined IPOD_VIDEO
|
#elif defined(IPOD_VIDEO)
|
||||||
3300
|
3300
|
||||||
|
#elif defined(IPOD_COLOR)
|
||||||
|
3300
|
||||||
|
#elif defined(IPOD_3G)
|
||||||
|
3700
|
||||||
#else
|
#else
|
||||||
/* FIXME: calibrate value for other 3G+ ipods */
|
/* FIXME: calibrate value for other iPods */
|
||||||
3380
|
3300
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||||
{
|
{
|
||||||
#ifdef IPOD_NANO
|
#if defined(IPOD_NANO)
|
||||||
3230
|
3230
|
||||||
#elif defined IPOD_VIDEO
|
#elif defined(IPOD_VIDEO)
|
||||||
3300
|
3300
|
||||||
|
#elif defined(IPOD_COLOR)
|
||||||
|
3300
|
||||||
|
#elif defined(IPOD_3G)
|
||||||
|
3500
|
||||||
#else
|
#else
|
||||||
/* FIXME: calibrate value for other 3G+ ipods */
|
/* FIXME: calibrate value for other iPods */
|
||||||
3020
|
3000
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
||||||
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||||
{
|
{
|
||||||
#ifdef IPOD_NANO
|
#if defined(IPOD_NANO)
|
||||||
/* measured values */
|
/* measured values */
|
||||||
{ 3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160 },
|
{ 3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160 },
|
||||||
#elif defined IPOD_VIDEO
|
#elif defined(IPOD_VIDEO)
|
||||||
/* iPOD Video 30GB Li-Ion 400mAh, first approach based upon measurements */
|
/* iPod Video 30GB Li-Ion 400mAh, first approach based upon measurements */
|
||||||
{ 3450, 3670, 3710, 3750, 3790, 3830, 3870, 3930, 4010, 4100, 4180 },
|
{ 3450, 3670, 3710, 3750, 3790, 3830, 3870, 3930, 4010, 4100, 4180 },
|
||||||
#elif defined IPOD_COLOR
|
#elif defined(IPOD_COLOR)
|
||||||
/* iPOD Color 60GB Li-Ion, first approach based upon measurements */
|
/* iPod Photo 30GB, see FS#9072 */
|
||||||
{ 3500, 3676, 3729, 3755, 3778, 3805, 3847, 3919, 3961, 4071, 4109 },
|
{ 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 },
|
||||||
|
#elif defined(IPOD_3G)
|
||||||
|
/* iPod 3G 40GB, first approach based upon measurements */
|
||||||
|
{ 3720, 3740, 3760, 3780, 3830, 3870, 3910, 3970, 4020, 4060, 4090 },
|
||||||
#else
|
#else
|
||||||
/* FIXME: calibrate value for other 3G+ ipods */
|
/* FIXME: calibrate value for other iPods */
|
||||||
/* Table is "inherited" from iriver H100. */
|
/* Table is "provisional" from IPOD_COLOR */
|
||||||
{ 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 }
|
{ 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -73,16 +84,22 @@ const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
||||||
const unsigned short percent_to_volt_charge[11] =
|
const unsigned short percent_to_volt_charge[11] =
|
||||||
{
|
{
|
||||||
#ifdef IPOD_NANO
|
#if defined(IPOD_NANO)
|
||||||
/* measured values */
|
/* measured values */
|
||||||
3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160
|
3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160
|
||||||
#elif defined IPOD_VIDEO
|
#elif defined(IPOD_VIDEO)
|
||||||
/* iPOD Video 30GB Li-Ion 400mAh, first approach based upon measurements */
|
/* iPOD Video 30GB Li-Ion 400mAh, first approach based upon measurements */
|
||||||
3450, 3670, 3710, 3750, 3790, 3830, 3870, 3930, 4010, 4100, 4180
|
3450, 3670, 3710, 3750, 3790, 3830, 3870, 3930, 4010, 4100, 4180
|
||||||
|
#elif defined(IPOD_COLOR)
|
||||||
|
/* iPod Photo 30GB, see FS#9072 */
|
||||||
|
3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170
|
||||||
|
#elif defined(IPOD_3G)
|
||||||
|
/* iPod 3G 40GB, first approach based upon measurements */
|
||||||
|
3720, 3740, 3760, 3780, 3830, 3870, 3910, 3970, 4020, 4060, 4090
|
||||||
#else
|
#else
|
||||||
/* FIXME: calibrate value for other 3G+ ipods */
|
/* FIXME: calibrate value for other iPods */
|
||||||
/* Table is "inherited" from iriver H100. */
|
/* Table is "provisional" from IPOD_COLOR */
|
||||||
3540, 3860, 3930, 3980, 4000, 4020, 4040, 4080, 4130, 4180, 4230
|
3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_CHARGING */
|
#endif /* CONFIG_CHARGING */
|
||||||
|
|
@ -101,12 +118,12 @@ void accessory_supply_set(bool enable)
|
||||||
{
|
{
|
||||||
if (enable)
|
if (enable)
|
||||||
{
|
{
|
||||||
/* Accessory voltage supply */
|
/* Accessory voltage supply on */
|
||||||
pcf50605_write(PCF5060X_D2REGC1, 0xf8); /* 3.3V ON */
|
pcf50605_write(PCF5060X_D2REGC1, 0xf8); /* 3.3V ON */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Accessory voltage supply */
|
/* Accessory voltage supply off */
|
||||||
pcf50605_write(PCF5060X_D2REGC1, 0x18); /* OFF */
|
pcf50605_write(PCF5060X_D2REGC1, 0x18); /* OFF */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue