summaryrefslogtreecommitdiffstats
path: root/firmware/usb.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-11-17 18:40:00 +0000
committerThomas Martitz <kugel@rockbox.org>2011-11-17 18:40:00 +0000
commit1645c148e35becff9668cc541be5c850153370eb (patch)
treeff4af71980a290ed1877facee590b39280940c45 /firmware/usb.c
parent2a8eacdbfc5d98b016c480ddaddff100301f721f (diff)
downloadrockbox-1645c148e35becff9668cc541be5c850153370eb.tar.gz
rockbox-1645c148e35becff9668cc541be5c850153370eb.tar.bz2
rockbox-1645c148e35becff9668cc541be5c850153370eb.zip
Simulate usb plugging on the sim better using sim_tasks.
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/usb.c')
-rw-r--r--firmware/usb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 4e71c06119..59462b952e 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -782,16 +782,14 @@ void usb_set_hid(bool enable)
}
#endif /* USB_ENABLE_HID */
-#else /* SIMULATOR || USB_NONE */
+#elif defined(USB_NONE)
+/* Dummy functions for USB_NONE */
-#ifdef USB_NONE
bool usb_inserted(void)
{
return false;
}
-#endif /* USB_NONE */
-/* Dummy simulator functions */
void usb_acknowledge(long id)
{
id = id;
@@ -814,5 +812,5 @@ void usb_wait_for_disconnect(struct event_queue *q)
{
(void)q;
}
+#endif /* USB_NONE */
-#endif /* !USB_NONE && !SIMULATOR */