summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-10-31 21:28:46 +0700
committerhathach <[email protected]>2019-10-31 21:28:46 +0700
commitf58726887a58fe60d7384136f78b5b147fb08fbd (patch)
tree8047f9beb5979e2e6229cafbb310e49ded085950 /src/class
parentcacbb80a9031662074c12652cbec32b491d78507 (diff)
update doc, hid set report
Diffstat (limited to 'src/class')
-rw-r--r--src/class/hid/hid_device.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 9e7bad976..558adc2bb 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -241,8 +241,7 @@ bool hidd_control_request(uint8_t rhport, tusb_control_request_t const * p_reque
break;
case HID_REQ_CONTROL_SET_REPORT:
- TU_VERIFY(p_request->wLength <=sizeof(p_hid->epout_buf));
- tud_control_xfer(rhport, p_request, p_hid->epout_buf, p_request->wLength);
+ tud_control_xfer(rhport, p_request, p_hid->epout_buf, tu_min16(sizeof(p_hid->epout_buf), p_request->wLength));
break;
case HID_REQ_CONTROL_SET_IDLE: