Fixed SET FEATURE and CLEAR FEATURE control requests directed at an unconfigured endpoint causing request timeouts.
This commit is contained in:
parent
def0e0ff1b
commit
58167f5d4d
4 changed files with 17 additions and 16 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue