mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
fix usbcv TD 9.4 Interface Descriptor test
This commit is contained in:
parent
8d97f0e81f
commit
07adc26ce3
@ -751,16 +751,24 @@ static bool process_control_request(uint8_t rhport, tusb_control_request_t const
|
|||||||
// driver doesn't use alternate settings or implement this
|
// driver doesn't use alternate settings or implement this
|
||||||
TU_VERIFY(TUSB_REQ_TYPE_STANDARD == p_request->bmRequestType_bit.type);
|
TU_VERIFY(TUSB_REQ_TYPE_STANDARD == p_request->bmRequestType_bit.type);
|
||||||
|
|
||||||
if (TUSB_REQ_GET_INTERFACE == p_request->bRequest)
|
switch(p_request->bRequest)
|
||||||
{
|
{
|
||||||
uint8_t alternate = 0;
|
case TUSB_REQ_GET_INTERFACE:
|
||||||
tud_control_xfer(rhport, p_request, &alternate, 1);
|
case TUSB_REQ_SET_INTERFACE:
|
||||||
}else if (TUSB_REQ_SET_INTERFACE == p_request->bRequest)
|
// Clear complete callback if driver set since it can also stall the request.
|
||||||
{
|
usbd_control_set_complete_callback(NULL);
|
||||||
tud_control_status(rhport, p_request);
|
|
||||||
} else
|
if (TUSB_REQ_GET_INTERFACE == p_request->bRequest)
|
||||||
{
|
{
|
||||||
return false;
|
uint8_t alternate = 0;
|
||||||
|
tud_control_xfer(rhport, p_request, &alternate, 1);
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
tud_control_status(rhport, p_request);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user