diff options
author | Barry Wardell <rockbox@barrywardell.net> | 2007-03-23 10:59:01 +0000 |
---|---|---|
committer | Barry Wardell <rockbox@barrywardell.net> | 2007-03-23 10:59:01 +0000 |
commit | 74b9ec0bbe11a06a42a609ab03ac536cf7b5e840 (patch) | |
tree | 0c8d0244f4e13cdda1e0a1c9a53a94ecc78e3d8c | |
parent | 7a780dbefce97ceaf4068a85967fda33eae5b725 (diff) |
FS#6860 - Battery calibration for Sansa. Thanks to Matthias Wientapper.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12898 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/export/config-e200.h | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 1 | ||||
-rw-r--r-- | firmware/powermgmt.c | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h index 094bd7f7b0..589883d10e 100644 --- a/firmware/export/config-e200.h +++ b/firmware/export/config-e200.h @@ -83,7 +83,7 @@ #define CONFIG_I2C I2C_PP5020 /* Type of mobile power */ -#define CONFIG_BATTERY BATT_LPCS355385 +#define CONFIG_BATTERY BATT_LIION750 #define BATTERY_CAPACITY_MIN 750 /* min. capacity selectable */ #define BATTERY_CAPACITY_MAX 750 /* max. capacity selectable */ #define BATTERY_CAPACITY_INC 0 /* capacity increment */ diff --git a/firmware/export/config.h b/firmware/export/config.h index c935ac466f..2d7b3e131a 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -77,6 +77,7 @@ #define BATT_LPCS355385 1550 /* iriver h10 20Gb - SKC LPCS355385 */ #define BATT_BP009 820 /* iriver H10 5/6Gb - iriver BP009 */ #define BATT_LIION830 830 /* Toshiba Gigabeat Fxx and Xxx series MK11-2740 */ +#define BATT_LIION750 750 /* Sansa e200 LiIon 3,7V */ #define BATT_1AA 333 /* iRiver iFP: Alkaline, NiHM */ /* CONFIG_CHARGING */ diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index eced1a21a6..5f112c3545 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -190,6 +190,8 @@ static const unsigned int battery_level_dangerous[BATTERY_TYPES_COUNT] = 105, 115 #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver H1x0: LiPolymer */ 338 +#elif CONFIG_BATTERY == BATT_LIION750 /* Sansa e200 */ + 340 #elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */ 345 #elif CONFIG_BATTERY == BATT_IAUDIO_X5M5 /* iAudio X5 */ @@ -211,6 +213,8 @@ static const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 270, 280 #elif CONFIG_BATTERY == BATT_LIPOL1300 /* iRiver Hxxx */ 302 +#elif CONFIG_BATTERY == BATT_LIION750 /* Sansa e200 */ + 330 #elif CONFIG_BATTERY == BATT_LIION830 /* Gigabeat F */ 340 #elif CONFIG_BATTERY == BATT_IAUDIO_X5M5 /* iAudio X5 */ @@ -258,6 +262,9 @@ static const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = #elif CONFIG_BATTERY == BATT_LIION830 /* Toshiba Gigabeat Li Ion 830mAH figured from discharge curve */ { 354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394 }, +#elif CONFIG_BATTERY == BATT_LIION750 + /* Sansa Li Ion 750mAH FIXME this is a first linear approach */ + { 330, 339, 348, 357, 366, 375, 384, 393, 402, 411, 420 }, #else /* NiMH */ /* original values were taken directly after charging, but it should show 100% after turning off the device for some hours, too */ @@ -276,6 +283,9 @@ static const unsigned short percent_to_volt_charge[11] = #if CONFIG_BATTERY == BATT_LIPOL1300 /* values measured over one full charging cycle */ 354, 386, 393, 398, 400, 402, 404, 408, 413, 418, 423 /* LiPo */ +#elif CONFIG_BATTERY == BATT_LIION750 + /* Sansa Li Ion 750mAH FIXME*/ + 330, 339, 348, 357, 366, 375, 384, 393, 402, 411, 420 #elif CONFIG_BATTERY == BATT_LIION830 /* Toshiba Gigabeat Li Ion 830mAH */ 354, 357, 359, 361, 364, 366, 372, 381, 377, 381, 394 |