summaryrefslogtreecommitdiff
path: root/firmware/export/powermgmt.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2009-01-11 10:07:22 +0000
committerMichael Sevakis <jethead71@rockbox.org>2009-01-11 10:07:22 +0000
commit7d7969114da36a99afc4d80576ff9b089cb09e50 (patch)
tree48c3c574e382d80454c28a6b77de64a64f3cedcd /firmware/export/powermgmt.h
parentb84fe020a5bc497cee9b88eb782c2d4a9b7be711 (diff)
downloadrockbox-7d7969114da36a99afc4d80576ff9b089cb09e50.tar.gz
rockbox-7d7969114da36a99afc4d80576ff9b089cb09e50.zip
c200v1/e200v1: Add battery charging. This should be usable on v2 players but those should be evaluated for current, endpoint voltage and whether or not accurate battery readings may always be obtained (which determines algorithm setup and behavior).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19748 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/powermgmt.h')
-rw-r--r--firmware/export/powermgmt.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h
index 5be3a39c1d..39e2e6eab9 100644
--- a/firmware/export/powermgmt.h
+++ b/firmware/export/powermgmt.h
@@ -27,7 +27,7 @@
27 27
28enum charge_state_type 28enum charge_state_type
29{ 29{
30 /* sorted by increasing charging current */ 30 /* sorted by increasing charging current (do not change!) */
31#if CONFIG_CHARGING >= CHARGING_MONITOR 31#if CONFIG_CHARGING >= CHARGING_MONITOR
32 CHARGE_STATE_DISABLED = -2, /* Disable charger use (safety measure) */ 32 CHARGE_STATE_DISABLED = -2, /* Disable charger use (safety measure) */
33 CHARGE_STATE_ERROR = -1, /* Some error occurred that should not allow 33 CHARGE_STATE_ERROR = -1, /* Some error occurred that should not allow
@@ -143,13 +143,16 @@ unsigned int battery_voltage(void); /* filtered batt. voltage in millivolts */
143 143
144#ifdef HAVE_BATTERY_SWITCH 144#ifdef HAVE_BATTERY_SWITCH
145unsigned int input_millivolts(void); /* voltage that device is running from */ 145unsigned int input_millivolts(void); /* voltage that device is running from */
146#endif /* HAVE_BATTERY_SWITCH */
146 147
148#if defined(HAVE_BATTERY_SWITCH) || defined(HAVE_RESET_BATTERY_FILTER)
147/* Set the filtered battery voltage (to adjust it before beginning a charge 149/* Set the filtered battery voltage (to adjust it before beginning a charge
148 * cycle for instance where old, loaded readings will likely be invalid). 150 * cycle for instance where old, loaded readings will likely be invalid).
149 * Also readjust when battery switch is opened or closed. 151 * Also readjust when battery switch is opened or closed.
150 */ 152 */
151void reset_battery_filter(int millivolts); 153void reset_battery_filter(int millivolts);
152#endif /* HAVE_BATTERY_SWITCH */ 154#endif /* HAVE_BATTERY_SWITCH || HAVE_RESET_BATTERY_FILTER */
155
153 156
154/* read unfiltered battery info */ 157/* read unfiltered battery info */
155void battery_read_info(int *voltage, int *level); 158void battery_read_info(int *voltage, int *level);