Endpoint 0 is stalled if an invalid descriptor type is specified in a standard USB get descriptor request to the HID interface.
This commit is contained in:
parent
9d229ff28e
commit
e47c4f2c41
|
@ -500,7 +500,15 @@ static uint8_t USBD_CUSTOM_HID_Setup(USBD_HandleTypeDef *pdev,
|
|||
}
|
||||
}
|
||||
|
||||
USBD_CtlSendData(pdev, pbuf, len);
|
||||
if (pbuf)
|
||||
{
|
||||
USBD_CtlSendData(pdev, pbuf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
USBD_CtlError(pdev, req);
|
||||
ret = USBD_FAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case USB_REQ_GET_INTERFACE :
|
||||
|
|
Loading…
Reference in New Issue