summaryrefslogtreecommitdiff
path: root/firmware/target/arm/usb-fw-pp502x.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2008-02-11 14:26:25 +0000
committerBjörn Stenberg <bjorn@haxx.se>2008-02-11 14:26:25 +0000
commit2f7cffa204eaa2675b0c6782462b19f4f09bff12 (patch)
tree54ffb4cada2c8db9d0feb4c31efc02cb3ab18a1d /firmware/target/arm/usb-fw-pp502x.c
parent9811fc9abf6c3b2bb9500a99c14a64ee29641b09 (diff)
downloadrockbox-2f7cffa204eaa2675b0c6782462b19f4f09bff12.tar.gz
rockbox-2f7cffa204eaa2675b0c6782462b19f4f09bff12.zip
Major USB fixes by Frank Gevaerts. Still disabled in builds, #define USE_ROCKBOX_USB to test.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16279 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/usb-fw-pp502x.c')
-rw-r--r--firmware/target/arm/usb-fw-pp502x.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c
index 0813ae1c59..5b71fbd847 100644
--- a/firmware/target/arm/usb-fw-pp502x.c
+++ b/firmware/target/arm/usb-fw-pp502x.c
@@ -68,6 +68,9 @@ void usb_init_device(void)
68void usb_enable(bool on) 68void usb_enable(bool on)
69{ 69{
70 if (on) { 70 if (on) {
71#ifdef USE_ROCKBOX_USB
72 usb_core_init();
73#else
71 /* until we have native mass-storage mode, we want to reboot on 74 /* until we have native mass-storage mode, we want to reboot on
72 usb host connect */ 75 usb host connect */
73#if defined(IRIVER_H10) || defined (IRIVER_H10_5GB) 76#if defined(IRIVER_H10) || defined (IRIVER_H10_5GB)
@@ -89,6 +92,7 @@ void usb_enable(bool on)
89 92
90 system_reboot(); /* Reboot */ 93 system_reboot(); /* Reboot */
91 } 94 }
95#endif /* USE_ROCKBOX_USB */
92 } 96 }
93 else 97 else
94 usb_core_exit(); 98 usb_core_exit();
@@ -195,9 +199,9 @@ int usb_detect(void)
195 return status; 199 return status;
196 } 200 }
197 201
198 /* Wait up to 50 ticks (500ms) before deciding there is no computer 202 /* Wait up to 100 ticks (1s) before deciding there is no computer
199 attached. */ 203 attached. */
200 countdown = 50; 204 countdown = 100;
201 205
202 return status; 206 return status;
203} 207}