summaryrefslogtreecommitdiff
path: root/uisimulator/common/powermgmt-sim.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-01-25 12:02:54 -0500
committerMichael Sevakis <jethead71@rockbox.org>2012-01-25 12:02:54 -0500
commit7ccd2c9d16743820369a5e61e6b41919c4978407 (patch)
tree80924b366a9c811a5aa40a4881492b8a397232b3 /uisimulator/common/powermgmt-sim.c
parent0499aff9d040c73191d1be670ed3512410841a8c (diff)
downloadrockbox-7ccd2c9d16743820369a5e61e6b41919c4978407.tar.gz
rockbox-7ccd2c9d16743820369a5e61e6b41919c4978407.zip
Fix power_input_status in sim where target has a battery switch.
Change-Id: Ic00410a5b143d71928dc67c47d94d317b8ecadcd
Diffstat (limited to 'uisimulator/common/powermgmt-sim.c')
-rw-r--r--uisimulator/common/powermgmt-sim.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/uisimulator/common/powermgmt-sim.c b/uisimulator/common/powermgmt-sim.c
index 41732c94a2..3430b1ea79 100644
--- a/uisimulator/common/powermgmt-sim.c
+++ b/uisimulator/common/powermgmt-sim.c
@@ -121,8 +121,14 @@ int _battery_voltage(void)
121#if CONFIG_CHARGING 121#if CONFIG_CHARGING
122unsigned int power_input_status(void) 122unsigned int power_input_status(void)
123{ 123{
124 return charger_input_state >= CHARGER_PLUGGED 124 unsigned int status = charger_input_state >= CHARGER_PLUGGED
125 ? POWER_INPUT_CHARGER : POWER_INPUT_NONE; 125 ? POWER_INPUT_CHARGER : POWER_INPUT_NONE;
126
127#ifdef HAVE_BATTERY_SWITCH
128 status |= POWER_INPUT_BATTERY;
129#endif
130
131 return status;
126} 132}
127 133
128bool charging_state(void) 134bool charging_state(void)