From 2eb01425877347f601b1f8b03e07dcb2d690d6d9 Mon Sep 17 00:00:00 2001 From: Torne Wuff Date: Sat, 5 Jun 2010 20:43:30 +0000 Subject: 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 --- firmware/export/usb.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'firmware/export/usb.h') diff --git a/firmware/export/usb.h b/firmware/export/usb.h index d544f5cab1..55b5f2cffb 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -52,6 +52,9 @@ enum { USB_REQUEST_REBOOT, /* Event */ #endif USB_QUIT, /* Event */ +#if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK) + USB_CHARGER_UPDATE, /* Event */ +#endif }; #ifdef HAVE_USB_POWER @@ -156,8 +159,11 @@ enum { * or target-specific code on others */ void usb_charging_enable(int state); -#endif -#endif +#ifdef HAVE_USBSTACK +void usb_charger_update(void); +#endif /* HAVE_USBSTACK */ +#endif /* HAVE_USB_CHARGING_ENABLE */ +#endif /* HAVE_USB_POWER */ #ifdef HAVE_USBSTACK void usb_signal_transfer_completion( struct usb_transfer_completion_event_data *event_data); -- cgit v1.2.3