USBH: HID: corrected interrupt IN request length
This commit is contained in:
parent
2e2e10417e
commit
0f269d99fd
|
@ -222,8 +222,11 @@ void usbhhidStart(USBHHIDDriver *hidp, const USBHHIDConfig *cfg) {
|
||||||
hidp->config = cfg;
|
hidp->config = cfg;
|
||||||
|
|
||||||
/* init the URBs */
|
/* init the URBs */
|
||||||
|
uint32_t report_len = hidp->epin.wMaxPacketSize;
|
||||||
|
if (report_len > cfg->report_len)
|
||||||
|
report_len = cfg->report_len;
|
||||||
usbhURBObjectInit(&hidp->in_urb, &hidp->epin, _in_cb, hidp,
|
usbhURBObjectInit(&hidp->in_urb, &hidp->epin, _in_cb, hidp,
|
||||||
cfg->report_buffer, cfg->report_len);
|
cfg->report_buffer, report_len);
|
||||||
|
|
||||||
/* open the int IN/OUT endpoints */
|
/* open the int IN/OUT endpoints */
|
||||||
usbhEPOpen(&hidp->epin);
|
usbhEPOpen(&hidp->epin);
|
||||||
|
|
Loading…
Reference in New Issue