From bc1e7c4bd5d55f8963d1781ad861323c451b9ed6 Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Sat, 2 Sep 2023 23:27:38 +0800 Subject: [PATCH] ignore dwc2 EPENA check --- port/dwc2/usb_dc_dwc2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/port/dwc2/usb_dc_dwc2.c b/port/dwc2/usb_dc_dwc2.c index 4f259415..508071a7 100644 --- a/port/dwc2/usb_dc_dwc2.c +++ b/port/dwc2/usb_dc_dwc2.c @@ -888,9 +888,11 @@ int usbd_ep_start_write(const uint8_t ep, const uint8_t *data, uint32_t data_len if (!data && data_len) { return -1; } +#if 0 /* some chips have confused with this, so disable as default */ if (USB_OTG_INEP(ep_idx)->DIEPCTL & USB_OTG_DIEPCTL_EPENA) { return -2; } +#endif if (ep_idx && !(USB_OTG_INEP(ep_idx)->DIEPCTL & USB_OTG_DIEPCTL_MPSIZ)) { return -3; } @@ -959,9 +961,11 @@ int usbd_ep_start_read(const uint8_t ep, uint8_t *data, uint32_t data_len) if (!data && data_len) { return -1; } +#if 0 /* some chips have confused with this, so disable as default */ if (USB_OTG_OUTEP(ep_idx)->DOEPCTL & USB_OTG_DOEPCTL_EPENA) { return -2; } +#endif if (ep_idx && !(USB_OTG_OUTEP(ep_idx)->DOEPCTL & USB_OTG_DOEPCTL_MPSIZ)) { return -3; }