From f28da1a35a6403b153f93f66e3d96e485f89c363 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Sun, 12 Aug 2007 19:49:03 +0000 Subject: Enable a lot more features for simulators and add stubs where necessary, simulators should now work with identical lng and voice files as the respective target git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14299 a1c6a512-1295-4272-9138-f99709370657 --- firmware/powermgmt.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'firmware/powermgmt.c') diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 6f013dec98..49b9a51d40 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -76,6 +76,13 @@ static int wrcount; #endif static int shutdown_timeout = 0; +#if CONFIG_CHARGING >= CHARGING_MONITOR +charge_state_type charge_state; /* charging mode */ +#endif + +#if CONFIG_CHARGING +charger_input_state_type charger_input_state IDATA_ATTR; +#endif #ifdef SIMULATOR /***********************************************************/ @@ -153,10 +160,16 @@ void set_battery_capacity(int capacity) (void)capacity; } -void reset_poweroff_timer(void) +#if BATTERY_TYPES_COUNT > 1 +void set_battery_type(int type) { + (void)type; } +#endif +void reset_poweroff_timer(void) +{ +} #else /* not SIMULATOR ******************************************************/ @@ -269,9 +282,6 @@ static const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = }; #if CONFIG_CHARGING -charger_input_state_type charger_input_state IDATA_ATTR; - - /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */ static const unsigned short percent_to_volt_charge[11] = { @@ -305,10 +315,6 @@ static const unsigned short percent_to_volt_charge[11] = }; #endif /* CONFIG_CHARGING */ -#if CONFIG_CHARGING >= CHARGING_MONITOR -charge_state_type charge_state; /* charging mode */ -#endif - #if CONFIG_CHARGING == CHARGING_CONTROL int long_delta; /* long term delta battery voltage */ int short_delta; /* short term delta battery voltage */ -- cgit v1.2.3