From 9e8fe0e4c662d3d5c26ea2f1f64c7da66cf3ce04 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 30 Oct 2006 11:33:38 +0000 Subject: General: changed local adc to voltage conversions in several places to use battery_voltage. Added battery_read_info function for unfiltered battery information. x5: removed adc_read as a distinct function. Removed adc tick task. adc_init is empty inline. Adjusted battery scale, voltage to level array and read 10 bits from the ADC for battery since 255 levels is not enough for true centivolt resolution. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11396 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/powermgmt.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'firmware/export/powermgmt.h') diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index 30fe60c293..ba2cc02318 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h @@ -63,7 +63,7 @@ extern int trickle_sec; /* trickle charge: How many seconds per minute #if CONFIG_CHARGING >= CHARGING_MONITOR typedef enum { /* sorted by increasing charging current */ - DISCHARGING = 0, + DISCHARGING = 0, TRICKLE, /* Can occur for CONFIG_CHARGING >= CHARGING_MONITOR */ TOPOFF, /* Can occur for CONFIG_CHARGING == CHARGING_CONTROL */ CHARGING /* Can occur for all CONFIG_CHARGING options */ @@ -126,6 +126,9 @@ int battery_time(void); /* minutes */ unsigned int battery_voltage(void); /* filtered batt. voltage in centivolts */ +/* read unfiltered battery info */ +void battery_read_info(int *adc, int *voltage, int *level); + /* Tells if the battery level is safe for disk writes */ bool battery_level_safe(void); -- cgit v1.2.3