summaryrefslogtreecommitdiffstats
path: root/firmware/usb.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-17 13:12:22 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-17 13:12:22 +0000
commit0ecb0fe6b1f5ea2078d01f24a9ac35123ef55349 (patch)
treecc3982a1f8bdc849a6ac67759fe160659e99c23b /firmware/usb.c
parent1c14d29370cfc35d5c89d2256edf00f914e0bc20 (diff)
downloadrockbox-0ecb0fe6b1f5ea2078d01f24a9ac35123ef55349.tar.gz
rockbox-0ecb0fe6b1f5ea2078d01f24a9ac35123ef55349.tar.bz2
rockbox-0ecb0fe6b1f5ea2078d01f24a9ac35123ef55349.zip
One change in r29068 wasn't right. Clarify comments on why it's the way it is. :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29070 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index ca0e86b478..d9d9f11031 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -483,10 +483,11 @@ void usb_start_monitoring(void)
usb_monitor_enabled = true;
-#ifdef USB_STATUS_BY_EVENT
- /* Filter the status - an event may have been missed because it was
- * sent before monitoring was enabled due to the connector already
- * having been inserted before before or during boot. */
+ /* An event may have been missed because it was sent before monitoring
+ * was enabled due to the connector already having been inserted before
+ * before or during boot. */
+#if defined(USB_DETECT_BY_DRV) || defined(USB_DETECT_BY_CORE)
+ /* Filter the status - USB_INSERTED may happen later */
status = (status == USB_INSERTED) ? USB_POWERED : USB_UNPOWERED;
#endif
usb_status_event(status);