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:
Brandon Low 2006-01-19 07:47:34 +00:00
parent 13414ae77a
commit cdacab3d89
7 changed files with 100 additions and 29 deletions

View file

@ -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)
{