Fixed possible device lockup when INTERRUPT_CONTROL_ENDPOINT is enabled and the control endpoint is not properly selected when the ISR completes.

This commit is contained in:
Dean Camera 2010-05-13 07:43:18 +00:00
parent d3c623e1e1
commit 1331cce08a
3 changed files with 8 additions and 2 deletions

View file

@ -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);
}