mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -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
|
|
@ -28,44 +28,55 @@
|
|||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
#ifdef IPOD_NANO
|
||||
#if defined(IPOD_NANO)
|
||||
3330
|
||||
#elif defined IPOD_VIDEO
|
||||
#elif defined(IPOD_VIDEO)
|
||||
3300
|
||||
#elif defined(IPOD_COLOR)
|
||||
3300
|
||||
#elif defined(IPOD_3G)
|
||||
3700
|
||||
#else
|
||||
/* FIXME: calibrate value for other 3G+ ipods */
|
||||
3380
|
||||
/* FIXME: calibrate value for other iPods */
|
||||
3300
|
||||
#endif
|
||||
};
|
||||
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
#ifdef IPOD_NANO
|
||||
#if defined(IPOD_NANO)
|
||||
3230
|
||||
#elif defined IPOD_VIDEO
|
||||
#elif defined(IPOD_VIDEO)
|
||||
3300
|
||||
#elif defined(IPOD_COLOR)
|
||||
3300
|
||||
#elif defined(IPOD_3G)
|
||||
3500
|
||||
#else
|
||||
/* FIXME: calibrate value for other 3G+ ipods */
|
||||
3020
|
||||
/* FIXME: calibrate value for other iPods */
|
||||
3000
|
||||
#endif
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
||||
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||
{
|
||||
#ifdef IPOD_NANO
|
||||
#if defined(IPOD_NANO)
|
||||
/* measured values */
|
||||
{ 3230, 3620, 3700, 3730, 3750, 3780, 3830, 3890, 3950, 4030, 4160 },
|
||||
#elif defined IPOD_VIDEO
|
||||
/* iPOD Video 30GB Li-Ion 400mAh, first approach based upon measurements */
|
||||
#elif defined(IPOD_VIDEO)
|
||||
/* iPod Video 30GB Li-Ion 400mAh, first approach based upon measurements */
|
||||
{ 3450, 3670, 3710, 3750, 3790, 3830, 3870, 3930, 4010, 4100, 4180 },
|
||||
#elif defined IPOD_COLOR
|
||||
/* iPOD Color 60GB Li-Ion, first approach based upon measurements */
|
||||
{ 3500, 3676, 3729, 3755, 3778, 3805, 3847, 3919, 3961, 4071, 4109 },
|
||||
#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
|
||||
/* FIXME: calibrate value for other 3G+ ipods */
|
||||
/* Table is "inherited" from iriver H100. */
|
||||
{ 3370, 3650, 3700, 3740, 3780, 3820, 3870, 3930, 4000, 4080, 4160 }
|
||||
/* FIXME: calibrate value for other iPods */
|
||||
/* Table is "provisional" from IPOD_COLOR */
|
||||
{ 3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170 }
|
||||
#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 */
|
||||
const unsigned short percent_to_volt_charge[11] =
|
||||
{
|
||||
#ifdef IPOD_NANO
|
||||
#if defined(IPOD_NANO)
|
||||
/* measured values */
|
||||
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 */
|
||||
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
|
||||
/* FIXME: calibrate value for other 3G+ ipods */
|
||||
/* Table is "inherited" from iriver H100. */
|
||||
3540, 3860, 3930, 3980, 4000, 4020, 4040, 4080, 4130, 4180, 4230
|
||||
/* FIXME: calibrate value for other iPods */
|
||||
/* Table is "provisional" from IPOD_COLOR */
|
||||
3450, 3660, 3700, 3730, 3750, 3770, 3820, 3870, 3920, 4040, 4170
|
||||
#endif
|
||||
};
|
||||
#endif /* CONFIG_CHARGING */
|
||||
|
|
@ -101,12 +118,12 @@ void accessory_supply_set(bool enable)
|
|||
{
|
||||
if (enable)
|
||||
{
|
||||
/* Accessory voltage supply */
|
||||
/* Accessory voltage supply on */
|
||||
pcf50605_write(PCF5060X_D2REGC1, 0xf8); /* 3.3V ON */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Accessory voltage supply */
|
||||
/* Accessory voltage supply off */
|
||||
pcf50605_write(PCF5060X_D2REGC1, 0x18); /* OFF */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue