Merge pull request #47 from NicoHood/patch-2
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 10 Mar 2015 12:23:11 +0000 (23:23 +1100)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 10 Mar 2015 12:23:11 +0000 (23:23 +1100)
Add a clean up delay in the CDC bootloader before disconnect to fix transient communication issues (thanks to NicoHood).

Bootloaders/CDC/BootloaderCDC.c

index 63991de..1011404 100644 (file)
@@ -156,6 +156,9 @@ int main(void)
                CDC_Task();
                USB_USBTask();
        }
+       
+       /* Wait a short time to end all USB transactions and then disconnect */
+       _delay_us(1000);
 
        /* Disconnect from the host - USB interface will be reset later along with the AVR */
        USB_Detach();