summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-07-08 16:53:09 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-07-08 16:53:09 +0000
commitd367ab41e33119e2b6fac8cfff7d652de08012da (patch)
treeea5a0cf4ca8ce13269ff6072b1eab82e2849597b
parent771dc22aa1c33e40888172d4e62be26316caf691 (diff)
downloadrockbox-d367ab41e33119e2b6fac8cfff7d652de08012da.tar.gz
rockbox-d367ab41e33119e2b6fac8cfff7d652de08012da.zip
HD200 - calibrate battery indicator based on measurements and battery_benches
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27350 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/config/mpiohd200.h23
-rw-r--r--firmware/target/coldfire/mpio/hd200/powermgmt-hd200.c9
2 files changed, 14 insertions, 18 deletions
diff --git a/firmware/export/config/mpiohd200.h b/firmware/export/config/mpiohd200.h
index b9e9b11e2d..ca891a6ba5 100644
--- a/firmware/export/config/mpiohd200.h
+++ b/firmware/export/config/mpiohd200.h
@@ -69,9 +69,6 @@
69 69
70#define CONFIG_KEYPAD MPIO_HD200_PAD 70#define CONFIG_KEYPAD MPIO_HD200_PAD
71 71
72#define AB_REPEAT_ENABLE 1
73#define ACTION_WPSAB_SINGLE ACTION_WPS_BROWSE
74
75/* Define this if you do software codec */ 72/* Define this if you do software codec */
76#define CONFIG_CODEC SWCODEC 73#define CONFIG_CODEC SWCODEC
77 74
@@ -118,19 +115,19 @@
118#define CODEC_SRCTRL_44100HZ (0x10 << 1) 115#define CODEC_SRCTRL_44100HZ (0x10 << 1)
119#define CODEC_SRCTRL_88200HZ (0x1E << 1) 116#define CODEC_SRCTRL_88200HZ (0x1E << 1)
120 117
121#define BATTERY_CAPACITY_DEFAULT 950 /* default battery capacity */ 118#define BATTERY_TYPES_COUNT 1
122#define BATTERY_CAPACITY_MIN 950 /* min. capacity selectable */ 119#define BATTERY_CAPACITY_DEFAULT 850 /* this is wild guess */
123#define BATTERY_CAPACITY_MAX 2250 /* max. capacity selectable */ 120#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
124#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 121#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
125#define BATTERY_TYPES_COUNT 1 /* only one type */ 122#define BATTERY_CAPACITY_INC 50 /* capacity increment */
123
124#define CURRENT_NORMAL 68 /* measured during playback unboosted */
125#define CURRENT_BACKLIGHT 24 /* measured */
126#define CURRENT_RECORD 40 /* additional current while recording */
127#define CURRENT_REMOTE 0 /* additional current when remote connected */
126 128
127#define CONFIG_CHARGING CHARGING_MONITOR 129#define CONFIG_CHARGING CHARGING_MONITOR
128 130
129/* define current usage levels */
130/* additional current when remote connected */
131/*
132#define CURRENT_REMOTE 8
133*/
134#ifndef SIMULATOR 131#ifndef SIMULATOR
135 132
136/* Define this if your LCD can set contrast */ 133/* Define this if your LCD can set contrast */
diff --git a/firmware/target/coldfire/mpio/hd200/powermgmt-hd200.c b/firmware/target/coldfire/mpio/hd200/powermgmt-hd200.c
index 23a0bac927..db94b890bb 100644
--- a/firmware/target/coldfire/mpio/hd200/powermgmt-hd200.c
+++ b/firmware/target/coldfire/mpio/hd200/powermgmt-hd200.c
@@ -25,26 +25,25 @@
25 25
26const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = 26const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
27{ 27{
28 3700 28 3600
29}; 29};
30 30
31const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = 31const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
32{ 32{
33 3650 33 3500
34}; 34};
35 35
36/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ 36/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
37const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = 37const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
38{ 38{
39 /* from OF and measurements voltage range is 3.7-4.1 V */ 39 { 3500, 3566, 3597, 3619, 3644, 3676, 3732, 3806, 3868, 3937, 4004 }
40 { 3700, 3740, 3780, 3820, 3860, 3900, 3940, 3980, 4020, 4060, 4100 }
41}; 40};
42 41
43/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ 42/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
44const unsigned short percent_to_volt_charge[11] = 43const unsigned short percent_to_volt_charge[11] =
45{ 44{
46 /* values measured over one full charging cycle */ 45 /* values measured over one full charging cycle */
47 3540, 3860, 3930, 3980, 4000, 4020, 4040, 4080, 4130, 4180, 4230 /* LiPo */ 46 3386, 3872, 3904, 3942, 3996, 4029, 4033, 4036, 4038, 4039, 4041
48}; 47};
49 48
50/* 3.33V as reference */ 49/* 3.33V as reference */