summaryrefslogtreecommitdiff
path: root/firmware/export/config
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-03 23:44:38 +0000
committerThomas Martitz <kugel@rockbox.org>2012-01-03 23:44:38 +0000
commitc1bd9b0361ba92c29ceef68d74093e70a1a3e481 (patch)
tree1a42acdf2099b7f5ac06eee11e1d488b388c6d9f /firmware/export/config
parent949e6398c89e3c277a4c542f67a5ee788c6f642d (diff)
downloadrockbox-c1bd9b0361ba92c29ceef68d74093e70a1a3e481.tar.gz
rockbox-c1bd9b0361ba92c29ceef68d74093e70a1a3e481.zip
Rework powermgmt to enable code re-use on appliation and sims.
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/config')
-rw-r--r--firmware/export/config/android.h6
-rw-r--r--firmware/export/config/archosfmrecorder.h2
-rw-r--r--firmware/export/config/archosondiofm.h2
-rw-r--r--firmware/export/config/archosondiosp.h2
-rw-r--r--firmware/export/config/archosplayer.h2
-rw-r--r--firmware/export/config/archosrecorder.h2
-rw-r--r--firmware/export/config/archosrecorderv2.h2
-rw-r--r--firmware/export/config/cowond2.h2
-rw-r--r--firmware/export/config/creativezv.h2
-rw-r--r--firmware/export/config/gigabeatfx.h2
-rw-r--r--firmware/export/config/gigabeats.h2
-rw-r--r--firmware/export/config/gogearhdd1630.h2
-rw-r--r--firmware/export/config/gogearhdd6330.h2
-rw-r--r--firmware/export/config/gogearsa9200.h2
-rw-r--r--firmware/export/config/hifimanhm60x.h2
-rw-r--r--firmware/export/config/hifimanhm801.h2
-rw-r--r--firmware/export/config/iaudio7.h2
-rw-r--r--firmware/export/config/iaudiom3.h2
-rw-r--r--firmware/export/config/iaudiom5.h2
-rw-r--r--firmware/export/config/iaudiox5.h2
-rw-r--r--firmware/export/config/ipod1g2g.h2
-rw-r--r--firmware/export/config/ipod3g.h2
-rw-r--r--firmware/export/config/ipod4g.h2
-rw-r--r--firmware/export/config/ipod6g.h2
-rw-r--r--firmware/export/config/ipodcolor.h2
-rw-r--r--firmware/export/config/ipodmini1g.h2
-rw-r--r--firmware/export/config/ipodmini2g.h2
-rw-r--r--firmware/export/config/ipodnano1g.h2
-rw-r--r--firmware/export/config/ipodnano2g.h2
-rw-r--r--firmware/export/config/ipodvideo.h2
-rw-r--r--firmware/export/config/iriverh10.h2
-rw-r--r--firmware/export/config/iriverh100.h2
-rw-r--r--firmware/export/config/iriverh10_5gb.h2
-rw-r--r--firmware/export/config/iriverh120.h2
-rw-r--r--firmware/export/config/iriverh300.h2
-rw-r--r--firmware/export/config/iriverifp7xx.h2
-rw-r--r--firmware/export/config/logikdax.h2
-rw-r--r--firmware/export/config/lyreproto1.h2
-rw-r--r--firmware/export/config/meizum3.h2
-rw-r--r--firmware/export/config/meizum6sl.h2
-rw-r--r--firmware/export/config/meizum6sp.h2
-rw-r--r--firmware/export/config/mini2440.h2
-rw-r--r--firmware/export/config/mpiohd200.h2
-rw-r--r--firmware/export/config/mpiohd300.h2
-rw-r--r--firmware/export/config/mrobe100.h2
-rw-r--r--firmware/export/config/mrobe500.h2
-rw-r--r--firmware/export/config/nokian8xx.h9
-rw-r--r--firmware/export/config/nokian900.h11
-rw-r--r--firmware/export/config/ondavx747.h2
-rw-r--r--firmware/export/config/ondavx767.h2
-rw-r--r--firmware/export/config/ondavx777.h2
-rw-r--r--firmware/export/config/rk27generic.h2
-rw-r--r--firmware/export/config/samsungyh820.h2
-rw-r--r--firmware/export/config/samsungyh920.h2
-rw-r--r--firmware/export/config/samsungyh925.h2
-rw-r--r--firmware/export/config/samsungypr0.h2
-rw-r--r--firmware/export/config/samsungyps3.h2
-rw-r--r--firmware/export/config/sansac100.h2
-rw-r--r--firmware/export/config/sansac200.h2
-rw-r--r--firmware/export/config/sansac200v2.h2
-rw-r--r--firmware/export/config/sansaclip.h2
-rw-r--r--firmware/export/config/sansaclipplus.h2
-rw-r--r--firmware/export/config/sansaclipv2.h2
-rw-r--r--firmware/export/config/sansaclipzip.h2
-rw-r--r--firmware/export/config/sansaconnect.h2
-rw-r--r--firmware/export/config/sansae200.h2
-rw-r--r--firmware/export/config/sansae200v2.h2
-rw-r--r--firmware/export/config/sansafuze.h2
-rw-r--r--firmware/export/config/sansafuzeplus.h2
-rw-r--r--firmware/export/config/sansafuzev2.h2
-rw-r--r--firmware/export/config/sansam200.h2
-rw-r--r--firmware/export/config/sansam200v4.h2
-rw-r--r--firmware/export/config/sansaview.h2
-rw-r--r--firmware/export/config/sdlapp.h5
-rw-r--r--firmware/export/config/sim.h5
-rw-r--r--firmware/export/config/tatungtpj1022.h2
-rw-r--r--firmware/export/config/vibe500.h2
-rw-r--r--firmware/export/config/zenvisionm30gb.h2
-rw-r--r--firmware/export/config/zenvisionm60gb.h2
79 files changed, 163 insertions, 21 deletions
diff --git a/firmware/export/config/android.h b/firmware/export/config/android.h
index 41ecacfb9d..6261a80b06 100644
--- a/firmware/export/config/android.h
+++ b/firmware/export/config/android.h
@@ -86,11 +86,9 @@
86 86
87#define HAVE_HEADPHONE_DETECTION 87#define HAVE_HEADPHONE_DETECTION
88 88
89/* Define current usage levels. */ 89#define CONFIG_BATTERY_MEASURE PERCENTAGE_MEASURE
90#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
91#define CURRENT_BACKLIGHT 30 /* TBD */
92#define CURRENT_RECORD 0 /* no recording yet */
93 90
91#define NO_LOW_BATTERY_SHUTDOWN
94/* Define this to the CPU frequency */ 92/* Define this to the CPU frequency */
95/* 93/*
96#define CPU_FREQ 48000000 94#define CPU_FREQ 48000000
diff --git a/firmware/export/config/archosfmrecorder.h b/firmware/export/config/archosfmrecorder.h
index 3e2c7e932e..6b1f07f752 100644
--- a/firmware/export/config/archosfmrecorder.h
+++ b/firmware/export/config/archosfmrecorder.h
@@ -91,6 +91,8 @@
91#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 91#define BATTERY_CAPACITY_INC 50 /* capacity increment */
92#define BATTERY_TYPES_COUNT 1 /* only one type */ 92#define BATTERY_TYPES_COUNT 1 /* only one type */
93 93
94#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
95
94#define CURRENT_NORMAL 145 /* usual current in mA */ 96#define CURRENT_NORMAL 145 /* usual current in mA */
95#define CURRENT_RECORD 35 /* additional recording current */ 97#define CURRENT_RECORD 35 /* additional recording current */
96#define CURRENT_USB 500 /* usual current in mA in USB mode */ 98#define CURRENT_USB 500 /* usual current in mA in USB mode */
diff --git a/firmware/export/config/archosondiofm.h b/firmware/export/config/archosondiofm.h
index 516845e49d..1a1115f318 100644
--- a/firmware/export/config/archosondiofm.h
+++ b/firmware/export/config/archosondiofm.h
@@ -73,6 +73,8 @@
73#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 73#define BATTERY_CAPACITY_INC 50 /* capacity increment */
74#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */ 74#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
75 75
76#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
77
76/* define this if the unit should not shut down on low battery. */ 78/* define this if the unit should not shut down on low battery. */
77#define NO_LOW_BATTERY_SHUTDOWN 79#define NO_LOW_BATTERY_SHUTDOWN
78 80
diff --git a/firmware/export/config/archosondiosp.h b/firmware/export/config/archosondiosp.h
index ba957f7f44..aad66b7f45 100644
--- a/firmware/export/config/archosondiosp.h
+++ b/firmware/export/config/archosondiosp.h
@@ -60,6 +60,8 @@
60#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 60#define BATTERY_CAPACITY_INC 50 /* capacity increment */
61#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */ 61#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
62 62
63#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
64
63/* define this if the unit should not shut down on low battery. */ 65/* define this if the unit should not shut down on low battery. */
64#define NO_LOW_BATTERY_SHUTDOWN 66#define NO_LOW_BATTERY_SHUTDOWN
65 67
diff --git a/firmware/export/config/archosplayer.h b/firmware/export/config/archosplayer.h
index bc75433950..af125571ba 100644
--- a/firmware/export/config/archosplayer.h
+++ b/firmware/export/config/archosplayer.h
@@ -49,6 +49,8 @@
49#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 49#define BATTERY_CAPACITY_INC 50 /* capacity increment */
50#define BATTERY_TYPES_COUNT 1 /* only one type */ 50#define BATTERY_TYPES_COUNT 1 /* only one type */
51 51
52#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
53
52#define CURRENT_NORMAL 145 /* usual current in mA */ 54#define CURRENT_NORMAL 145 /* usual current in mA */
53#define CURRENT_USB 500 /* usual current in mA in USB mode */ 55#define CURRENT_USB 500 /* usual current in mA in USB mode */
54 56
diff --git a/firmware/export/config/archosrecorder.h b/firmware/export/config/archosrecorder.h
index be7c872b0e..6c708fb450 100644
--- a/firmware/export/config/archosrecorder.h
+++ b/firmware/export/config/archosrecorder.h
@@ -80,6 +80,8 @@
80#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 80#define BATTERY_CAPACITY_INC 50 /* capacity increment */
81#define BATTERY_TYPES_COUNT 1 /* only one type */ 81#define BATTERY_TYPES_COUNT 1 /* only one type */
82 82
83#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
84
83#if MEMORYSIZE < 8 85#if MEMORYSIZE < 8
84 #define CURRENT_NORMAL 145 /* usual current in mA */ 86 #define CURRENT_NORMAL 145 /* usual current in mA */
85#else 87#else
diff --git a/firmware/export/config/archosrecorderv2.h b/firmware/export/config/archosrecorderv2.h
index e2f3b66a82..dae34ef226 100644
--- a/firmware/export/config/archosrecorderv2.h
+++ b/firmware/export/config/archosrecorderv2.h
@@ -86,6 +86,8 @@
86#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 86#define BATTERY_CAPACITY_INC 50 /* capacity increment */
87#define BATTERY_TYPES_COUNT 1 /* only one type */ 87#define BATTERY_TYPES_COUNT 1 /* only one type */
88 88
89#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
90
89#define CURRENT_NORMAL 145 /* usual current in mA */ 91#define CURRENT_NORMAL 145 /* usual current in mA */
90#define CURRENT_RECORD 35 /* additional recording current */ 92#define CURRENT_RECORD 35 /* additional recording current */
91#define CURRENT_USB 500 /* usual current in mA in USB mode */ 93#define CURRENT_USB 500 /* usual current in mA in USB mode */
diff --git a/firmware/export/config/cowond2.h b/firmware/export/config/cowond2.h
index ebaa636ac7..03fbb4fbb8 100644
--- a/firmware/export/config/cowond2.h
+++ b/firmware/export/config/cowond2.h
@@ -136,6 +136,8 @@
136#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 136#define BATTERY_CAPACITY_INC 50 /* capacity increment */
137#define BATTERY_TYPES_COUNT 1 /* only one type */ 137#define BATTERY_TYPES_COUNT 1 /* only one type */
138 138
139#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
140
139/* Hardware controlled charging */ 141/* Hardware controlled charging */
140#define CONFIG_CHARGING CHARGING_SIMPLE 142#define CONFIG_CHARGING CHARGING_SIMPLE
141 143
diff --git a/firmware/export/config/creativezv.h b/firmware/export/config/creativezv.h
index 0fd216aae6..568144b698 100644
--- a/firmware/export/config/creativezv.h
+++ b/firmware/export/config/creativezv.h
@@ -130,6 +130,8 @@
130#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 130#define BATTERY_CAPACITY_INC 100 /* capacity increment */
131#define BATTERY_TYPES_COUNT 1 /* only one type */ 131#define BATTERY_TYPES_COUNT 1 /* only one type */
132 132
133#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
134
133/* Hardware controlled charging with monitoring */ 135/* Hardware controlled charging with monitoring */
134//#define CONFIG_CHARGING CHARGING_MONITOR 136//#define CONFIG_CHARGING CHARGING_MONITOR
135 137
diff --git a/firmware/export/config/gigabeatfx.h b/firmware/export/config/gigabeatfx.h
index b64f3f5b3b..fbaa4a0f31 100644
--- a/firmware/export/config/gigabeatfx.h
+++ b/firmware/export/config/gigabeatfx.h
@@ -129,6 +129,8 @@
129#define BATTERY_CAPACITY_INC 25 /* capacity increment */ 129#define BATTERY_CAPACITY_INC 25 /* capacity increment */
130#define BATTERY_TYPES_COUNT 1 /* only one type */ 130#define BATTERY_TYPES_COUNT 1 /* only one type */
131 131
132#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
133
132/* Hardware controlled charging with monitoring */ 134/* Hardware controlled charging with monitoring */
133#define CONFIG_CHARGING CHARGING_MONITOR 135#define CONFIG_CHARGING CHARGING_MONITOR
134 136
diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h
index 685076bfa3..f7fdc449c4 100644
--- a/firmware/export/config/gigabeats.h
+++ b/firmware/export/config/gigabeats.h
@@ -173,6 +173,8 @@
173#define BATTERY_CAPACITY_INC 25 /* capacity increment */ 173#define BATTERY_CAPACITY_INC 25 /* capacity increment */
174#define BATTERY_TYPES_COUNT 1 /* only one type */ 174#define BATTERY_TYPES_COUNT 1 /* only one type */
175 175
176#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
177
176/* TODO: have a proper status displayed in the bootloader and have it 178/* TODO: have a proper status displayed in the bootloader and have it
177 * work! */ 179 * work! */
178/* Charging implemented in a target-specific algorithm */ 180/* Charging implemented in a target-specific algorithm */
diff --git a/firmware/export/config/gogearhdd1630.h b/firmware/export/config/gogearhdd1630.h
index e9bbfb872a..05f1a472a6 100644
--- a/firmware/export/config/gogearhdd1630.h
+++ b/firmware/export/config/gogearhdd1630.h
@@ -141,6 +141,8 @@
141#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 141#define BATTERY_CAPACITY_INC 0 /* capacity increment */
142#define BATTERY_TYPES_COUNT 1 /* only one type */ 142#define BATTERY_TYPES_COUNT 1 /* only one type */
143 143
144#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
145
144/* Hardware controlled charging */ 146/* Hardware controlled charging */
145#define CONFIG_CHARGING CHARGING_SIMPLE 147#define CONFIG_CHARGING CHARGING_SIMPLE
146 148
diff --git a/firmware/export/config/gogearhdd6330.h b/firmware/export/config/gogearhdd6330.h
index fc326dac89..b8ee918da1 100644
--- a/firmware/export/config/gogearhdd6330.h
+++ b/firmware/export/config/gogearhdd6330.h
@@ -144,6 +144,8 @@
144#define BATTERY_CAPACITY_INC 20 /* capacity increment */ 144#define BATTERY_CAPACITY_INC 20 /* capacity increment */
145#define BATTERY_TYPES_COUNT 1 /* only one type */ 145#define BATTERY_TYPES_COUNT 1 /* only one type */
146 146
147#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
148
147/* Hardware controlled charging */ 149/* Hardware controlled charging */
148#define CONFIG_CHARGING CHARGING_SIMPLE 150#define CONFIG_CHARGING CHARGING_SIMPLE
149 151
diff --git a/firmware/export/config/gogearsa9200.h b/firmware/export/config/gogearsa9200.h
index b91430e6de..e29c8dcddc 100644
--- a/firmware/export/config/gogearsa9200.h
+++ b/firmware/export/config/gogearsa9200.h
@@ -125,6 +125,8 @@
125#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 125#define BATTERY_CAPACITY_INC 0 /* capacity increment */
126#define BATTERY_TYPES_COUNT 1 /* only one type */ 126#define BATTERY_TYPES_COUNT 1 /* only one type */
127 127
128#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
129
128/* Charging implemented in a target-specific algorithm */ 130/* Charging implemented in a target-specific algorithm */
129#define CONFIG_CHARGING CHARGING_TARGET 131#define CONFIG_CHARGING CHARGING_TARGET
130#define HAVE_POWEROFF_WHILE_CHARGING 132#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/hifimanhm60x.h b/firmware/export/config/hifimanhm60x.h
index 6ac43803f3..bdc6124833 100644
--- a/firmware/export/config/hifimanhm60x.h
+++ b/firmware/export/config/hifimanhm60x.h
@@ -130,6 +130,8 @@
130#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 130#define BATTERY_CAPACITY_INC 10 /* capacity increment */
131#define BATTERY_TYPES_COUNT 1 /* only one type */ 131#define BATTERY_TYPES_COUNT 1 /* only one type */
132 132
133#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
134
133/* Hardware controlled charging with monitoring */ 135/* Hardware controlled charging with monitoring */
134#define CONFIG_CHARGING CHARGING_MONITOR 136#define CONFIG_CHARGING CHARGING_MONITOR
135 137
diff --git a/firmware/export/config/hifimanhm801.h b/firmware/export/config/hifimanhm801.h
index 469c423a27..a5b5aeead8 100644
--- a/firmware/export/config/hifimanhm801.h
+++ b/firmware/export/config/hifimanhm801.h
@@ -118,6 +118,8 @@
118#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 118#define BATTERY_CAPACITY_INC 50 /* capacity increment */
119#define BATTERY_TYPES_COUNT 1 /* only one type */ 119#define BATTERY_TYPES_COUNT 1 /* only one type */
120 120
121#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
122
121/* Hardware controlled charging with monitoring */ 123/* Hardware controlled charging with monitoring */
122#define CONFIG_CHARGING CHARGING_MONITOR 124#define CONFIG_CHARGING CHARGING_MONITOR
123 125
diff --git a/firmware/export/config/iaudio7.h b/firmware/export/config/iaudio7.h
index 8a04bc06c2..0664ff00ed 100644
--- a/firmware/export/config/iaudio7.h
+++ b/firmware/export/config/iaudio7.h
@@ -131,6 +131,8 @@
131#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 131#define BATTERY_CAPACITY_INC 50 /* capacity increment */
132#define BATTERY_TYPES_COUNT 1 /* only one type */ 132#define BATTERY_TYPES_COUNT 1 /* only one type */
133 133
134#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
135
134#define CONFIG_CHARGING CHARGING_SIMPLE 136#define CONFIG_CHARGING CHARGING_SIMPLE
135 137
136/* Define this if you have a TCC770 */ 138/* Define this if you have a TCC770 */
diff --git a/firmware/export/config/iaudiom3.h b/firmware/export/config/iaudiom3.h
index 6fdf11ca77..d2f90641db 100644
--- a/firmware/export/config/iaudiom3.h
+++ b/firmware/export/config/iaudiom3.h
@@ -114,6 +114,8 @@
114#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 114#define BATTERY_CAPACITY_INC 50 /* capacity increment */
115#define BATTERY_TYPES_COUNT 1 /* only one type */ 115#define BATTERY_TYPES_COUNT 1 /* only one type */
116 116
117#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
118
117/* Hardware controlled charging? FIXME */ 119/* Hardware controlled charging? FIXME */
118#define CONFIG_CHARGING CHARGING_SIMPLE 120#define CONFIG_CHARGING CHARGING_SIMPLE
119 121
diff --git a/firmware/export/config/iaudiom5.h b/firmware/export/config/iaudiom5.h
index ad86308667..0bc3ed5630 100644
--- a/firmware/export/config/iaudiom5.h
+++ b/firmware/export/config/iaudiom5.h
@@ -138,6 +138,8 @@
138#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 138#define BATTERY_CAPACITY_INC 50 /* capacity increment */
139#define BATTERY_TYPES_COUNT 1 /* only one type */ 139#define BATTERY_TYPES_COUNT 1 /* only one type */
140 140
141#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
142
141/* Hardware controlled charging? FIXME */ 143/* Hardware controlled charging? FIXME */
142#define CONFIG_CHARGING CHARGING_SIMPLE 144#define CONFIG_CHARGING CHARGING_SIMPLE
143 145
diff --git a/firmware/export/config/iaudiox5.h b/firmware/export/config/iaudiox5.h
index 2083095c2b..b88583c4b1 100644
--- a/firmware/export/config/iaudiox5.h
+++ b/firmware/export/config/iaudiox5.h
@@ -141,6 +141,8 @@
141#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 141#define BATTERY_CAPACITY_INC 50 /* capacity increment */
142#define BATTERY_TYPES_COUNT 1 /* only one type */ 142#define BATTERY_TYPES_COUNT 1 /* only one type */
143 143
144#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
145
144/* Hardware controlled charging? FIXME */ 146/* Hardware controlled charging? FIXME */
145#define CONFIG_CHARGING CHARGING_SIMPLE 147#define CONFIG_CHARGING CHARGING_SIMPLE
146 148
diff --git a/firmware/export/config/ipod1g2g.h b/firmware/export/config/ipod1g2g.h
index 0ce5d45590..b2b1f4a498 100644
--- a/firmware/export/config/ipod1g2g.h
+++ b/firmware/export/config/ipod1g2g.h
@@ -130,6 +130,8 @@
130#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 130#define BATTERY_CAPACITY_INC 50 /* capacity increment */
131#define BATTERY_TYPES_COUNT 1 /* only one type */ 131#define BATTERY_TYPES_COUNT 1 /* only one type */
132 132
133#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
134
133/* Hardware controlled charging? FIXME */ 135/* Hardware controlled charging? FIXME */
134//#define CONFIG_CHARGING CHARGING_SIMPLE 136//#define CONFIG_CHARGING CHARGING_SIMPLE
135 137
diff --git a/firmware/export/config/ipod3g.h b/firmware/export/config/ipod3g.h
index e7d8bff53b..16bd1072b4 100644
--- a/firmware/export/config/ipod3g.h
+++ b/firmware/export/config/ipod3g.h
@@ -137,6 +137,8 @@
137#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 137#define BATTERY_CAPACITY_INC 10 /* capacity increment */
138#define BATTERY_TYPES_COUNT 1 /* only one type */ 138#define BATTERY_TYPES_COUNT 1 /* only one type */
139 139
140#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
141
140/* Hardware controlled charging? FIXME */ 142/* Hardware controlled charging? FIXME */
141#define CONFIG_CHARGING CHARGING_SIMPLE 143#define CONFIG_CHARGING CHARGING_SIMPLE
142 144
diff --git a/firmware/export/config/ipod4g.h b/firmware/export/config/ipod4g.h
index 957e3a4da5..5ddde1b186 100644
--- a/firmware/export/config/ipod4g.h
+++ b/firmware/export/config/ipod4g.h
@@ -143,6 +143,8 @@
143#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 143#define BATTERY_CAPACITY_INC 10 /* capacity increment */
144#define BATTERY_TYPES_COUNT 1 /* only one type */ 144#define BATTERY_TYPES_COUNT 1 /* only one type */
145 145
146#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
147
146/* Hardware controlled charging? */ 148/* Hardware controlled charging? */
147#define CONFIG_CHARGING CHARGING_MONITOR 149#define CONFIG_CHARGING CHARGING_MONITOR
148 150
diff --git a/firmware/export/config/ipod6g.h b/firmware/export/config/ipod6g.h
index 95837cce12..08c0f27ef0 100644
--- a/firmware/export/config/ipod6g.h
+++ b/firmware/export/config/ipod6g.h
@@ -145,6 +145,8 @@
145#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 145#define BATTERY_CAPACITY_INC 10 /* capacity increment */
146#define BATTERY_TYPES_COUNT 1 /* only one type */ 146#define BATTERY_TYPES_COUNT 1 /* only one type */
147 147
148#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
149
148/* Hardware controlled charging with monitoring */ 150/* Hardware controlled charging with monitoring */
149#define CONFIG_CHARGING CHARGING_MONITOR 151#define CONFIG_CHARGING CHARGING_MONITOR
150 152
diff --git a/firmware/export/config/ipodcolor.h b/firmware/export/config/ipodcolor.h
index cf021019b4..9768ac38aa 100644
--- a/firmware/export/config/ipodcolor.h
+++ b/firmware/export/config/ipodcolor.h
@@ -130,6 +130,8 @@
130#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 130#define BATTERY_CAPACITY_INC 10 /* capacity increment */
131#define BATTERY_TYPES_COUNT 1 /* only one type */ 131#define BATTERY_TYPES_COUNT 1 /* only one type */
132 132
133#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
134
133/* Hardware controlled charging? */ 135/* Hardware controlled charging? */
134#define CONFIG_CHARGING CHARGING_MONITOR 136#define CONFIG_CHARGING CHARGING_MONITOR
135 137
diff --git a/firmware/export/config/ipodmini1g.h b/firmware/export/config/ipodmini1g.h
index 04fa68e500..b1f6fa1b1a 100644
--- a/firmware/export/config/ipodmini1g.h
+++ b/firmware/export/config/ipodmini1g.h
@@ -141,6 +141,8 @@
141#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 141#define BATTERY_CAPACITY_INC 10 /* capacity increment */
142#define BATTERY_TYPES_COUNT 1 /* only one type */ 142#define BATTERY_TYPES_COUNT 1 /* only one type */
143 143
144#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
145
144/* define current usage levels */ 146/* define current usage levels */
145#define CURRENT_NORMAL 50 /* PP5024 uses ~40mA, so add some for disk */ 147#define CURRENT_NORMAL 50 /* PP5024 uses ~40mA, so add some for disk */
146#define CURRENT_BACKLIGHT 20 /* FIXME: This needs to be measured */ 148#define CURRENT_BACKLIGHT 20 /* FIXME: This needs to be measured */
diff --git a/firmware/export/config/ipodmini2g.h b/firmware/export/config/ipodmini2g.h
index c10284e7a4..27edf100ae 100644
--- a/firmware/export/config/ipodmini2g.h
+++ b/firmware/export/config/ipodmini2g.h
@@ -142,6 +142,8 @@
142#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 142#define BATTERY_CAPACITY_INC 50 /* capacity increment */
143#define BATTERY_TYPES_COUNT 1 /* only one type */ 143#define BATTERY_TYPES_COUNT 1 /* only one type */
144 144
145#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
146
145/* define current usage levels */ 147/* define current usage levels */
146#define CURRENT_NORMAL 50 /* PP5024 uses ~40mA, so add some for disk */ 148#define CURRENT_NORMAL 50 /* PP5024 uses ~40mA, so add some for disk */
147#define CURRENT_BACKLIGHT 20 /* FIXME: This needs to be measured */ 149#define CURRENT_BACKLIGHT 20 /* FIXME: This needs to be measured */
diff --git a/firmware/export/config/ipodnano1g.h b/firmware/export/config/ipodnano1g.h
index 50f0511384..40f6cf28aa 100644
--- a/firmware/export/config/ipodnano1g.h
+++ b/firmware/export/config/ipodnano1g.h
@@ -134,6 +134,8 @@
134#define BATTERY_CAPACITY_INC 20 /* capacity increment */ 134#define BATTERY_CAPACITY_INC 20 /* capacity increment */
135#define BATTERY_TYPES_COUNT 1 /* only one type */ 135#define BATTERY_TYPES_COUNT 1 /* only one type */
136 136
137#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
138
137/* Hardware controlled charging with monitoring */ 139/* Hardware controlled charging with monitoring */
138#define CONFIG_CHARGING CHARGING_MONITOR 140#define CONFIG_CHARGING CHARGING_MONITOR
139 141
diff --git a/firmware/export/config/ipodnano2g.h b/firmware/export/config/ipodnano2g.h
index e0941e03b0..2e4f189d31 100644
--- a/firmware/export/config/ipodnano2g.h
+++ b/firmware/export/config/ipodnano2g.h
@@ -148,6 +148,8 @@
148#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 148#define BATTERY_CAPACITY_INC 10 /* capacity increment */
149#define BATTERY_TYPES_COUNT 1 /* only one type */ 149#define BATTERY_TYPES_COUNT 1 /* only one type */
150 150
151#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
152
151/* Hardware controlled charging with monitoring */ 153/* Hardware controlled charging with monitoring */
152#define CONFIG_CHARGING CHARGING_MONITOR 154#define CONFIG_CHARGING CHARGING_MONITOR
153 155
diff --git a/firmware/export/config/ipodvideo.h b/firmware/export/config/ipodvideo.h
index c4e2cb2986..7e123d08d7 100644
--- a/firmware/export/config/ipodvideo.h
+++ b/firmware/export/config/ipodvideo.h
@@ -149,6 +149,8 @@
149#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 149#define BATTERY_CAPACITY_INC 50 /* capacity increment */
150#define BATTERY_TYPES_COUNT 1 /* only one type */ 150#define BATTERY_TYPES_COUNT 1 /* only one type */
151 151
152#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
153
152/* Hardware controlled charging with monitoring */ 154/* Hardware controlled charging with monitoring */
153#define CONFIG_CHARGING CHARGING_MONITOR 155#define CONFIG_CHARGING CHARGING_MONITOR
154 156
diff --git a/firmware/export/config/iriverh10.h b/firmware/export/config/iriverh10.h
index d2d7a0cb7a..3611093913 100644
--- a/firmware/export/config/iriverh10.h
+++ b/firmware/export/config/iriverh10.h
@@ -127,6 +127,8 @@
127#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 127#define BATTERY_CAPACITY_INC 50 /* capacity increment */
128#define BATTERY_TYPES_COUNT 1 /* only one type */ 128#define BATTERY_TYPES_COUNT 1 /* only one type */
129 129
130#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
131
130/* Hardware controlled charging */ 132/* Hardware controlled charging */
131#define CONFIG_CHARGING CHARGING_SIMPLE 133#define CONFIG_CHARGING CHARGING_SIMPLE
132 134
diff --git a/firmware/export/config/iriverh100.h b/firmware/export/config/iriverh100.h
index 1a89c7ca2d..644726541f 100644
--- a/firmware/export/config/iriverh100.h
+++ b/firmware/export/config/iriverh100.h
@@ -131,6 +131,8 @@
131#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 131#define BATTERY_CAPACITY_INC 50 /* capacity increment */
132#define BATTERY_TYPES_COUNT 1 /* only one type */ 132#define BATTERY_TYPES_COUNT 1 /* only one type */
133 133
134#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
135
134/* Hardware controlled charging */ 136/* Hardware controlled charging */
135#define CONFIG_CHARGING CHARGING_SIMPLE 137#define CONFIG_CHARGING CHARGING_SIMPLE
136 138
diff --git a/firmware/export/config/iriverh10_5gb.h b/firmware/export/config/iriverh10_5gb.h
index 0ad83cb85d..84c0b370ab 100644
--- a/firmware/export/config/iriverh10_5gb.h
+++ b/firmware/export/config/iriverh10_5gb.h
@@ -110,6 +110,8 @@
110#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 110#define BATTERY_CAPACITY_INC 10 /* capacity increment */
111#define BATTERY_TYPES_COUNT 1 /* only one type */ 111#define BATTERY_TYPES_COUNT 1 /* only one type */
112 112
113#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
114
113/* Hardware controlled charging */ 115/* Hardware controlled charging */
114#define CONFIG_CHARGING CHARGING_SIMPLE 116#define CONFIG_CHARGING CHARGING_SIMPLE
115 117
diff --git a/firmware/export/config/iriverh120.h b/firmware/export/config/iriverh120.h
index 199b948245..5bab810df2 100644
--- a/firmware/export/config/iriverh120.h
+++ b/firmware/export/config/iriverh120.h
@@ -135,6 +135,8 @@
135#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 135#define BATTERY_CAPACITY_INC 50 /* capacity increment */
136#define BATTERY_TYPES_COUNT 1 /* only one type */ 136#define BATTERY_TYPES_COUNT 1 /* only one type */
137 137
138#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
139
138/* Hardware controlled charging */ 140/* Hardware controlled charging */
139#define CONFIG_CHARGING CHARGING_SIMPLE 141#define CONFIG_CHARGING CHARGING_SIMPLE
140 142
diff --git a/firmware/export/config/iriverh300.h b/firmware/export/config/iriverh300.h
index dbe701362a..4250153c04 100644
--- a/firmware/export/config/iriverh300.h
+++ b/firmware/export/config/iriverh300.h
@@ -130,6 +130,8 @@
130#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 130#define BATTERY_CAPACITY_INC 50 /* capacity increment */
131#define BATTERY_TYPES_COUNT 1 /* only one type */ 131#define BATTERY_TYPES_COUNT 1 /* only one type */
132 132
133#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
134
133/* Hardware controlled charging with monitoring */ 135/* Hardware controlled charging with monitoring */
134#define CONFIG_CHARGING CHARGING_MONITOR 136#define CONFIG_CHARGING CHARGING_MONITOR
135 137
diff --git a/firmware/export/config/iriverifp7xx.h b/firmware/export/config/iriverifp7xx.h
index 78c0783d27..1de6adc25a 100644
--- a/firmware/export/config/iriverifp7xx.h
+++ b/firmware/export/config/iriverifp7xx.h
@@ -70,6 +70,8 @@
70#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 70#define BATTERY_CAPACITY_INC 50 /* capacity increment */
71#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */ 71#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
72 72
73#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
74
73/* define this if the unit should not shut down on low battery. */ 75/* define this if the unit should not shut down on low battery. */
74#define NO_LOW_BATTERY_SHUTDOWN 76#define NO_LOW_BATTERY_SHUTDOWN
75 77
diff --git a/firmware/export/config/logikdax.h b/firmware/export/config/logikdax.h
index 45f5651a43..ed6cbba531 100644
--- a/firmware/export/config/logikdax.h
+++ b/firmware/export/config/logikdax.h
@@ -102,6 +102,8 @@
102#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 102#define BATTERY_CAPACITY_INC 50 /* capacity increment */
103#define BATTERY_TYPES_COUNT 1 /* only one type */ 103#define BATTERY_TYPES_COUNT 1 /* only one type */
104 104
105#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
106
105/* define this if the unit should not shut down on low battery. */ 107/* define this if the unit should not shut down on low battery. */
106#define NO_LOW_BATTERY_SHUTDOWN 108#define NO_LOW_BATTERY_SHUTDOWN
107 109
diff --git a/firmware/export/config/lyreproto1.h b/firmware/export/config/lyreproto1.h
index 1413adc7e3..95808cf2f5 100644
--- a/firmware/export/config/lyreproto1.h
+++ b/firmware/export/config/lyreproto1.h
@@ -84,6 +84,8 @@
84#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 84#define BATTERY_CAPACITY_INC 100 /* capacity increment */
85#define BATTERY_TYPES_COUNT 1 /* only one type */ 85#define BATTERY_TYPES_COUNT 1 /* only one type */
86 86
87#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
88
87#define CONFIG_CPU AT91SAM9260 89#define CONFIG_CPU AT91SAM9260
88 90
89/* Define this to the CPU frequency */ 91/* Define this to the CPU frequency */
diff --git a/firmware/export/config/meizum3.h b/firmware/export/config/meizum3.h
index 7cba1c7e7f..d1a2b8f34a 100644
--- a/firmware/export/config/meizum3.h
+++ b/firmware/export/config/meizum3.h
@@ -119,6 +119,8 @@
119#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 119#define BATTERY_CAPACITY_INC 50 /* capacity increment */
120#define BATTERY_TYPES_COUNT 1 /* only one type */ 120#define BATTERY_TYPES_COUNT 1 /* only one type */
121 121
122#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
123
122/* Hardware controlled charging, software can monitor plug and charge state */ 124/* Hardware controlled charging, software can monitor plug and charge state */
123#define CONFIG_CHARGING CHARGING_MONITOR 125#define CONFIG_CHARGING CHARGING_MONITOR
124 126
diff --git a/firmware/export/config/meizum6sl.h b/firmware/export/config/meizum6sl.h
index 28c0fc0286..e0e5e9d43c 100644
--- a/firmware/export/config/meizum6sl.h
+++ b/firmware/export/config/meizum6sl.h
@@ -119,6 +119,8 @@
119#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 119#define BATTERY_CAPACITY_INC 50 /* capacity increment */
120#define BATTERY_TYPES_COUNT 1 /* only one type */ 120#define BATTERY_TYPES_COUNT 1 /* only one type */
121 121
122#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
123
122/* Hardware controlled charging? FIXME */ 124/* Hardware controlled charging? FIXME */
123#define CONFIG_CHARGING CHARGING_SIMPLE 125#define CONFIG_CHARGING CHARGING_SIMPLE
124 126
diff --git a/firmware/export/config/meizum6sp.h b/firmware/export/config/meizum6sp.h
index f88be0420c..34d7c92480 100644
--- a/firmware/export/config/meizum6sp.h
+++ b/firmware/export/config/meizum6sp.h
@@ -125,6 +125,8 @@
125#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 125#define BATTERY_CAPACITY_INC 50 /* capacity increment */
126#define BATTERY_TYPES_COUNT 1 /* only one type */ 126#define BATTERY_TYPES_COUNT 1 /* only one type */
127 127
128#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
129
128/* Hardware controlled charging? FIXME */ 130/* Hardware controlled charging? FIXME */
129#define CONFIG_CHARGING CHARGING_SIMPLE 131#define CONFIG_CHARGING CHARGING_SIMPLE
130 132
diff --git a/firmware/export/config/mini2440.h b/firmware/export/config/mini2440.h
index 4b4a137110..9b794ecb0a 100644
--- a/firmware/export/config/mini2440.h
+++ b/firmware/export/config/mini2440.h
@@ -95,6 +95,8 @@
95#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 95#define BATTERY_CAPACITY_INC 100 /* capacity increment */
96#define BATTERY_TYPES_COUNT 1 /* only one type */ 96#define BATTERY_TYPES_COUNT 1 /* only one type */
97 97
98#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
99
98 100
99 101
100/***************************************************************************/ 102/***************************************************************************/
diff --git a/firmware/export/config/mpiohd200.h b/firmware/export/config/mpiohd200.h
index f85b9a28fd..13691722f9 100644
--- a/firmware/export/config/mpiohd200.h
+++ b/firmware/export/config/mpiohd200.h
@@ -116,6 +116,8 @@
116#define CODEC_SRCTRL_88200HZ (0x1E << 1) 116#define CODEC_SRCTRL_88200HZ (0x1E << 1)
117 117
118#define BATTERY_TYPES_COUNT 1 118#define BATTERY_TYPES_COUNT 1
119
120#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
119#define BATTERY_CAPACITY_DEFAULT 850 /* this is wild guess */ 121#define BATTERY_CAPACITY_DEFAULT 850 /* this is wild guess */
120#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */ 122#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
121#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 123#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
diff --git a/firmware/export/config/mpiohd300.h b/firmware/export/config/mpiohd300.h
index 6728d5cccb..8343a90938 100644
--- a/firmware/export/config/mpiohd300.h
+++ b/firmware/export/config/mpiohd300.h
@@ -119,6 +119,8 @@
119#define CODEC_SRCTRL_88200HZ (0x1E << 1) 119#define CODEC_SRCTRL_88200HZ (0x1E << 1)
120 120
121#define BATTERY_TYPES_COUNT 1 121#define BATTERY_TYPES_COUNT 1
122
123#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
122#define BATTERY_CAPACITY_DEFAULT 1200 /* this is wild guess */ 124#define BATTERY_CAPACITY_DEFAULT 1200 /* this is wild guess */
123#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */ 125#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
124#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */ 126#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
diff --git a/firmware/export/config/mrobe100.h b/firmware/export/config/mrobe100.h
index 1b373a9799..510475d0f4 100644
--- a/firmware/export/config/mrobe100.h
+++ b/firmware/export/config/mrobe100.h
@@ -142,6 +142,8 @@
142#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 142#define BATTERY_CAPACITY_INC 0 /* capacity increment */
143#define BATTERY_TYPES_COUNT 1 /* only one type */ 143#define BATTERY_TYPES_COUNT 1 /* only one type */
144 144
145#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
146
145/* Hardware controlled charging */ 147/* Hardware controlled charging */
146#define CONFIG_CHARGING CHARGING_SIMPLE 148#define CONFIG_CHARGING CHARGING_SIMPLE
147 149
diff --git a/firmware/export/config/mrobe500.h b/firmware/export/config/mrobe500.h
index 590f8a95f9..6f8bc6c568 100644
--- a/firmware/export/config/mrobe500.h
+++ b/firmware/export/config/mrobe500.h
@@ -197,6 +197,8 @@
197#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 197#define BATTERY_CAPACITY_INC 100 /* capacity increment */
198#define BATTERY_TYPES_COUNT 1 /* only one type */ 198#define BATTERY_TYPES_COUNT 1 /* only one type */
199 199
200#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
201
200/* define current usage levels */ 202/* define current usage levels */
201#define CURRENT_NORMAL 85 /* Measured */ 203#define CURRENT_NORMAL 85 /* Measured */
202#define CURRENT_BACKLIGHT 200 /* Over 200 mA total measured when on */ 204#define CURRENT_BACKLIGHT 200 /* Over 200 mA total measured when on */
diff --git a/firmware/export/config/nokian8xx.h b/firmware/export/config/nokian8xx.h
index f11fa87021..55f96f76c3 100644
--- a/firmware/export/config/nokian8xx.h
+++ b/firmware/export/config/nokian8xx.h
@@ -74,12 +74,11 @@
74#define HAVE_SDL 74#define HAVE_SDL
75#define HAVE_SDL_AUDIO 75#define HAVE_SDL_AUDIO
76 76
77#define HAVE_SW_TONE_CONTROLS 77#define HAVE_SW_TONE_CONTROLS
78 78
79/* Define current usage levels. */ 79/* can provide both remaining percentage and time information */
80#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */ 80#define CONFIG_BATTERY_MEASURE (PERCENTAGE_MEASURE|TIME_MEASURE)
81#define CURRENT_BACKLIGHT 30 /* TBD */ 81#define NO_LOW_BATTERY_SHUTDOWN
82#define CURRENT_RECORD 0 /* no recording yet */
83 82
84/* Define this to the CPU frequency */ 83/* Define this to the CPU frequency */
85/* 84/*
diff --git a/firmware/export/config/nokian900.h b/firmware/export/config/nokian900.h
index a36aebf8db..1e74fd527e 100644
--- a/firmware/export/config/nokian900.h
+++ b/firmware/export/config/nokian900.h
@@ -74,14 +74,11 @@
74#define HAVE_SDL 74#define HAVE_SDL
75#define HAVE_SDL_AUDIO 75#define HAVE_SDL_AUDIO
76 76
77#define HAVE_SW_TONE_CONTROLS 77#define HAVE_SW_TONE_CONTROLS
78 78
79/* Define current usage levels. */ 79/* can provide both remaining percentage and time information */
80#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */ 80#define CONFIG_BATTERY_MEASURE (PERCENTAGE_MEASURE|TIME_MEASURE)
81#define CURRENT_BACKLIGHT 30 /* TBD */ 81#define NO_LOW_BATTERY_SHUTDOWN
82#define CURRENT_RECORD 0 /* no recording yet */
83
84/* Define this to the CPU frequency */
85/* 82/*
86#define CPU_FREQ 48000000 83#define CPU_FREQ 48000000
87*/ 84*/
diff --git a/firmware/export/config/ondavx747.h b/firmware/export/config/ondavx747.h
index e01c6ccc46..45aec00bb8 100644
--- a/firmware/export/config/ondavx747.h
+++ b/firmware/export/config/ondavx747.h
@@ -157,6 +157,8 @@
157#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 157#define BATTERY_CAPACITY_INC 100 /* capacity increment */
158#define BATTERY_TYPES_COUNT 1 /* only one type */ 158#define BATTERY_TYPES_COUNT 1 /* only one type */
159 159
160#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
161
160/* Hardware controlled charging with monitoring */ 162/* Hardware controlled charging with monitoring */
161#define CONFIG_CHARGING CHARGING_MONITOR 163#define CONFIG_CHARGING CHARGING_MONITOR
162 164
diff --git a/firmware/export/config/ondavx767.h b/firmware/export/config/ondavx767.h
index b2bac4f851..44a7aa0229 100644
--- a/firmware/export/config/ondavx767.h
+++ b/firmware/export/config/ondavx767.h
@@ -132,6 +132,8 @@
132#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 132#define BATTERY_CAPACITY_INC 100 /* capacity increment */
133#define BATTERY_TYPES_COUNT 1 /* only one type */ 133#define BATTERY_TYPES_COUNT 1 /* only one type */
134 134
135#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
136
135/* Hardware controlled charging with monitoring */ 137/* Hardware controlled charging with monitoring */
136//#define CONFIG_CHARGING CHARGING_MONITOR 138//#define CONFIG_CHARGING CHARGING_MONITOR
137 139
diff --git a/firmware/export/config/ondavx777.h b/firmware/export/config/ondavx777.h
index b9167e04ae..0319816d26 100644
--- a/firmware/export/config/ondavx777.h
+++ b/firmware/export/config/ondavx777.h
@@ -151,6 +151,8 @@
151#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 151#define BATTERY_CAPACITY_INC 100 /* capacity increment */
152#define BATTERY_TYPES_COUNT 1 /* only one type */ 152#define BATTERY_TYPES_COUNT 1 /* only one type */
153 153
154#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
155
154/* Hardware controlled charging with monitoring */ 156/* Hardware controlled charging with monitoring */
155#define CONFIG_CHARGING CHARGING_MONITOR 157#define CONFIG_CHARGING CHARGING_MONITOR
156 158
diff --git a/firmware/export/config/rk27generic.h b/firmware/export/config/rk27generic.h
index d7b63f0ac2..6cebb8ce2a 100644
--- a/firmware/export/config/rk27generic.h
+++ b/firmware/export/config/rk27generic.h
@@ -136,6 +136,8 @@
136#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 136#define BATTERY_CAPACITY_INC 10 /* capacity increment */
137#define BATTERY_TYPES_COUNT 1 /* only one type */ 137#define BATTERY_TYPES_COUNT 1 /* only one type */
138 138
139#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
140
139/* Hardware controlled charging with monitoring */ 141/* Hardware controlled charging with monitoring */
140#define CONFIG_CHARGING CHARGING_MONITOR 142#define CONFIG_CHARGING CHARGING_MONITOR
141 143
diff --git a/firmware/export/config/samsungyh820.h b/firmware/export/config/samsungyh820.h
index d7d54112f0..74cd05209e 100644
--- a/firmware/export/config/samsungyh820.h
+++ b/firmware/export/config/samsungyh820.h
@@ -134,6 +134,8 @@
134#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 134#define BATTERY_CAPACITY_INC 50 /* capacity increment */
135#define BATTERY_TYPES_COUNT 1 /* only one type */ 135#define BATTERY_TYPES_COUNT 1 /* only one type */
136 136
137#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
138
137/* Hardware controlled charging */ 139/* Hardware controlled charging */
138#define CONFIG_CHARGING CHARGING_SIMPLE 140#define CONFIG_CHARGING CHARGING_SIMPLE
139 141
diff --git a/firmware/export/config/samsungyh920.h b/firmware/export/config/samsungyh920.h
index 5255a05359..73f226d6c9 100644
--- a/firmware/export/config/samsungyh920.h
+++ b/firmware/export/config/samsungyh920.h
@@ -141,6 +141,8 @@
141#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 141#define BATTERY_CAPACITY_INC 50 /* capacity increment */
142#define BATTERY_TYPES_COUNT 1 /* only one type */ 142#define BATTERY_TYPES_COUNT 1 /* only one type */
143 143
144#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
145
144/* Hardware controlled charging */ 146/* Hardware controlled charging */
145#define CONFIG_CHARGING CHARGING_SIMPLE 147#define CONFIG_CHARGING CHARGING_SIMPLE
146 148
diff --git a/firmware/export/config/samsungyh925.h b/firmware/export/config/samsungyh925.h
index 3e072ddb86..c95d1e50d1 100644
--- a/firmware/export/config/samsungyh925.h
+++ b/firmware/export/config/samsungyh925.h
@@ -138,6 +138,8 @@
138#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 138#define BATTERY_CAPACITY_INC 50 /* capacity increment */
139#define BATTERY_TYPES_COUNT 1 /* only one type */ 139#define BATTERY_TYPES_COUNT 1 /* only one type */
140 140
141#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
142
141/* Hardware controlled charging */ 143/* Hardware controlled charging */
142#define CONFIG_CHARGING CHARGING_SIMPLE 144#define CONFIG_CHARGING CHARGING_SIMPLE
143 145
diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h
index 2de36dcb74..735db1fcad 100644
--- a/firmware/export/config/samsungypr0.h
+++ b/firmware/export/config/samsungypr0.h
@@ -132,6 +132,8 @@
132#define CURRENT_NORMAL 24 /* ~25h, on 600mAh that's about 24mA */ 132#define CURRENT_NORMAL 24 /* ~25h, on 600mAh that's about 24mA */
133#define CURRENT_BACKLIGHT 62 /* ~6,5h -> 92mA. Minus 24mA normal that gives us 68mA */ 133#define CURRENT_BACKLIGHT 62 /* ~6,5h -> 92mA. Minus 24mA normal that gives us 68mA */
134 134
135#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
136
135/* Linux controlls charging, we can monitor */ 137/* Linux controlls charging, we can monitor */
136#define CONFIG_CHARGING CHARGING_MONITOR 138#define CONFIG_CHARGING CHARGING_MONITOR
137 139
diff --git a/firmware/export/config/samsungyps3.h b/firmware/export/config/samsungyps3.h
index 3062d5c58e..cef3b60207 100644
--- a/firmware/export/config/samsungyps3.h
+++ b/firmware/export/config/samsungyps3.h
@@ -118,6 +118,8 @@
118#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 118#define BATTERY_CAPACITY_INC 0 /* capacity increment */
119#define BATTERY_TYPES_COUNT 1 /* only one type */ 119#define BATTERY_TYPES_COUNT 1 /* only one type */
120 120
121#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
122
121/* Hardware controlled charging, software can monitor plug and charge state */ 123/* Hardware controlled charging, software can monitor plug and charge state */
122#define CONFIG_CHARGING CHARGING_MONITOR 124#define CONFIG_CHARGING CHARGING_MONITOR
123 125
diff --git a/firmware/export/config/sansac100.h b/firmware/export/config/sansac100.h
index e61e42639c..5aabfc284c 100644
--- a/firmware/export/config/sansac100.h
+++ b/firmware/export/config/sansac100.h
@@ -92,6 +92,8 @@
92#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 92#define BATTERY_CAPACITY_INC 50 /* capacity increment */
93#define BATTERY_TYPES_COUNT 1 /* only one type */ 93#define BATTERY_TYPES_COUNT 1 /* only one type */
94 94
95#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
96
95/* define this if the unit should not shut down on low battery. */ 97/* define this if the unit should not shut down on low battery. */
96#define NO_LOW_BATTERY_SHUTDOWN 98#define NO_LOW_BATTERY_SHUTDOWN
97 99
diff --git a/firmware/export/config/sansac200.h b/firmware/export/config/sansac200.h
index 74d3d94b78..479623f078 100644
--- a/firmware/export/config/sansac200.h
+++ b/firmware/export/config/sansac200.h
@@ -142,6 +142,8 @@
142#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 142#define BATTERY_CAPACITY_INC 0 /* capacity increment */
143#define BATTERY_TYPES_COUNT 1 /* only one type */ 143#define BATTERY_TYPES_COUNT 1 /* only one type */
144 144
145#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
146
145/* Charging implemented in a target-specific algorithm */ 147/* Charging implemented in a target-specific algorithm */
146#define CONFIG_CHARGING CHARGING_TARGET 148#define CONFIG_CHARGING CHARGING_TARGET
147#define HAVE_POWEROFF_WHILE_CHARGING 149#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/sansac200v2.h b/firmware/export/config/sansac200v2.h
index a5b857fe81..742d66f20d 100644
--- a/firmware/export/config/sansac200v2.h
+++ b/firmware/export/config/sansac200v2.h
@@ -138,6 +138,8 @@
138#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 138#define BATTERY_CAPACITY_INC 0 /* capacity increment */
139#define BATTERY_TYPES_COUNT 1 /* only one type */ 139#define BATTERY_TYPES_COUNT 1 /* only one type */
140 140
141#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
142
141/* Charging implemented in a target-specific algorithm */ 143/* Charging implemented in a target-specific algorithm */
142#define CONFIG_CHARGING CHARGING_TARGET 144#define CONFIG_CHARGING CHARGING_TARGET
143 145
diff --git a/firmware/export/config/sansaclip.h b/firmware/export/config/sansaclip.h
index 4e214669b1..617e661555 100644
--- a/firmware/export/config/sansaclip.h
+++ b/firmware/export/config/sansaclip.h
@@ -141,6 +141,8 @@
141#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 141#define BATTERY_CAPACITY_INC 0 /* capacity increment */
142#define BATTERY_TYPES_COUNT 1 /* only one type */ 142#define BATTERY_TYPES_COUNT 1 /* only one type */
143 143
144#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
145
144/* Charging implemented in a target-specific algorithm */ 146/* Charging implemented in a target-specific algorithm */
145#define CONFIG_CHARGING CHARGING_TARGET 147#define CONFIG_CHARGING CHARGING_TARGET
146 148
diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h
index 083b96a8f7..b753f585e2 100644
--- a/firmware/export/config/sansaclipplus.h
+++ b/firmware/export/config/sansaclipplus.h
@@ -148,6 +148,8 @@
148#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 148#define BATTERY_CAPACITY_INC 0 /* capacity increment */
149#define BATTERY_TYPES_COUNT 1 /* only one type */ 149#define BATTERY_TYPES_COUNT 1 /* only one type */
150 150
151#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
152
151/* Charging implemented in a target-specific algorithm */ 153/* Charging implemented in a target-specific algorithm */
152#define CONFIG_CHARGING CHARGING_TARGET 154#define CONFIG_CHARGING CHARGING_TARGET
153 155
diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h
index cb2392ac76..4358fe5507 100644
--- a/firmware/export/config/sansaclipv2.h
+++ b/firmware/export/config/sansaclipv2.h
@@ -144,6 +144,8 @@
144#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 144#define BATTERY_CAPACITY_INC 0 /* capacity increment */
145#define BATTERY_TYPES_COUNT 1 /* only one type */ 145#define BATTERY_TYPES_COUNT 1 /* only one type */
146 146
147#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
148
147/* Charging implemented in a target-specific algorithm */ 149/* Charging implemented in a target-specific algorithm */
148#define CONFIG_CHARGING CHARGING_TARGET 150#define CONFIG_CHARGING CHARGING_TARGET
149 151
diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h
index 043b1025fb..696125e963 100644
--- a/firmware/export/config/sansaclipzip.h
+++ b/firmware/export/config/sansaclipzip.h
@@ -149,6 +149,8 @@
149#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 149#define BATTERY_CAPACITY_INC 0 /* capacity increment */
150#define BATTERY_TYPES_COUNT 1 /* only one type */ 150#define BATTERY_TYPES_COUNT 1 /* only one type */
151 151
152#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
153
152/* Charging implemented in a target-specific algorithm */ 154/* Charging implemented in a target-specific algorithm */
153#define CONFIG_CHARGING CHARGING_TARGET 155#define CONFIG_CHARGING CHARGING_TARGET
154 156
diff --git a/firmware/export/config/sansaconnect.h b/firmware/export/config/sansaconnect.h
index 714534d6ad..a0f517992b 100644
--- a/firmware/export/config/sansaconnect.h
+++ b/firmware/export/config/sansaconnect.h
@@ -149,6 +149,8 @@
149#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 149#define BATTERY_CAPACITY_INC 100 /* capacity increment */
150#define BATTERY_TYPES_COUNT 1 /* only one type */ 150#define BATTERY_TYPES_COUNT 1 /* only one type */
151 151
152#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
153
152/* define current usage levels */ 154/* define current usage levels */
153#if 0 155#if 0
154/* TODO */ 156/* TODO */
diff --git a/firmware/export/config/sansae200.h b/firmware/export/config/sansae200.h
index dd5747a9ca..c5b53e6ea2 100644
--- a/firmware/export/config/sansae200.h
+++ b/firmware/export/config/sansae200.h
@@ -142,6 +142,8 @@
142#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 142#define BATTERY_CAPACITY_INC 0 /* capacity increment */
143#define BATTERY_TYPES_COUNT 1 /* only one type */ 143#define BATTERY_TYPES_COUNT 1 /* only one type */
144 144
145#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
146
145/* Charging implemented in a target-specific algorithm */ 147/* Charging implemented in a target-specific algorithm */
146#define CONFIG_CHARGING CHARGING_TARGET 148#define CONFIG_CHARGING CHARGING_TARGET
147#define HAVE_POWEROFF_WHILE_CHARGING 149#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/sansae200v2.h b/firmware/export/config/sansae200v2.h
index a03dfe05a6..19346dbfb6 100644
--- a/firmware/export/config/sansae200v2.h
+++ b/firmware/export/config/sansae200v2.h
@@ -152,6 +152,8 @@
152#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 152#define BATTERY_CAPACITY_INC 0 /* capacity increment */
153#define BATTERY_TYPES_COUNT 1 /* only one type */ 153#define BATTERY_TYPES_COUNT 1 /* only one type */
154 154
155#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
156
155/* Charging implemented in a target-specific algorithm */ 157/* Charging implemented in a target-specific algorithm */
156#define CONFIG_CHARGING CHARGING_TARGET 158#define CONFIG_CHARGING CHARGING_TARGET
157 159
diff --git a/firmware/export/config/sansafuze.h b/firmware/export/config/sansafuze.h
index 2e9c261a04..f905bc7862 100644
--- a/firmware/export/config/sansafuze.h
+++ b/firmware/export/config/sansafuze.h
@@ -156,6 +156,8 @@
156#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 156#define BATTERY_CAPACITY_INC 0 /* capacity increment */
157#define BATTERY_TYPES_COUNT 1 /* only one type */ 157#define BATTERY_TYPES_COUNT 1 /* only one type */
158 158
159#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
160
159/* Charging implemented in a target-specific algorithm */ 161/* Charging implemented in a target-specific algorithm */
160#define CONFIG_CHARGING CHARGING_TARGET 162#define CONFIG_CHARGING CHARGING_TARGET
161 163
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h
index 880bbae458..1c8fdadb31 100644
--- a/firmware/export/config/sansafuzeplus.h
+++ b/firmware/export/config/sansafuzeplus.h
@@ -140,6 +140,8 @@
140#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 140#define BATTERY_CAPACITY_INC 0 /* capacity increment */
141#define BATTERY_TYPES_COUNT 1 /* only one type */ 141#define BATTERY_TYPES_COUNT 1 /* only one type */
142 142
143#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
144
143/* Charging implemented in a target-specific algorithm */ 145/* Charging implemented in a target-specific algorithm */
144#define CONFIG_CHARGING CHARGING_TARGET 146#define CONFIG_CHARGING CHARGING_TARGET
145 147
diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h
index 8231236104..ae25592d1a 100644
--- a/firmware/export/config/sansafuzev2.h
+++ b/firmware/export/config/sansafuzev2.h
@@ -161,6 +161,8 @@
161#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 161#define BATTERY_CAPACITY_INC 0 /* capacity increment */
162#define BATTERY_TYPES_COUNT 1 /* only one type */ 162#define BATTERY_TYPES_COUNT 1 /* only one type */
163 163
164#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
165
164/* Charging implemented in a target-specific algorithm */ 166/* Charging implemented in a target-specific algorithm */
165#define CONFIG_CHARGING CHARGING_TARGET 167#define CONFIG_CHARGING CHARGING_TARGET
166 168
diff --git a/firmware/export/config/sansam200.h b/firmware/export/config/sansam200.h
index c5eade88e9..2c37f91a99 100644
--- a/firmware/export/config/sansam200.h
+++ b/firmware/export/config/sansam200.h
@@ -98,6 +98,8 @@
98#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 98#define BATTERY_CAPACITY_INC 50 /* capacity increment */
99#define BATTERY_TYPES_COUNT 1 /* only one type */ 99#define BATTERY_TYPES_COUNT 1 /* only one type */
100 100
101#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
102
101/* define this if the unit should not shut down on low battery. */ 103/* define this if the unit should not shut down on low battery. */
102#define NO_LOW_BATTERY_SHUTDOWN 104#define NO_LOW_BATTERY_SHUTDOWN
103 105
diff --git a/firmware/export/config/sansam200v4.h b/firmware/export/config/sansam200v4.h
index 7559361d4c..ef371e53dd 100644
--- a/firmware/export/config/sansam200v4.h
+++ b/firmware/export/config/sansam200v4.h
@@ -118,6 +118,8 @@
118#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 118#define BATTERY_CAPACITY_INC 50 /* capacity increment */
119#define BATTERY_TYPES_COUNT 1 /* only one type */ 119#define BATTERY_TYPES_COUNT 1 /* only one type */
120 120
121#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
122
121/* define this if the unit should not shut down on low battery. */ 123/* define this if the unit should not shut down on low battery. */
122#define NO_LOW_BATTERY_SHUTDOWN 124#define NO_LOW_BATTERY_SHUTDOWN
123 125
diff --git a/firmware/export/config/sansaview.h b/firmware/export/config/sansaview.h
index 829f67ab3e..89da94338f 100644
--- a/firmware/export/config/sansaview.h
+++ b/firmware/export/config/sansaview.h
@@ -129,6 +129,8 @@
129#define BATTERY_CAPACITY_INC 0 /* capacity increment */ 129#define BATTERY_CAPACITY_INC 0 /* capacity increment */
130#define BATTERY_TYPES_COUNT 1 /* only one type */ 130#define BATTERY_TYPES_COUNT 1 /* only one type */
131 131
132#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
133
132/* Charging implemented in a target-specific algorithm */ 134/* Charging implemented in a target-specific algorithm */
133#define CONFIG_CHARGING CHARGING_SIMPLE 135#define CONFIG_CHARGING CHARGING_SIMPLE
134#define HAVE_POWEROFF_WHILE_CHARGING 136#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/sdlapp.h b/firmware/export/config/sdlapp.h
index a55b7e3be3..ac43a0fb14 100644
--- a/firmware/export/config/sdlapp.h
+++ b/firmware/export/config/sdlapp.h
@@ -80,11 +80,6 @@
80 80
81#define HAVE_SW_TONE_CONTROLS 81#define HAVE_SW_TONE_CONTROLS
82 82
83/* Define current usage levels. */
84#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
85#define CURRENT_BACKLIGHT 30 /* TBD */
86#define CURRENT_RECORD 0 /* no recording yet */
87
88/* Define this to the CPU frequency */ 83/* Define this to the CPU frequency */
89/* 84/*
90#define CPU_FREQ 48000000 85#define CPU_FREQ 48000000
diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h
index f0c9f47a2f..f565e6192e 100644
--- a/firmware/export/config/sim.h
+++ b/firmware/export/config/sim.h
@@ -36,6 +36,11 @@
36 36
37#undef CONFIG_STORAGE 37#undef CONFIG_STORAGE
38 38
39#if defined(CONFIG_CHARGING) && CONFIG_CHARGING > CHARGING_MONITOR
40#undef CONFIG_CHARGING
41#define CONFIG_CHARGING CHARGING_MONITOR
42#endif
43
39#undef CONFIG_USBOTG 44#undef CONFIG_USBOTG
40 45
41#undef USB_HANDLED_BY_OF 46#undef USB_HANDLED_BY_OF
diff --git a/firmware/export/config/tatungtpj1022.h b/firmware/export/config/tatungtpj1022.h
index 247ca4780b..15d5cf2456 100644
--- a/firmware/export/config/tatungtpj1022.h
+++ b/firmware/export/config/tatungtpj1022.h
@@ -85,6 +85,8 @@
85#define BATTERY_CAPACITY_INC 10 /* capacity increment */ 85#define BATTERY_CAPACITY_INC 10 /* capacity increment */
86#define BATTERY_TYPES_COUNT 1 /* only one type */ 86#define BATTERY_TYPES_COUNT 1 /* only one type */
87 87
88#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
89
88/* Hardware controlled charging? FIXME */ 90/* Hardware controlled charging? FIXME */
89#define CONFIG_CHARGING CHARGING_SIMPLE 91#define CONFIG_CHARGING CHARGING_SIMPLE
90 92
diff --git a/firmware/export/config/vibe500.h b/firmware/export/config/vibe500.h
index ad2299061a..da53005c5c 100644
--- a/firmware/export/config/vibe500.h
+++ b/firmware/export/config/vibe500.h
@@ -126,6 +126,8 @@
126#define BATTERY_CAPACITY_INC 50 /* capacity increment */ 126#define BATTERY_CAPACITY_INC 50 /* capacity increment */
127#define BATTERY_TYPES_COUNT 1 /* only one type */ 127#define BATTERY_TYPES_COUNT 1 /* only one type */
128 128
129#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
130
129/* Hardware controlled charging, software can monitor plug and charge state */ 131/* Hardware controlled charging, software can monitor plug and charge state */
130#define CONFIG_CHARGING CHARGING_SIMPLE 132#define CONFIG_CHARGING CHARGING_SIMPLE
131 133
diff --git a/firmware/export/config/zenvisionm30gb.h b/firmware/export/config/zenvisionm30gb.h
index 335257d102..c6448132a7 100644
--- a/firmware/export/config/zenvisionm30gb.h
+++ b/firmware/export/config/zenvisionm30gb.h
@@ -131,6 +131,8 @@
131#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 131#define BATTERY_CAPACITY_INC 100 /* capacity increment */
132#define BATTERY_TYPES_COUNT 1 /* only one type */ 132#define BATTERY_TYPES_COUNT 1 /* only one type */
133 133
134#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
135
134/* Hardware controlled charging with monitoring */ 136/* Hardware controlled charging with monitoring */
135//#define CONFIG_CHARGING CHARGING_MONITOR 137//#define CONFIG_CHARGING CHARGING_MONITOR
136 138
diff --git a/firmware/export/config/zenvisionm60gb.h b/firmware/export/config/zenvisionm60gb.h
index 62353089f8..321dd5d164 100644
--- a/firmware/export/config/zenvisionm60gb.h
+++ b/firmware/export/config/zenvisionm60gb.h
@@ -130,6 +130,8 @@
130#define BATTERY_CAPACITY_INC 100 /* capacity increment */ 130#define BATTERY_CAPACITY_INC 100 /* capacity increment */
131#define BATTERY_TYPES_COUNT 1 /* only one type */ 131#define BATTERY_TYPES_COUNT 1 /* only one type */
132 132
133#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
134
133/* Hardware controlled charging with monitoring */ 135/* Hardware controlled charging with monitoring */
134//#define CONFIG_CHARGING CHARGING_MONITOR 136//#define CONFIG_CHARGING CHARGING_MONITOR
135 137