aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers
diff options
context:
space:
mode:
authorDean Camera <[email protected]>2010-05-04 10:16:44 +0000
committerDean Camera <[email protected]>2010-05-04 10:16:44 +0000
commit708a1c6166af75f0243972c81d06978cc9bf20be (patch)
tree978200eb752e4290ac94c930607544d4864a4189 /LUFA/Drivers
parente652cfac67ace9c307612cd2e1df70142358c673 (diff)
downloadqmk_firmware-708a1c6166af75f0243972c81d06978cc9bf20be.tar.gz
qmk_firmware-708a1c6166af75f0243972c81d06978cc9bf20be.zip
Fixed INTERRUPT_CONTROL_ENDPOINT compile time option preventing other interrupts from occuring while the control endpoint request is being processed, causing possible lockups if a USB interrupt occurs during a transfer.
Diffstat (limited to 'LUFA/Drivers')
-rw-r--r--LUFA/Drivers/USB/LowLevel/USBInterrupt.c3
-rw-r--r--LUFA/Drivers/USB/LowLevel/USBInterrupt.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c
index 925248d13a..2d9e35b726 100644
--- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c
+++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c
@@ -235,7 +235,10 @@ ISR(USB_COM_vect, ISR_BLOCK)
{
uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint();
+ USB_INT_Disable(USB_INT_RXSTPI);
+ sei();
USB_USBTask();
+ USB_INT_Enable(USB_INT_RXSTPI);
USB_INT_Clear(USB_INT_RXSTPI);
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.h b/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
index cccf26ac86..e46e7597b9 100644
--- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
+++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.h
@@ -43,6 +43,7 @@
/* Includes: */
#include <avr/io.h>
+ #include <avr/interrupt.h>
#include <stdbool.h>
#include "../../../Common/Common.h"