diff options
| author | sakumisu <[email protected]> | 2024-06-16 22:19:39 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-06-16 22:24:08 +0800 |
| commit | 82f11fa6472b680f5ca44286aacce7f04acec49b (patch) | |
| tree | 1ee5ab0eae25c9d1ff0fc04633d28def85275d26 | |
| parent | 47e6ed1c754fb576d917dcb26074d3b55a7ad44a (diff) | |
fix(demo): fix missing usbh_int_urb_fill, musb will modify urb->transfer_buffer_length, this is a patch for musb
| -rw-r--r-- | demo/usb_host.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demo/usb_host.c b/demo/usb_host.c index 53ef2f63..8c8ac22a 100644 --- a/demo/usb_host.c +++ b/demo/usb_host.c @@ -124,8 +124,10 @@ void usbh_hid_callback(void *arg, int nbytes) USB_LOG_RAW("0x%02x ", hid_buffer[i]); } USB_LOG_RAW("nbytes:%d\r\n", nbytes); + usbh_int_urb_fill(&hid_class->intin_urb, hid_class->hport, hid_class->intin, hid_buffer, hid_class->intin->wMaxPacketSize, 0, usbh_hid_callback, hid_class); usbh_submit_urb(&hid_class->intin_urb); } else if (nbytes == -USB_ERR_NAK) { /* only dwc2 should do this */ + usbh_int_urb_fill(&hid_class->intin_urb, hid_class->hport, hid_class->intin, hid_buffer, hid_class->intin->wMaxPacketSize, 0, usbh_hid_callback, hid_class); usbh_submit_urb(&hid_class->intin_urb); } else { } |
