diff options
| author | hathach <[email protected]> | 2023-03-21 18:12:55 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-03-21 18:12:55 +0700 |
| commit | 878f2b54fe208f717677cabda57180ef8a4bc3cd (patch) | |
| tree | 79b5629dbbb54337ffad76cfda569ededdad80d4 /src/class | |
| parent | 096b6ec462efe612613498b44ec596e4bac763a7 (diff) | |
relax hid host enumeration, allow set protocol to be stalled
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/hid/hid_host.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index e5fc86267..df220d7c3 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -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) { - // Stall is a valid response for SET_IDLE, therefore we could ignore its result - if ( xfer->setup->bRequest != HID_REQ_CONTROL_SET_IDLE ) + // Stall is a valid response for SET_IDLE, sometime SET_PROTOCOL as well + // 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, ); } |
