From 1331cce08a6e899b15382dd1c6110565ed1b34c5 Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Thu, 13 May 2010 07:43:18 +0000 Subject: Fixed possible device lockup when INTERRUPT_CONTROL_ENDPOINT is enabled and the control endpoint is not properly selected when the ISR completes. --- LUFA/Drivers/USB/LowLevel/USBInterrupt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'LUFA/Drivers/USB/LowLevel/USBInterrupt.c') diff --git a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c index 43df5f61a..1c6d6caa7 100644 --- a/LUFA/Drivers/USB/LowLevel/USBInterrupt.c +++ b/LUFA/Drivers/USB/LowLevel/USBInterrupt.c @@ -237,10 +237,13 @@ ISR(USB_COM_vect, ISR_BLOCK) Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); USB_INT_Disable(USB_INT_RXSTPI); - sei(); - USB_USBTask(); + NONATOMIC_BLOCK(NONATOMIC_FORCEOFF) + { + USB_Device_ProcessControlRequest(); + } + Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP); USB_INT_Enable(USB_INT_RXSTPI); Endpoint_SelectEndpoint(PrevSelectedEndpoint); } -- cgit v1.2.3