diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-02-16 22:53:54 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-02-16 22:53:54 +0000 |
commit | 909e4c6c06e004a6063cab014c12bcef6a2b37e5 (patch) | |
tree | b64c604449db683cf13928cda463131bfb0696f0 /firmware/target/arm/ipod | |
parent | 53b1af7a61898ac76a94018fc1863c2a2abf9d3c (diff) |
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
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r-- | firmware/target/arm/ipod/powermgmt-ipod-pcf.c | 65 |
1 files changed, 41 insertions, 24 deletions
diff --git a/firmware/target/arm/ipod/powermgmt-ipod-pcf.c b/firmware/target/arm/ipod/powermgmt-ipod-pcf.c index 703d1da833..5b8f974fda 100644 --- a/firmware/target/arm/ipod/powermgmt-ipod-pcf.c +++ b/firmware/target/arm/ipod/powermgmt-ipod-pcf.c @@ -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 */ } |