summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-17 12:24:41 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-17 12:24:41 +0000
commit05f6f3419aec991307e7c81e0738e0496a21d89b (patch)
tree4bad4a187bc2a2bdd714e086ac9910a9b3de6357 /firmware/usbstack
parentbcc0f88372fd2be986a5e279dd7e3bd556d6c984 (diff)
downloadrockbox-05f6f3419aec991307e7c81e0738e0496a21d89b.tar.gz
rockbox-05f6f3419aec991307e7c81e0738e0496a21d89b.tar.bz2
rockbox-05f6f3419aec991307e7c81e0738e0496a21d89b.zip
Add a higher level USB detection that prevents fraudulent bus resets from causing USB mode to be entered. Enable for SA9200 only at this time. Also, for SA9200, use the bus power GPIO rather than the 'connector inserted' GPIO to detect the cable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29068 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c
index 2ff3f325a2..aa96fff17f 100644
--- a/firmware/usbstack/usb_core.c
+++ b/firmware/usbstack/usb_core.c
@@ -559,6 +559,11 @@ static void request_handler_device_get_descriptor(struct usb_ctrlrequest* req)
case USB_DT_DEVICE:
ptr = &device_descriptor;
size = sizeof(struct usb_device_descriptor);
+#ifdef USB_DETECT_BY_CORE
+ /* Something requested a device descriptor; consider this a legit
+ connection */
+ usb_drv_usb_detect_event();
+#endif
break;
case USB_DT_OTHER_SPEED_CONFIG: