Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Erik Strand
lufa
Commits
d6a528f9
Commit
d6a528f9
authored
Jan 22, 2018
by
Dean Camera
Browse files
Add short delays before detaching from the USB bus in the bootloaders (thanks to NicoHood).
parent
ba6d9c1a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Bootloaders/CDC/BootloaderCDC.h
View file @
d6a528f9
...
...
@@ -43,6 +43,7 @@
#include
<avr/eeprom.h>
#include
<avr/power.h>
#include
<avr/interrupt.h>
#include
<util/delay.h>
#include
<stdbool.h>
#include
"Descriptors.h"
...
...
Bootloaders/DFU/BootloaderDFU.c
View file @
d6a528f9
...
...
@@ -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
();
...
...
Bootloaders/HID/BootloaderHID.c
View file @
d6a528f9
...
...
@@ -84,6 +84,9 @@ int main(void)
while
(
RunBootloader
)
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
();
...
...
Bootloaders/HID/BootloaderHID.h
View file @
d6a528f9
...
...
@@ -43,6 +43,7 @@
#include
<avr/power.h>
#include
<avr/interrupt.h>
#include
<util/atomic.h>
#include
<util/delay.h>
#include
<stdbool.h>
#include
"Descriptors.h"
...
...
Bootloaders/MassStorage/BootloaderMassStorage.c
View file @
d6a528f9
...
...
@@ -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
();
...
...
Bootloaders/MassStorage/BootloaderMassStorage.h
View file @
d6a528f9
...
...
@@ -41,6 +41,7 @@
#include
<avr/wdt.h>
#include
<avr/power.h>
#include
<avr/interrupt.h>
#include
<util/delay.h>
#include
<string.h>
#include
"Descriptors.h"
...
...
Bootloaders/Printer/BootloaderPrinter.c
View file @
d6a528f9
...
...
@@ -401,6 +401,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
();
...
...
Bootloaders/Printer/BootloaderPrinter.h
View file @
d6a528f9
...
...
@@ -41,6 +41,7 @@
#include
<avr/wdt.h>
#include
<avr/power.h>
#include
<avr/interrupt.h>
#include
<util/delay.h>
#include
"Descriptors.h"
#include
"BootloaderAPI.h"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment