mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 23:22:34 -05:00
Charging state reporting on H3x0
Don't read the GPIO every refresh of statusbar or gwps for plugged state, use a variable exported from powermgmt instead. Allow Custom WPS to access %bc for battery charge state on targets that support this. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8383 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
13414ae77a
commit
cdacab3d89
7 changed files with 100 additions and 29 deletions
|
|
@ -148,6 +148,12 @@ void charger_enable(bool on)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHARGE_STATE
|
||||
bool charging_state(void) {
|
||||
return (GPIO_READ & 0x00800000)?true:false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SPDIF_POWER
|
||||
void spdif_power_enable(bool on)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue