summaryrefslogtreecommitdiff
path: root/uisimulator/common
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-12-03 19:54:25 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-12-03 19:54:25 +0000
commit58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657 (patch)
tree084c7b7c5d374fbfef2f8cddb3673a3b2a26a7df /uisimulator/common
parent0d0cc039f88ced4f6db5c4468b19913f52cd08c8 (diff)
downloadrockbox-58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657.tar.gz
rockbox-58eb784a5d1f0ac800e656d5dfa3a1bff8fb2657.zip
Straighten out some powermanagement stuff. Give target complete control over how power inputs are sensed. Clean SIMULATOR stuff out of target files. Get rid of USB charging option on targets that don't support it or don't implement it yet. Menu string remains to avoid language incompatibility but should be removed on next cleanup for targets not using it (notice in english.lang). global_settings becomes incompatible for some builds and so plugin API version is incremented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19315 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common')
-rw-r--r--uisimulator/common/stubs.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 169ce06067..8991bd73ca 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -30,6 +30,8 @@
30#include "string.h" 30#include "string.h"
31#include "lcd.h" 31#include "lcd.h"
32 32
33#include "power.h"
34
33#include "ata.h" /* for volume definitions */ 35#include "ata.h" /* for volume definitions */
34 36
35extern char having_new_lcd; 37extern char having_new_lcd;
@@ -212,9 +214,13 @@ bool charging_state(void)
212 return false; 214 return false;
213} 215}
214 216
215bool charger_inserted(void) 217unsigned int power_input_status(void)
216{ 218{
217 return false; 219#ifdef HAVE_BATTERY_SWITCH
220 return POWER_INPUT_BATTERY;
221#else
222 return POWER_INPUT_NONE;
223#endif
218} 224}
219 225
220#ifdef HAVE_SPDIF_POWER 226#ifdef HAVE_SPDIF_POWER
@@ -241,6 +247,11 @@ bool usb_powered(void)
241} 247}
242 248
243#if CONFIG_CHARGING 249#if CONFIG_CHARGING
250bool charger_inserted(void)
251{
252 return false;
253}
254
244bool usb_charging_enable(bool on) 255bool usb_charging_enable(bool on)
245{ 256{
246 (void)on; 257 (void)on;