diff options
| author | hathach <[email protected]> | 2022-03-18 22:22:21 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-03-18 22:22:21 +0700 |
| commit | ba1185bf28331da718cca38e6598361889fce54d (patch) | |
| tree | 67bd6ac0e6461b1373cdf0b9da91cb1b0dae5231 /src/class | |
| parent | 9ae0304b1ecd8d10f96a39c5c88a43d6b7c43681 (diff) | |
implement tuh_edpt_xfer() for non-control
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/hid/hid_host.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index fa99b37fe..2bdd1db79 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -256,7 +256,13 @@ bool tuh_hid_receive_report(uint8_t dev_addr, uint8_t instance) // claim endpoint TU_VERIFY( usbh_edpt_claim(dev_addr, hid_itf->ep_in) ); - return usbh_edpt_xfer(dev_addr, hid_itf->ep_in, hid_itf->epin_buf, hid_itf->epin_size); + if ( !usbh_edpt_xfer(dev_addr, hid_itf->ep_in, hid_itf->epin_buf, hid_itf->epin_size) ) + { + usbh_edpt_claim(dev_addr, hid_itf->ep_in); + return false; + } + + return true; } //bool tuh_n_hid_n_ready(uint8_t dev_addr, uint8_t instance) |
