diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-08-12 19:49:03 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-08-12 19:49:03 +0000 |
commit | f28da1a35a6403b153f93f66e3d96e485f89c363 (patch) | |
tree | 760d0c286a65042e18e2165ff555be0d40e80558 /firmware/powermgmt.c | |
parent | 90c40b7fea0275e212addf3ae6ac6979f5b4585b (diff) | |
download | rockbox-f28da1a35a6403b153f93f66e3d96e485f89c363.tar.gz rockbox-f28da1a35a6403b153f93f66e3d96e485f89c363.zip |
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
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 22 |
1 files changed, 14 insertions, 8 deletions
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; | |||
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | static int shutdown_timeout = 0; | 78 | static int shutdown_timeout = 0; |
79 | #if CONFIG_CHARGING >= CHARGING_MONITOR | ||
80 | charge_state_type charge_state; /* charging mode */ | ||
81 | #endif | ||
82 | |||
83 | #if CONFIG_CHARGING | ||
84 | charger_input_state_type charger_input_state IDATA_ATTR; | ||
85 | #endif | ||
79 | 86 | ||
80 | #ifdef SIMULATOR /***********************************************************/ | 87 | #ifdef SIMULATOR /***********************************************************/ |
81 | 88 | ||
@@ -153,10 +160,16 @@ void set_battery_capacity(int capacity) | |||
153 | (void)capacity; | 160 | (void)capacity; |
154 | } | 161 | } |
155 | 162 | ||
156 | void reset_poweroff_timer(void) | 163 | #if BATTERY_TYPES_COUNT > 1 |
164 | void set_battery_type(int type) | ||
157 | { | 165 | { |
166 | (void)type; | ||
158 | } | 167 | } |
168 | #endif | ||
159 | 169 | ||
170 | void reset_poweroff_timer(void) | ||
171 | { | ||
172 | } | ||
160 | 173 | ||
161 | #else /* not SIMULATOR ******************************************************/ | 174 | #else /* not SIMULATOR ******************************************************/ |
162 | 175 | ||
@@ -269,9 +282,6 @@ static const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | |||
269 | }; | 282 | }; |
270 | 283 | ||
271 | #if CONFIG_CHARGING | 284 | #if CONFIG_CHARGING |
272 | charger_input_state_type charger_input_state IDATA_ATTR; | ||
273 | |||
274 | |||
275 | /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */ | 285 | /* voltages (centivolt) of 0%, 10%, ... 100% when charging enabled */ |
276 | static const unsigned short percent_to_volt_charge[11] = | 286 | static const unsigned short percent_to_volt_charge[11] = |
277 | { | 287 | { |
@@ -305,10 +315,6 @@ static const unsigned short percent_to_volt_charge[11] = | |||
305 | }; | 315 | }; |
306 | #endif /* CONFIG_CHARGING */ | 316 | #endif /* CONFIG_CHARGING */ |
307 | 317 | ||
308 | #if CONFIG_CHARGING >= CHARGING_MONITOR | ||
309 | charge_state_type charge_state; /* charging mode */ | ||
310 | #endif | ||
311 | |||
312 | #if CONFIG_CHARGING == CHARGING_CONTROL | 318 | #if CONFIG_CHARGING == CHARGING_CONTROL |
313 | int long_delta; /* long term delta battery voltage */ | 319 | int long_delta; /* long term delta battery voltage */ |
314 | int short_delta; /* short term delta battery voltage */ | 320 | int short_delta; /* short term delta battery voltage */ |