projects
/
pub
/
USBasp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ba6d9c1
)
Add short delays before detaching from the USB bus in the bootloaders (thanks to...
author
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 22 Jan 2018 05:27:39 +0000
(16:27 +1100)
committer
Dean Camera
<dean@fourwalledcubicle.com>
Mon, 22 Jan 2018 05:27:39 +0000
(16:27 +1100)
Bootloaders/CDC/BootloaderCDC.h
patch
|
blob
|
blame
|
history
Bootloaders/DFU/BootloaderDFU.c
patch
|
blob
|
blame
|
history
Bootloaders/HID/BootloaderHID.c
patch
|
blob
|
blame
|
history
Bootloaders/HID/BootloaderHID.h
patch
|
blob
|
blame
|
history
Bootloaders/MassStorage/BootloaderMassStorage.c
patch
|
blob
|
blame
|
history
Bootloaders/MassStorage/BootloaderMassStorage.h
patch
|
blob
|
blame
|
history
Bootloaders/Printer/BootloaderPrinter.c
patch
|
blob
|
blame
|
history
Bootloaders/Printer/BootloaderPrinter.h
patch
|
blob
|
blame
|
history
diff --git
a/Bootloaders/CDC/BootloaderCDC.h
b/Bootloaders/CDC/BootloaderCDC.h
index
0d31c99
..
3c19bdf
100644
(file)
--- a/
Bootloaders/CDC/BootloaderCDC.h
+++ b/
Bootloaders/CDC/BootloaderCDC.h
@@
-43,6
+43,7
@@
#include <avr/eeprom.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
#include <avr/power.h>
#include <avr/interrupt.h>
+ #include <util/delay.h>
#include <stdbool.h>
#include "Descriptors.h"
#include <stdbool.h>
#include "Descriptors.h"
diff --git
a/Bootloaders/DFU/BootloaderDFU.c
b/Bootloaders/DFU/BootloaderDFU.c
index
b13917f
..
cafbd57
100644
(file)
--- a/
Bootloaders/DFU/BootloaderDFU.c
+++ b/
Bootloaders/DFU/BootloaderDFU.c
@@
-191,6
+191,9
@@
int main(void)
while (RunBootloader || WaitForExit)
USB_USBTask();
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();
/* Reset configured hardware back to their original states for the user application */
ResetHardware();
diff --git
a/Bootloaders/HID/BootloaderHID.c
b/Bootloaders/HID/BootloaderHID.c
index
e5b7d32
..
a1f3e67
100644
(file)
--- a/
Bootloaders/HID/BootloaderHID.c
+++ b/
Bootloaders/HID/BootloaderHID.c
@@
-84,6
+84,9
@@
int main(void)
while (RunBootloader)
USB_USBTask();
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();
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
diff --git
a/Bootloaders/HID/BootloaderHID.h
b/Bootloaders/HID/BootloaderHID.h
index
63f89a6
..
1984af8
100644
(file)
--- a/
Bootloaders/HID/BootloaderHID.h
+++ b/
Bootloaders/HID/BootloaderHID.h
@@
-43,6
+43,7
@@
#include <avr/power.h>
#include <avr/interrupt.h>
#include <util/atomic.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <util/atomic.h>
+ #include <util/delay.h>
#include <stdbool.h>
#include "Descriptors.h"
#include <stdbool.h>
#include "Descriptors.h"
diff --git
a/Bootloaders/MassStorage/BootloaderMassStorage.c
b/Bootloaders/MassStorage/BootloaderMassStorage.c
index
071e86b
..
81a8dc4
100644
(file)
--- a/
Bootloaders/MassStorage/BootloaderMassStorage.c
+++ b/
Bootloaders/MassStorage/BootloaderMassStorage.c
@@
-169,6
+169,9
@@
int main(void)
USB_USBTask();
}
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();
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
diff --git
a/Bootloaders/MassStorage/BootloaderMassStorage.h
b/Bootloaders/MassStorage/BootloaderMassStorage.h
index
30a3164
..
3241e81
100644
(file)
--- a/
Bootloaders/MassStorage/BootloaderMassStorage.h
+++ b/
Bootloaders/MassStorage/BootloaderMassStorage.h
@@
-41,6
+41,7
@@
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
+ #include <util/delay.h>
#include <string.h>
#include "Descriptors.h"
#include <string.h>
#include "Descriptors.h"
diff --git
a/Bootloaders/Printer/BootloaderPrinter.c
b/Bootloaders/Printer/BootloaderPrinter.c
index
6fde802
..
da41621
100644
(file)
--- a/
Bootloaders/Printer/BootloaderPrinter.c
+++ b/
Bootloaders/Printer/BootloaderPrinter.c
@@
-401,6
+401,9
@@
int main(void)
USB_USBTask();
}
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();
/* Disconnect from the host - USB interface will be reset later along with the AVR */
USB_Detach();
diff --git
a/Bootloaders/Printer/BootloaderPrinter.h
b/Bootloaders/Printer/BootloaderPrinter.h
index
54d96e0
..
78f938c
100644
(file)
--- a/
Bootloaders/Printer/BootloaderPrinter.h
+++ b/
Bootloaders/Printer/BootloaderPrinter.h
@@
-41,6
+41,7
@@
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
+ #include <util/delay.h>
#include "Descriptors.h"
#include "BootloaderAPI.h"
#include "Descriptors.h"
#include "BootloaderAPI.h"