Add short delays before detaching from the USB bus in the bootloaders (thanks to...
[pub/USBasp.git] / Bootloaders / MassStorage / BootloaderMassStorage.c
index 071e86b..81a8dc4 100644 (file)
@@ -169,6 +169,9 @@ int main(void)
                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();