summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorUwe Freese <thebreaker@rockbox.org>2003-01-27 11:27:44 +0000
committerUwe Freese <thebreaker@rockbox.org>2003-01-27 11:27:44 +0000
commit8ed1a3a409fadf5c5f45dce7fc4c697d9d290626 (patch)
tree4286d9ba32d18e636e59bb816807ce27935427df /firmware/powermgmt.c
parent2dc923a34637b174da20277ba414c4fc2ed23a35 (diff)
downloadrockbox-8ed1a3a409fadf5c5f45dce7fc4c697d9d290626.tar.gz
rockbox-8ed1a3a409fadf5c5f45dce7fc4c697d9d290626.zip
LiIon values for FM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3169 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index 8fdb168e50..026bfe47c0 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -73,9 +73,15 @@ static int poweroff_idle_timeout_value[15] =
73 73
74static int percent_to_volt_decharge[11] = /* voltages (centivolt) of 0%, 10%, ... 100% when charging disabled */ 74static int percent_to_volt_decharge[11] = /* voltages (centivolt) of 0%, 10%, ... 100% when charging disabled */
75{ 75{
76#ifdef HAVE_LIION
77 /* values guessed, see http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf */
78 /* until someone measures voltages over a decharging cycle */
79 260, 280, 300, 320, 340, 350, 360, 370, 380, 390, 400
80#else /* NiMH */
76 /* original values were taken directly after charging, */ 81 /* original values were taken directly after charging, */
77 /* but it should show 100% after turning off the device for some hours, too */ 82 /* but it should show 100% after turning off the device for some hours, too */
78 450, 481, 491, 497, 503, 507, 512, 514, 517, 525, 540 /* orig. values: ...,528,560 */ 83 450, 481, 491, 497, 503, 507, 512, 514, 517, 525, 540 /* orig. values: ...,528,560 */
84#endif
79}; 85};
80 86
81void set_battery_capacity(int capacity) 87void set_battery_capacity(int capacity)
@@ -99,7 +105,13 @@ int charge_state = 0; /* at the beginning, the charger
99 105
100static int percent_to_volt_charge[11] = /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */ 106static int percent_to_volt_charge[11] = /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */
101{ 107{
108#ifdef HAVE_LIION
109 /* values guessed, see http://www.seattlerobotics.org/encoder/200210/LiIon2.pdf */
110 /* until someone measures voltages over a charging cycle */
111 260, 290, 320, 340, 360, 370, 380, 390, 400, 410, 420
112#else /* NiMH */
102 476, 544, 551, 556, 561, 564, 566, 576, 582, 584, 585 113 476, 544, 551, 556, 561, 564, 566, 576, 582, 584, 585
114#endif
103}; 115};
104 116
105void enable_trickle_charge(bool on) 117void enable_trickle_charge(bool on)