mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts.
This commit is contained in:
@@ -364,18 +364,18 @@ static void USB_Device_ClearSetFeature(void)
|
||||
|
||||
Endpoint_SelectEndpoint(EndpointIndex);
|
||||
|
||||
if (!(Endpoint_IsEnabled()))
|
||||
return;
|
||||
|
||||
if (USB_ControlRequest.bRequest == REQ_SetFeature)
|
||||
{
|
||||
Endpoint_StallTransaction();
|
||||
}
|
||||
else
|
||||
{
|
||||
Endpoint_ClearStall();
|
||||
Endpoint_ResetFIFO(EndpointIndex);
|
||||
Endpoint_ResetDataToggle();
|
||||
if (Endpoint_IsEnabled())
|
||||
{
|
||||
if (USB_ControlRequest.bRequest == REQ_SetFeature)
|
||||
{
|
||||
Endpoint_StallTransaction();
|
||||
}
|
||||
else
|
||||
{
|
||||
Endpoint_ClearStall();
|
||||
Endpoint_ResetFIFO(EndpointIndex);
|
||||
Endpoint_ResetDataToggle();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user