summaryrefslogtreecommitdiff
path: root/uisimulator
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
parent0d0cc039f88ced4f6db5c4468b19913f52cd08c8 (diff)
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')
-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 @@
#include "string.h"
#include "lcd.h"
+#include "power.h"
+
#include "ata.h" /* for volume definitions */
extern char having_new_lcd;
@@ -212,9 +214,13 @@ bool charging_state(void)
return false;
}
-bool charger_inserted(void)
+unsigned int power_input_status(void)
{
- return false;
+#ifdef HAVE_BATTERY_SWITCH
+ return POWER_INPUT_BATTERY;
+#else
+ return POWER_INPUT_NONE;
+#endif
}
#ifdef HAVE_SPDIF_POWER
@@ -241,6 +247,11 @@ bool usb_powered(void)
}
#if CONFIG_CHARGING
+bool charger_inserted(void)
+{
+ return false;
+}
+
bool usb_charging_enable(bool on)
{
(void)on;