From 616c98b38f6ddac0ac3dde8ec0fa248f835717e2 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Mon, 19 Jan 2009 13:41:25 +0000 Subject: USB detection changes. c200/e200: Consider USB to be powered when charger is plugged but detect USB connection by bus reset. When received, disconnect and restart the driver fully enabled. imx31: Fix hack used to make initial connect succeeded-- set PHY type before initial reset. General: Move some target code out of usb-drv-arc.c and implement it in respective usb sources and CPU headers so things stay clean. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19797 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/usb.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'firmware/export/usb.h') diff --git a/firmware/export/usb.h b/firmware/export/usb.h index a6cfad5889..0a0539a622 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -33,8 +33,11 @@ enum { USB_INSERTED, /* Event+State */ USB_EXTRACTED, /* Event+State */ -#ifdef HAVE_USB_POWER - USB_POWERED, /* State */ +#if defined(HAVE_USB_POWER) || defined(USB_DETECT_BY_DRV) + USB_POWERED, /* Event+State */ +#endif +#ifdef USB_DETECT_BY_DRV + USB_UNPOWERED, /* Event */ #endif #ifdef HAVE_LCD_BITMAP USB_SCREENDUMP, /* State */ @@ -107,6 +110,7 @@ struct usb_transfer_completion_event_data void usb_init(void); void usb_enable(bool on); +void usb_attach(void); void usb_start_monitoring(void); void usb_close(void); void usb_acknowledge(long id); -- cgit v1.2.3