diff options
| author | sakumisu <[email protected]> | 2024-10-17 09:21:31 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-10-17 09:21:31 +0800 |
| commit | 05315b7ea5919103c5fceab873f9ffc1d3ba3edb (patch) | |
| tree | 31074892f6fc3ecd15eaa4698132d8ead9290bd4 | |
| parent | f1a143404702bc58dcbb87ed5bb0641c914e11b1 (diff) | |
fix(port/dwc2/usb_hc_dwc2): fix check typo
| -rw-r--r-- | port/dwc2/usb_hc_dwc2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c index 76cb78c8..de2e0057 100644 --- a/port/dwc2/usb_hc_dwc2.c +++ b/port/dwc2/usb_hc_dwc2.c @@ -770,8 +770,8 @@ int usbh_submit_urb(struct usbh_urb *urb) } } else { /* Check if intr and iso pipe tx fifo is overflow */ - if (((USB_GET_MAXPACKETSIZE(urb->ep->wMaxPacketSize) == USB_ENDPOINT_TYPE_ISOCHRONOUS) || - (USB_GET_MAXPACKETSIZE(urb->ep->wMaxPacketSize) == USB_ENDPOINT_TYPE_INTERRUPT)) && + if (((USB_GET_ENDPOINT_TYPE(urb->ep->bmAttributes) == USB_ENDPOINT_TYPE_ISOCHRONOUS) || + (USB_GET_ENDPOINT_TYPE(urb->ep->bmAttributes) == USB_ENDPOINT_TYPE_INTERRUPT)) && USB_GET_MAXPACKETSIZE(urb->ep->wMaxPacketSize) > (CONFIG_USB_DWC2_PTX_FIFO_SIZE * 4)) { return -USB_ERR_RANGE; } else { |
