summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-20 23:16:04 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-20 23:16:04 +0000
commit7f24c3095d7f8f77b9737f391d61a2b37e30a4b0 (patch)
tree2318c8f9a552615b5c88f6c37bf4e3175dc5d7c0 /firmware
parent26c8eebe4ff447349b4980683739c632c84e2f05 (diff)
downloadrockbox-7f24c3095d7f8f77b9737f391d61a2b37e30a4b0.tar.gz
rockbox-7f24c3095d7f8f77b9737f391d61a2b37e30a4b0.tar.bz2
rockbox-7f24c3095d7f8f77b9737f391d61a2b37e30a4b0.zip
Clipv1: charging curve
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26220 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/powermgmt-target.h14
-rw-r--r--firmware/target/arm/as3525/sansa-clip/powermgmt-clip.c3
2 files changed, 12 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/powermgmt-target.h b/firmware/target/arm/as3525/powermgmt-target.h
index 3fc1fe69f7..2fe311db30 100644
--- a/firmware/target/arm/as3525/powermgmt-target.h
+++ b/firmware/target/arm/as3525/powermgmt-target.h
@@ -24,11 +24,19 @@
#include "config.h"
-#if defined(SANSA_CLIP) \
- || defined(SANSA_CLIPPLUS) /* FIXME */
+#if defined(SANSA_CLIP)
/* Check if topped-off and monitor voltage while plugged. */
-#define BATT_FULL_VOLTAGE 4160
+#define BATT_FULL_VOLTAGE 4190
+#define BATT_VAUTO_RECHARGE 4100
+#define BATT_CHG_V CHG_V_4_20V
+#define BATT_CHG_I CHG_I_100MA
+#define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */
+
+#elif defined(SANSA_CLIPPLUS)
+
+/* Check if topped-off and monitor voltage while plugged. */
+#define BATT_FULL_VOLTAGE 4200
#define BATT_VAUTO_RECHARGE 4100
#define BATT_CHG_V CHG_V_4_20V
#define BATT_CHG_I CHG_I_100MA
diff --git a/firmware/target/arm/as3525/sansa-clip/powermgmt-clip.c b/firmware/target/arm/as3525/sansa-clip/powermgmt-clip.c
index d908981523..5006c58347 100644
--- a/firmware/target/arm/as3525/sansa-clip/powermgmt-clip.c
+++ b/firmware/target/arm/as3525/sansa-clip/powermgmt-clip.c
@@ -44,8 +44,7 @@ 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] =
{
- /* TODO: simple linear uncalibrated curve */
- 3300, 3390, 3480, 3570, 3660, 3750, 3840, 3930, 4020, 4110, 4200
+ 3427, 3786, 3842, 3877, 3896, 3924, 3971, 4028, 4084, 4161, 4190
};
#endif /* CONFIG_CHARGING */