mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-12 03:44:19 +00:00
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
@ -237,10 +237,13 @@ ISR(USB_COM_vect, ISR_BLOCK)
|
|||||||
|
|
||||||
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
|
Endpoint_SelectEndpoint(ENDPOINT_CONTROLEP);
|
||||||
USB_INT_Disable(USB_INT_RXSTPI);
|
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);
|
USB_INT_Enable(USB_INT_RXSTPI);
|
||||||
Endpoint_SelectEndpoint(PrevSelectedEndpoint);
|
Endpoint_SelectEndpoint(PrevSelectedEndpoint);
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
/* Includes: */
|
/* Includes: */
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
|
#include <util/atomic.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include "../../../Common/Common.h"
|
#include "../../../Common/Common.h"
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
* LIBUSB_DRIVER_COMPAT, as it applies to all software on all platforms using the libUSB driver
|
* LIBUSB_DRIVER_COMPAT, as it applies to all software on all platforms using the libUSB driver
|
||||||
*
|
*
|
||||||
* <b>Fixed:</b>
|
* <b>Fixed:</b>
|
||||||
|
* - Fixed possible device lockup when INTERRUPT_CONTROL_ENDPOINT is enabled and the control endpoint is not properly
|
||||||
|
* selected when the ISR completes
|
||||||
*
|
*
|
||||||
* \section Sec_ChangeLog100512 Version 100512
|
* \section Sec_ChangeLog100512 Version 100512
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user