forked from len0rd/rockbox
Fix power_input_status in sim where target has a battery switch.
Change-Id: Ic00410a5b143d71928dc67c47d94d317b8ecadcd
This commit is contained in:
parent
0499aff9d0
commit
7ccd2c9d16
1 changed files with 7 additions and 1 deletions
|
|
@ -121,8 +121,14 @@ int _battery_voltage(void)
|
|||
#if CONFIG_CHARGING
|
||||
unsigned int power_input_status(void)
|
||||
{
|
||||
return charger_input_state >= CHARGER_PLUGGED
|
||||
unsigned int status = charger_input_state >= CHARGER_PLUGGED
|
||||
? POWER_INPUT_CHARGER : POWER_INPUT_NONE;
|
||||
|
||||
#ifdef HAVE_BATTERY_SWITCH
|
||||
status |= POWER_INPUT_BATTERY;
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
bool charging_state(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue