diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2009-01-14 07:01:49 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2009-01-14 07:01:49 +0000 |
commit | e2a25592f8655fda9bf9260d22501017fba26390 (patch) | |
tree | 64ed029f1362c7ef4758e66eb00392af96566099 /firmware/target/arm/imx31 | |
parent | 3bfb9d44ae6440b75eaf494a1100f6c1ed21a666 (diff) |
Gigabeat S has no need for a USB tick. Put in a simple framework that allows USB monitoring by event. Also add a couple missed usb_enable calls when the connection is not for 'slave mode'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19768 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31')
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/usb-imx31.c | 1 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/usb-target.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c index a7314861c3..cd8b513ecd 100644 --- a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c +++ b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c @@ -59,6 +59,7 @@ void usb_connect_event(void) USB_INSERTED : USB_EXTRACTED; /* Notify power that USB charging is potentially available */ charger_usb_detect_event(usb_status); + usb_status_event(usb_status); } int usb_detect(void) diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-target.h b/firmware/target/arm/imx31/gigabeat-s/usb-target.h index 1f96a9a7eb..31b8080b57 100644 --- a/firmware/target/arm/imx31/gigabeat-s/usb-target.h +++ b/firmware/target/arm/imx31/gigabeat-s/usb-target.h @@ -25,6 +25,9 @@ #define USB_DRIVER_CLOSE #endif +/* Connect by events, not by tick polling */ +#define USB_STATUS_BY_EVENT + void usb_connect_event(void); void usb_init_device(void); int usb_detect(void); |