summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-03-26 07:11:03 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-03-26 07:11:03 +0000
commitea1b3676de1ef0fba57d64e84ed7c6aada312cca (patch)
tree7339cc7863ee1a9d5c5b1e8320dcbe8e24ba4398 /firmware
parentb6065a8ceb83655d265c6c4adc4f30f7436e7bd7 (diff)
downloadrockbox-ea1b3676de1ef0fba57d64e84ed7c6aada312cca.tar.gz
rockbox-ea1b3676de1ef0fba57d64e84ed7c6aada312cca.tar.bz2
rockbox-ea1b3676de1ef0fba57d64e84ed7c6aada312cca.zip
Clip+: fix battery voltage reading when charging : use ADC_RTCSUP like e200v1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25340 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/powermgmt-target.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/powermgmt-target.h b/firmware/target/arm/as3525/powermgmt-target.h
index 3e9cdad243..5460abace4 100644
--- a/firmware/target/arm/as3525/powermgmt-target.h
+++ b/firmware/target/arm/as3525/powermgmt-target.h
@@ -32,7 +32,13 @@
#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 */
+#if defined(SANSA_CLIP)
#define ADC_BATTERY ADC_BVDD
+#else
+/* ADC_RTCSUP seems to represent battery voltage better than ADC_BVDD during
+ * charging (ADC_BVDD is way too high) and appears the same in normal use. */
+#define ADC_BATTERY ADC_RTCSUP
+#endif
#elif defined(SANSA_E200V2)