H10 can distinguish USB and MAIN charger input so return proper flags. H100s were misconfigured and should use CHARGING_SIMPLE. Comment more on what charging types mean in config.h.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19582 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2008-12-24 19:36:37 +00:00
parent 9b8f56f35c
commit 377b42b63b
5 changed files with 21 additions and 16 deletions

View file

@ -50,9 +50,15 @@ void power_init(void)
unsigned int power_input_status(void)
{
/* No separate source for USB and charges from USB on its own */
return (GPIOF_INPUT_VAL & 0x08) ?
POWER_INPUT_MAIN_CHARGER : POWER_INPUT_NONE;
unsigned int status = POWER_INPUT_NONE;
if (GPIOF_INPUT_VAL & 0x08)
status = POWER_INPUT_MAIN_CHARGER;
if (GPIOL_INPUT_VAL & 0x04)
status |= POWER_INPUT_USB_CHARGER;
return status;
}
void ide_power_enable(bool on)