forked from len0rd/rockbox
New USB charging system, part 2 - "Force" charging mode
Enable support for the "force" mode of USB charging. This should work on Gigabeat S and Nano2g (and any other future target which has a RB usb stack and supports charging) - if a host connection is not detected within 10 seconds of USB insertion, assume that the connected device is an AC charger and charge anyway, if the user has specified "force" as the mode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26594 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
47181b8b9b
commit
2eb0142587
4 changed files with 56 additions and 7 deletions
|
|
@ -432,10 +432,23 @@ static void usb_thread(void)
|
|||
try_reboot();
|
||||
break;
|
||||
#endif /* USB_FIREWIRE_HANDLING */
|
||||
|
||||
#if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK)
|
||||
case USB_CHARGER_UPDATE:
|
||||
usb_charging_maxcurrent_change(usb_charging_maxcurrent());
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK)
|
||||
void usb_charger_update(void)
|
||||
{
|
||||
queue_post(&usb_queue, USB_CHARGER_UPDATE, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USB_STATUS_BY_EVENT
|
||||
void usb_status_event(int current_status)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue