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:
parent
d3c623e1e1
commit
1331cce08a
3 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue