aboutsummaryrefslogtreecommitdiffstats
path: root/Bootloaders/DFU
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2018-01-22 16:27:39 +1100
committerDean Camera <dean@fourwalledcubicle.com>2018-01-22 16:27:39 +1100
commitd6a528f9a03fe338e30d93f306e0482612e02e3e (patch)
tree69ae2773614b99df8b8a3cdbc944178236cea5b7 /Bootloaders/DFU
parentba6d9c1a971db3c42bf0b054ebb64f72b3e3ddba (diff)
downloadlufa-d6a528f9a03fe338e30d93f306e0482612e02e3e.tar.gz
lufa-d6a528f9a03fe338e30d93f306e0482612e02e3e.tar.bz2
lufa-d6a528f9a03fe338e30d93f306e0482612e02e3e.zip
Add short delays before detaching from the USB bus in the bootloaders (thanks to NicoHood).
Diffstat (limited to 'Bootloaders/DFU')
-rw-r--r--Bootloaders/DFU/BootloaderDFU.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c
index b13917f45..cafbd572b 100644
--- a/Bootloaders/DFU/BootloaderDFU.c
+++ b/Bootloaders/DFU/BootloaderDFU.c
@@ -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();