diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-10-04 16:42:36 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2021-10-04 16:42:36 -0400 |
commit | 0a1d25d27a50fca95305c7d3ee3bdcfec8dbdae1 (patch) | |
tree | eedbece22c999ab0dd4921e2c06db10b2bda84d8 | |
parent | e6740ed562b49cd2a2825ae3461f83e4a23b4c68 (diff) | |
download | rockbox-0a1d25d27a50fca95305c7d3ee3bdcfec8dbdae1.tar.gz rockbox-0a1d25d27a50fca95305c7d3ee3bdcfec8dbdae1.zip |
Sansa E200v1 Bootloader ensure USB unplug is detected
Change-Id: Ibec5bf5e0f7a518fafc7b9fb8b95d420ef4ddfc0
-rw-r--r-- | bootloader/main-pp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index d1b45dfb66..15f6ad4fb7 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c | |||
@@ -234,7 +234,18 @@ static int handle_usb(int connect_timeout) | |||
234 | 234 | ||
235 | usb = USB_HANDLED; | 235 | usb = USB_HANDLED; |
236 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 236 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
237 | #if defined(SANSA_E200) && defined(HAVE_BOOTLOADER_USB_MODE) | ||
238 | /* E200 misses unplug randomly | ||
239 | probably fine for other targets too but needs tested */ | ||
240 | while (usb_wait_for_disconnect_w_tmo(&q, HZ * 5) > 0) | ||
241 | { | ||
242 | /* timeout */ | ||
243 | if (!usb_plugged()) | ||
244 | break; | ||
245 | } | ||
246 | #else | ||
237 | usb_wait_for_disconnect(&q); | 247 | usb_wait_for_disconnect(&q); |
248 | #endif | ||
238 | break; | 249 | break; |
239 | } | 250 | } |
240 | 251 | ||