Add short delays before detaching from the USB bus in the bootloaders (thanks to...
[pub/USBasp.git] / Bootloaders / DFU / BootloaderDFU.c
index b13917f..cafbd57 100644 (file)
@@ -191,6 +191,9 @@ int main(void)
        while (RunBootloader || WaitForExit)
          USB_USBTask();
 
+       /* Wait a short time to end all USB transactions and then disconnect */
+       _delay_us(1000);
+
        /* Reset configured hardware back to their original states for the user application */
        ResetHardware();