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.zip
rockbox-c1bd9b0361ba92c29ceef68d74093e70a1a3e481.tar.gz
rockbox-c1bd9b0361ba92c29ceef68d74093e70a1a3e481.tar.bz2
rockbox-c1bd9b0361ba92c29ceef68d74093e70a1a3e481.tar.xz
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 41ecacf..6261a80 100644
--- a/firmware/export/config/android.h
+++ b/firmware/export/config/android.h
@@ -86,11 +86,9 @@
#define HAVE_HEADPHONE_DETECTION
-/* Define current usage levels. */
-#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
-#define CURRENT_BACKLIGHT 30 /* TBD */
-#define CURRENT_RECORD 0 /* no recording yet */
+#define CONFIG_BATTERY_MEASURE PERCENTAGE_MEASURE
+#define NO_LOW_BATTERY_SHUTDOWN
/* Define this to the CPU frequency */
/*
#define CPU_FREQ 48000000
diff --git a/firmware/export/config/archosfmrecorder.h b/firmware/export/config/archosfmrecorder.h
index 3e2c7e9..6b1f07f 100644
--- a/firmware/export/config/archosfmrecorder.h
+++ b/firmware/export/config/archosfmrecorder.h
@@ -91,6 +91,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
#define CURRENT_NORMAL 145 /* usual current in mA */
#define CURRENT_RECORD 35 /* additional recording current */
#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 516845e..1a1115f 100644
--- a/firmware/export/config/archosondiofm.h
+++ b/firmware/export/config/archosondiofm.h
@@ -73,6 +73,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/archosondiosp.h b/firmware/export/config/archosondiosp.h
index ba957f7..aad66b7 100644
--- a/firmware/export/config/archosondiosp.h
+++ b/firmware/export/config/archosondiosp.h
@@ -60,6 +60,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/archosplayer.h b/firmware/export/config/archosplayer.h
index bc75433..af12557 100644
--- a/firmware/export/config/archosplayer.h
+++ b/firmware/export/config/archosplayer.h
@@ -49,6 +49,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
#define CURRENT_NORMAL 145 /* usual current in mA */
#define CURRENT_USB 500 /* usual current in mA in USB mode */
diff --git a/firmware/export/config/archosrecorder.h b/firmware/export/config/archosrecorder.h
index be7c872..6c708fb 100644
--- a/firmware/export/config/archosrecorder.h
+++ b/firmware/export/config/archosrecorder.h
@@ -80,6 +80,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
#if MEMORYSIZE < 8
#define CURRENT_NORMAL 145 /* usual current in mA */
#else
diff --git a/firmware/export/config/archosrecorderv2.h b/firmware/export/config/archosrecorderv2.h
index e2f3b66..dae34ef 100644
--- a/firmware/export/config/archosrecorderv2.h
+++ b/firmware/export/config/archosrecorderv2.h
@@ -86,6 +86,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
#define CURRENT_NORMAL 145 /* usual current in mA */
#define CURRENT_RECORD 35 /* additional recording current */
#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 ebaa636..03fbb4f 100644
--- a/firmware/export/config/cowond2.h
+++ b/firmware/export/config/cowond2.h
@@ -136,6 +136,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/creativezv.h b/firmware/export/config/creativezv.h
index 0fd216a..568144b 100644
--- a/firmware/export/config/creativezv.h
+++ b/firmware/export/config/creativezv.h
@@ -130,6 +130,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
//#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/gigabeatfx.h b/firmware/export/config/gigabeatfx.h
index b64f3f5..fbaa4a0 100644
--- a/firmware/export/config/gigabeatfx.h
+++ b/firmware/export/config/gigabeatfx.h
@@ -129,6 +129,8 @@
#define BATTERY_CAPACITY_INC 25 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h
index 685076b..f7fdc44 100644
--- a/firmware/export/config/gigabeats.h
+++ b/firmware/export/config/gigabeats.h
@@ -173,6 +173,8 @@
#define BATTERY_CAPACITY_INC 25 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* TODO: have a proper status displayed in the bootloader and have it
* work! */
/* Charging implemented in a target-specific algorithm */
diff --git a/firmware/export/config/gogearhdd1630.h b/firmware/export/config/gogearhdd1630.h
index e9bbfb8..05f1a47 100644
--- a/firmware/export/config/gogearhdd1630.h
+++ b/firmware/export/config/gogearhdd1630.h
@@ -141,6 +141,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/gogearhdd6330.h b/firmware/export/config/gogearhdd6330.h
index fc326da..b8ee918 100644
--- a/firmware/export/config/gogearhdd6330.h
+++ b/firmware/export/config/gogearhdd6330.h
@@ -144,6 +144,8 @@
#define BATTERY_CAPACITY_INC 20 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/gogearsa9200.h b/firmware/export/config/gogearsa9200.h
index b91430e..e29c8dc 100644
--- a/firmware/export/config/gogearsa9200.h
+++ b/firmware/export/config/gogearsa9200.h
@@ -125,6 +125,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/hifimanhm60x.h b/firmware/export/config/hifimanhm60x.h
index 6ac4380..bdc6124 100644
--- a/firmware/export/config/hifimanhm60x.h
+++ b/firmware/export/config/hifimanhm60x.h
@@ -130,6 +130,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/hifimanhm801.h b/firmware/export/config/hifimanhm801.h
index 469c423..a5b5aee 100644
--- a/firmware/export/config/hifimanhm801.h
+++ b/firmware/export/config/hifimanhm801.h
@@ -118,6 +118,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/iaudio7.h b/firmware/export/config/iaudio7.h
index 8a04bc0..0664ff0 100644
--- a/firmware/export/config/iaudio7.h
+++ b/firmware/export/config/iaudio7.h
@@ -131,6 +131,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
#define CONFIG_CHARGING CHARGING_SIMPLE
/* Define this if you have a TCC770 */
diff --git a/firmware/export/config/iaudiom3.h b/firmware/export/config/iaudiom3.h
index 6fdf11c..d2f9064 100644
--- a/firmware/export/config/iaudiom3.h
+++ b/firmware/export/config/iaudiom3.h
@@ -114,6 +114,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/iaudiom5.h b/firmware/export/config/iaudiom5.h
index ad86308..0bc3ed5 100644
--- a/firmware/export/config/iaudiom5.h
+++ b/firmware/export/config/iaudiom5.h
@@ -138,6 +138,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/iaudiox5.h b/firmware/export/config/iaudiox5.h
index 2083095..b88583c 100644
--- a/firmware/export/config/iaudiox5.h
+++ b/firmware/export/config/iaudiox5.h
@@ -141,6 +141,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/ipod1g2g.h b/firmware/export/config/ipod1g2g.h
index 0ce5d45..b2b1f4a 100644
--- a/firmware/export/config/ipod1g2g.h
+++ b/firmware/export/config/ipod1g2g.h
@@ -130,6 +130,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
//#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/ipod3g.h b/firmware/export/config/ipod3g.h
index e7d8bff..16bd107 100644
--- a/firmware/export/config/ipod3g.h
+++ b/firmware/export/config/ipod3g.h
@@ -137,6 +137,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/ipod4g.h b/firmware/export/config/ipod4g.h
index 957e3a4..5ddde1b 100644
--- a/firmware/export/config/ipod4g.h
+++ b/firmware/export/config/ipod4g.h
@@ -143,6 +143,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ipod6g.h b/firmware/export/config/ipod6g.h
index 95837cc..08c0f27 100644
--- a/firmware/export/config/ipod6g.h
+++ b/firmware/export/config/ipod6g.h
@@ -145,6 +145,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ipodcolor.h b/firmware/export/config/ipodcolor.h
index cf02101..9768ac3 100644
--- a/firmware/export/config/ipodcolor.h
+++ b/firmware/export/config/ipodcolor.h
@@ -130,6 +130,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ipodmini1g.h b/firmware/export/config/ipodmini1g.h
index 04fa68e..b1f6fa1 100644
--- a/firmware/export/config/ipodmini1g.h
+++ b/firmware/export/config/ipodmini1g.h
@@ -141,6 +141,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define current usage levels */
#define CURRENT_NORMAL 50 /* PP5024 uses ~40mA, so add some for disk */
#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 c10284e..27edf10 100644
--- a/firmware/export/config/ipodmini2g.h
+++ b/firmware/export/config/ipodmini2g.h
@@ -142,6 +142,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define current usage levels */
#define CURRENT_NORMAL 50 /* PP5024 uses ~40mA, so add some for disk */
#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 50f0511..40f6cf2 100644
--- a/firmware/export/config/ipodnano1g.h
+++ b/firmware/export/config/ipodnano1g.h
@@ -134,6 +134,8 @@
#define BATTERY_CAPACITY_INC 20 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ipodnano2g.h b/firmware/export/config/ipodnano2g.h
index e0941e0..2e4f189 100644
--- a/firmware/export/config/ipodnano2g.h
+++ b/firmware/export/config/ipodnano2g.h
@@ -148,6 +148,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ipodvideo.h b/firmware/export/config/ipodvideo.h
index c4e2cb2..7e123d0 100644
--- a/firmware/export/config/ipodvideo.h
+++ b/firmware/export/config/ipodvideo.h
@@ -149,6 +149,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/iriverh10.h b/firmware/export/config/iriverh10.h
index d2d7a0c..3611093 100644
--- a/firmware/export/config/iriverh10.h
+++ b/firmware/export/config/iriverh10.h
@@ -127,6 +127,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/iriverh100.h b/firmware/export/config/iriverh100.h
index 1a89c7c..6447265 100644
--- a/firmware/export/config/iriverh100.h
+++ b/firmware/export/config/iriverh100.h
@@ -131,6 +131,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/iriverh10_5gb.h b/firmware/export/config/iriverh10_5gb.h
index 0ad83cb..84c0b37 100644
--- a/firmware/export/config/iriverh10_5gb.h
+++ b/firmware/export/config/iriverh10_5gb.h
@@ -110,6 +110,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/iriverh120.h b/firmware/export/config/iriverh120.h
index 199b948..5bab810 100644
--- a/firmware/export/config/iriverh120.h
+++ b/firmware/export/config/iriverh120.h
@@ -135,6 +135,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/iriverh300.h b/firmware/export/config/iriverh300.h
index dbe7013..4250153 100644
--- a/firmware/export/config/iriverh300.h
+++ b/firmware/export/config/iriverh300.h
@@ -130,6 +130,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/iriverifp7xx.h b/firmware/export/config/iriverifp7xx.h
index 78c0783..1de6adc 100644
--- a/firmware/export/config/iriverifp7xx.h
+++ b/firmware/export/config/iriverifp7xx.h
@@ -70,6 +70,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 2 /* Alkalines or NiMH */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/logikdax.h b/firmware/export/config/logikdax.h
index 45f5651..ed6cbba 100644
--- a/firmware/export/config/logikdax.h
+++ b/firmware/export/config/logikdax.h
@@ -102,6 +102,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/lyreproto1.h b/firmware/export/config/lyreproto1.h
index 1413adc..95808cf 100644
--- a/firmware/export/config/lyreproto1.h
+++ b/firmware/export/config/lyreproto1.h
@@ -84,6 +84,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
#define CONFIG_CPU AT91SAM9260
/* Define this to the CPU frequency */
diff --git a/firmware/export/config/meizum3.h b/firmware/export/config/meizum3.h
index 7cba1c7..d1a2b8f 100644
--- a/firmware/export/config/meizum3.h
+++ b/firmware/export/config/meizum3.h
@@ -119,6 +119,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging, software can monitor plug and charge state */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/meizum6sl.h b/firmware/export/config/meizum6sl.h
index 28c0fc0..e0e5e9d 100644
--- a/firmware/export/config/meizum6sl.h
+++ b/firmware/export/config/meizum6sl.h
@@ -119,6 +119,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/meizum6sp.h b/firmware/export/config/meizum6sp.h
index f88be04..34d7c92 100644
--- a/firmware/export/config/meizum6sp.h
+++ b/firmware/export/config/meizum6sp.h
@@ -125,6 +125,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/mini2440.h b/firmware/export/config/mini2440.h
index 4b4a137..9b794ec 100644
--- a/firmware/export/config/mini2440.h
+++ b/firmware/export/config/mini2440.h
@@ -95,6 +95,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/***************************************************************************/
diff --git a/firmware/export/config/mpiohd200.h b/firmware/export/config/mpiohd200.h
index f85b9a2..1369172 100644
--- a/firmware/export/config/mpiohd200.h
+++ b/firmware/export/config/mpiohd200.h
@@ -116,6 +116,8 @@
#define CODEC_SRCTRL_88200HZ (0x1E << 1)
#define BATTERY_TYPES_COUNT 1
+
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
#define BATTERY_CAPACITY_DEFAULT 850 /* this is wild guess */
#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
diff --git a/firmware/export/config/mpiohd300.h b/firmware/export/config/mpiohd300.h
index 6728d5c..8343a90 100644
--- a/firmware/export/config/mpiohd300.h
+++ b/firmware/export/config/mpiohd300.h
@@ -119,6 +119,8 @@
#define CODEC_SRCTRL_88200HZ (0x1E << 1)
#define BATTERY_TYPES_COUNT 1
+
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
#define BATTERY_CAPACITY_DEFAULT 1200 /* this is wild guess */
#define BATTERY_CAPACITY_MIN 800 /* min. capacity selectable */
#define BATTERY_CAPACITY_MAX 2500 /* max. capacity selectable */
diff --git a/firmware/export/config/mrobe100.h b/firmware/export/config/mrobe100.h
index 1b373a9..510475d 100644
--- a/firmware/export/config/mrobe100.h
+++ b/firmware/export/config/mrobe100.h
@@ -142,6 +142,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/mrobe500.h b/firmware/export/config/mrobe500.h
index 590f8a9..6f8bc6c 100644
--- a/firmware/export/config/mrobe500.h
+++ b/firmware/export/config/mrobe500.h
@@ -197,6 +197,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define current usage levels */
#define CURRENT_NORMAL 85 /* Measured */
#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 f11fa87..55f96f7 100644
--- a/firmware/export/config/nokian8xx.h
+++ b/firmware/export/config/nokian8xx.h
@@ -74,12 +74,11 @@
#define HAVE_SDL
#define HAVE_SDL_AUDIO
-#define HAVE_SW_TONE_CONTROLS
+#define HAVE_SW_TONE_CONTROLS
-/* Define current usage levels. */
-#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
-#define CURRENT_BACKLIGHT 30 /* TBD */
-#define CURRENT_RECORD 0 /* no recording yet */
+/* can provide both remaining percentage and time information */
+#define CONFIG_BATTERY_MEASURE (PERCENTAGE_MEASURE|TIME_MEASURE)
+#define NO_LOW_BATTERY_SHUTDOWN
/* Define this to the CPU frequency */
/*
diff --git a/firmware/export/config/nokian900.h b/firmware/export/config/nokian900.h
index a36aebf..1e74fd5 100644
--- a/firmware/export/config/nokian900.h
+++ b/firmware/export/config/nokian900.h
@@ -74,14 +74,11 @@
#define HAVE_SDL
#define HAVE_SDL_AUDIO
-#define HAVE_SW_TONE_CONTROLS
+#define HAVE_SW_TONE_CONTROLS
-/* Define current usage levels. */
-#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
-#define CURRENT_BACKLIGHT 30 /* TBD */
-#define CURRENT_RECORD 0 /* no recording yet */
-
-/* Define this to the CPU frequency */
+/* can provide both remaining percentage and time information */
+#define CONFIG_BATTERY_MEASURE (PERCENTAGE_MEASURE|TIME_MEASURE)
+#define NO_LOW_BATTERY_SHUTDOWN
/*
#define CPU_FREQ 48000000
*/
diff --git a/firmware/export/config/ondavx747.h b/firmware/export/config/ondavx747.h
index e01c6cc..45aec00 100644
--- a/firmware/export/config/ondavx747.h
+++ b/firmware/export/config/ondavx747.h
@@ -157,6 +157,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ondavx767.h b/firmware/export/config/ondavx767.h
index b2bac4f..44a7aa0 100644
--- a/firmware/export/config/ondavx767.h
+++ b/firmware/export/config/ondavx767.h
@@ -132,6 +132,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
//#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/ondavx777.h b/firmware/export/config/ondavx777.h
index b9167e0..0319816 100644
--- a/firmware/export/config/ondavx777.h
+++ b/firmware/export/config/ondavx777.h
@@ -151,6 +151,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/rk27generic.h b/firmware/export/config/rk27generic.h
index d7b63f0..6cebb8c 100644
--- a/firmware/export/config/rk27generic.h
+++ b/firmware/export/config/rk27generic.h
@@ -136,6 +136,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/samsungyh820.h b/firmware/export/config/samsungyh820.h
index d7d5411..74cd052 100644
--- a/firmware/export/config/samsungyh820.h
+++ b/firmware/export/config/samsungyh820.h
@@ -134,6 +134,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/samsungyh920.h b/firmware/export/config/samsungyh920.h
index 5255a05..73f226d 100644
--- a/firmware/export/config/samsungyh920.h
+++ b/firmware/export/config/samsungyh920.h
@@ -141,6 +141,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/samsungyh925.h b/firmware/export/config/samsungyh925.h
index 3e072dd..c95d1e5 100644
--- a/firmware/export/config/samsungyh925.h
+++ b/firmware/export/config/samsungyh925.h
@@ -138,6 +138,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h
index 2de36dc..735db1f 100644
--- a/firmware/export/config/samsungypr0.h
+++ b/firmware/export/config/samsungypr0.h
@@ -132,6 +132,8 @@
#define CURRENT_NORMAL 24 /* ~25h, on 600mAh that's about 24mA */
#define CURRENT_BACKLIGHT 62 /* ~6,5h -> 92mA. Minus 24mA normal that gives us 68mA */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Linux controlls charging, we can monitor */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/samsungyps3.h b/firmware/export/config/samsungyps3.h
index 3062d5c..cef3b60 100644
--- a/firmware/export/config/samsungyps3.h
+++ b/firmware/export/config/samsungyps3.h
@@ -118,6 +118,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging, software can monitor plug and charge state */
#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/sansac100.h b/firmware/export/config/sansac100.h
index e61e426..5aabfc2 100644
--- a/firmware/export/config/sansac100.h
+++ b/firmware/export/config/sansac100.h
@@ -92,6 +92,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/sansac200.h b/firmware/export/config/sansac200.h
index 74d3d94..479623f 100644
--- a/firmware/export/config/sansac200.h
+++ b/firmware/export/config/sansac200.h
@@ -142,6 +142,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/sansac200v2.h b/firmware/export/config/sansac200v2.h
index a5b857f..742d66f 100644
--- a/firmware/export/config/sansac200v2.h
+++ b/firmware/export/config/sansac200v2.h
@@ -138,6 +138,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansaclip.h b/firmware/export/config/sansaclip.h
index 4e21466..617e661 100644
--- a/firmware/export/config/sansaclip.h
+++ b/firmware/export/config/sansaclip.h
@@ -141,6 +141,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h
index 083b96a..b753f58 100644
--- a/firmware/export/config/sansaclipplus.h
+++ b/firmware/export/config/sansaclipplus.h
@@ -148,6 +148,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h
index cb2392a..4358fe5 100644
--- a/firmware/export/config/sansaclipv2.h
+++ b/firmware/export/config/sansaclipv2.h
@@ -144,6 +144,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansaclipzip.h b/firmware/export/config/sansaclipzip.h
index 043b102..696125e 100644
--- a/firmware/export/config/sansaclipzip.h
+++ b/firmware/export/config/sansaclipzip.h
@@ -149,6 +149,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansaconnect.h b/firmware/export/config/sansaconnect.h
index 714534d..a0f5179 100644
--- a/firmware/export/config/sansaconnect.h
+++ b/firmware/export/config/sansaconnect.h
@@ -149,6 +149,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define current usage levels */
#if 0
/* TODO */
diff --git a/firmware/export/config/sansae200.h b/firmware/export/config/sansae200.h
index dd5747a..c5b53e6 100644
--- a/firmware/export/config/sansae200.h
+++ b/firmware/export/config/sansae200.h
@@ -142,6 +142,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/sansae200v2.h b/firmware/export/config/sansae200v2.h
index a03dfe0..19346db 100644
--- a/firmware/export/config/sansae200v2.h
+++ b/firmware/export/config/sansae200v2.h
@@ -152,6 +152,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansafuze.h b/firmware/export/config/sansafuze.h
index 2e9c261..f905bc7 100644
--- a/firmware/export/config/sansafuze.h
+++ b/firmware/export/config/sansafuze.h
@@ -156,6 +156,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h
index 880bbae..1c8fdad 100644
--- a/firmware/export/config/sansafuzeplus.h
+++ b/firmware/export/config/sansafuzeplus.h
@@ -140,6 +140,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h
index 8231236..ae25592 100644
--- a/firmware/export/config/sansafuzev2.h
+++ b/firmware/export/config/sansafuzev2.h
@@ -161,6 +161,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_TARGET
diff --git a/firmware/export/config/sansam200.h b/firmware/export/config/sansam200.h
index c5eade8..2c37f91 100644
--- a/firmware/export/config/sansam200.h
+++ b/firmware/export/config/sansam200.h
@@ -98,6 +98,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/sansam200v4.h b/firmware/export/config/sansam200v4.h
index 7559361..ef371e5 100644
--- a/firmware/export/config/sansam200v4.h
+++ b/firmware/export/config/sansam200v4.h
@@ -118,6 +118,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* define this if the unit should not shut down on low battery. */
#define NO_LOW_BATTERY_SHUTDOWN
diff --git a/firmware/export/config/sansaview.h b/firmware/export/config/sansaview.h
index 829f67a..89da943 100644
--- a/firmware/export/config/sansaview.h
+++ b/firmware/export/config/sansaview.h
@@ -129,6 +129,8 @@
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Charging implemented in a target-specific algorithm */
#define CONFIG_CHARGING CHARGING_SIMPLE
#define HAVE_POWEROFF_WHILE_CHARGING
diff --git a/firmware/export/config/sdlapp.h b/firmware/export/config/sdlapp.h
index a55b7e3..ac43a0f 100644
--- a/firmware/export/config/sdlapp.h
+++ b/firmware/export/config/sdlapp.h
@@ -80,11 +80,6 @@
#define HAVE_SW_TONE_CONTROLS
-/* Define current usage levels. */
-#define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */
-#define CURRENT_BACKLIGHT 30 /* TBD */
-#define CURRENT_RECORD 0 /* no recording yet */
-
/* Define this to the CPU frequency */
/*
#define CPU_FREQ 48000000
diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h
index f0c9f47..f565e61 100644
--- a/firmware/export/config/sim.h
+++ b/firmware/export/config/sim.h
@@ -36,6 +36,11 @@
#undef CONFIG_STORAGE
+#if defined(CONFIG_CHARGING) && CONFIG_CHARGING > CHARGING_MONITOR
+#undef CONFIG_CHARGING
+#define CONFIG_CHARGING CHARGING_MONITOR
+#endif
+
#undef CONFIG_USBOTG
#undef USB_HANDLED_BY_OF
diff --git a/firmware/export/config/tatungtpj1022.h b/firmware/export/config/tatungtpj1022.h
index 247ca47..15d5cf2 100644
--- a/firmware/export/config/tatungtpj1022.h
+++ b/firmware/export/config/tatungtpj1022.h
@@ -85,6 +85,8 @@
#define BATTERY_CAPACITY_INC 10 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging? FIXME */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/vibe500.h b/firmware/export/config/vibe500.h
index ad22990..da53005 100644
--- a/firmware/export/config/vibe500.h
+++ b/firmware/export/config/vibe500.h
@@ -126,6 +126,8 @@
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging, software can monitor plug and charge state */
#define CONFIG_CHARGING CHARGING_SIMPLE
diff --git a/firmware/export/config/zenvisionm30gb.h b/firmware/export/config/zenvisionm30gb.h
index 335257d..c644813 100644
--- a/firmware/export/config/zenvisionm30gb.h
+++ b/firmware/export/config/zenvisionm30gb.h
@@ -131,6 +131,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
//#define CONFIG_CHARGING CHARGING_MONITOR
diff --git a/firmware/export/config/zenvisionm60gb.h b/firmware/export/config/zenvisionm60gb.h
index 6235308..321dd5d 100644
--- a/firmware/export/config/zenvisionm60gb.h
+++ b/firmware/export/config/zenvisionm60gb.h
@@ -130,6 +130,8 @@
#define BATTERY_CAPACITY_INC 100 /* capacity increment */
#define BATTERY_TYPES_COUNT 1 /* only one type */
+#define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE
+
/* Hardware controlled charging with monitoring */
//#define CONFIG_CHARGING CHARGING_MONITOR