diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-11 13:45:23 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2010-05-11 13:45:23 +0000 |
commit | ee5ea4ce2bc463206ed8fe01c71b31585c0cc280 (patch) | |
tree | e74d4313e54fc0cec8f4a61fc48d8aac8bf23f16 /LUFA | |
parent | 53ebb2f21a216281707f5d680181c3c4adc12772 (diff) | |
download | lufa-ee5ea4ce2bc463206ed8fe01c71b31585c0cc280.tar.gz lufa-ee5ea4ce2bc463206ed8fe01c71b31585c0cc280.tar.bz2 lufa-ee5ea4ce2bc463206ed8fe01c71b31585c0cc280.zip |
Fix nasty bug in USBInterrupt.c which would cause a lockup if the control endpoint was not selected at the point the USB endpoint interrupt fires when INTERRUPT_CONTROL_ENDPOINT is defined.
Diffstat (limited to 'LUFA')
-rw-r--r-- | LUFA/Drivers/USB/LowLevel/USBInterrupt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c index 7edd3ce6a..43df5f61a 100644 --- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c @@ -233,15 +233,15 @@ ISR(USB_GEN_vect, ISR_BLOCK) #if defined(INTERRUPT_CONTROL_ENDPOINT) && defined(USB_CAN_BE_DEVICE) ISR(USB_COM_vect, ISR_BLOCK) { - uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint(); + uint8_t PrevSelectedEndpoint = Endpoint_GetCurrentEndpoint(); + Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); USB_INT_Disable(USB_INT_RXSTPI); sei(); + USB_USBTask(); - USB_INT_Enable(USB_INT_RXSTPI); - USB_INT_Clear(USB_INT_RXSTPI); - + USB_INT_Enable(USB_INT_RXSTPI); Endpoint_SelectEndpoint(PrevSelectedEndpoint); } #endif |