mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-22 15:40:06 +00:00
relax hid host enumeration, allow set protocol to be stalled
This commit is contained in:
parent
096b6ec462
commit
878f2b54fe
@ -465,8 +465,10 @@ bool hidh_set_config(uint8_t dev_addr, uint8_t itf_num)
|
|||||||
|
|
||||||
static void process_set_config(tuh_xfer_t* xfer)
|
static void process_set_config(tuh_xfer_t* xfer)
|
||||||
{
|
{
|
||||||
// Stall is a valid response for SET_IDLE, therefore we could ignore its result
|
// Stall is a valid response for SET_IDLE, sometime SET_PROTOCOL as well
|
||||||
if ( xfer->setup->bRequest != HID_REQ_CONTROL_SET_IDLE )
|
// therefore we could ignore its result
|
||||||
|
if ( !(xfer->setup->bRequest == HID_REQ_CONTROL_SET_IDLE ||
|
||||||
|
xfer->setup->bRequest == HID_REQ_CONTROL_SET_PROTOCOL) )
|
||||||
{
|
{
|
||||||
TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, );
|
TU_ASSERT(xfer->result == XFER_RESULT_SUCCESS, );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user