powermgmt-target.h: move prototypes to powermgmt.h

Implement empty stubs if needed instead of empty static inline

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31617 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2012-01-07 22:32:52 +00:00
parent 66149b454b
commit 19fba5fb30
7 changed files with 8 additions and 32 deletions

View file

@ -139,6 +139,8 @@ int _battery_time(void); /* minutes */
int _battery_voltage(void); /* voltage in millivolts */
#if CONFIG_CHARGING >= CHARGING_TARGET
void powermgmt_init_target(void);
void charging_algorithm_close(void);
void charging_algorithm_step(void);
#endif
#ifdef HAVE_BATTERY_SWITCH

View file

@ -100,10 +100,6 @@
#error "Charger settings not defined!"
#endif
void powermgmt_init_target(void);
void charging_algorithm_step(void);
void charging_algorithm_close(void);
/* We want to be able to reset the averaging filter */
#define HAVE_RESET_BATTERY_FILTER

View file

@ -107,10 +107,6 @@
#define BATT_AVE_SAMPLES 128
#define ICHARGER_AVE_SAMPLES 32
void powermgmt_init_target(void);
void charging_algorithm_step(void);
void charging_algorithm_close(void);
/* Provide filtered charge current */
int battery_charge_current(void);

View file

@ -36,10 +36,6 @@
*/
#define ADC_BATTERY ADC_RTCSUP
void powermgmt_init_target(void);
void charging_algorithm_step(void);
void charging_algorithm_close(void);
/* We want to be able to reset the averaging filter */
#define HAVE_RESET_BATTERY_FILTER

View file

@ -47,10 +47,6 @@
#define ADC_BATTERY ADC_RTCSUP
#endif
void powermgmt_init_target(void);
void charging_algorithm_step(void);
void charging_algorithm_close(void);
/* We want to be able to reset the averaging filter */
#define HAVE_RESET_BATTERY_FILTER

View file

@ -65,6 +65,10 @@ int _battery_voltage(void)
return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10;
}
void powermgmt_init_target(void)
{
}
/** Charger control **/
#ifdef CHARGING_DEBUG_FILE
#include "file.h"
@ -483,12 +487,12 @@ void charging_algorithm_step(void)
charger_enable(trickle_sec > 0);
}
#ifdef CHARGING_DEBUG_FILE
void charging_algorithm_close(void)
{
#ifdef CHARGING_DEBUG_FILE
debug_file_close();
}
#endif /* CHARGING_DEBUG_FILE */
}
/* Returns true if the unit is charging the batteries. */
bool charging_state(void)

View file

@ -86,18 +86,4 @@ bool charger_enabled(void);
/* Battery filter lengths in samples */
#define BATT_AVE_SAMPLES 32
/* No init to do */
#if !(CONFIG_PLATFORM & PLATFORM_HOSTED)
static inline void powermgmt_init_target(void) {}
#endif
void charging_algorithm_step(void);
#ifdef CHARGING_DEBUG_FILE
/* Need to flush and close debug file */
void charging_algorithm_close(void);
#else
/* No poweroff operation to do */
static inline void charging_algorithm_close(void) {}
#endif
#endif /* POWERMGMT_TARGET_H */