From 36bc6a1fd5273a22daf4e00e5da058250ab54774 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sun, 1 Jan 2012 03:19:52 +0000 Subject: Gigabeat S: Revert removal of usb_plugged in r31489 Synchronous cable read is still required because the timing of the receipt of the cable event cannot be known for sure-- basically it introduced a thread race between main and pmic. If a keypress is desired instead to enter BL USB mode a la AS3525, then it's possible to remove that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31510 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/gigabeat-s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bootloader') diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c index 5b5361530b..909194e1b2 100644 --- a/bootloader/gigabeat-s.c +++ b/bootloader/gigabeat-s.c @@ -109,7 +109,7 @@ static void handle_usb(int connect_timeout) break; } - if (usb_detect() == USB_EXTRACTED) + if (usb_plugged() == USB_EXTRACTED) break; /* Cable pulled */ } @@ -376,7 +376,7 @@ void main(void) /* Do USB first since a tar or binary could be added to the MTP directory * at the time and we can untar or move after unplugging. */ - if (usb_detect() == USB_INSERTED) + if (usb_plugged() == USB_INSERTED) handle_usb(HZ*2); handle_untar(); -- cgit v1.2.3