summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2023-09-02 23:27:38 +0800
committersakumisu <[email protected]>2023-09-04 15:43:32 +0800
commitbc1e7c4bd5d55f8963d1781ad861323c451b9ed6 (patch)
treee1b5590a5f82c755333353149a8df38d7d6a6366
parent7d76b4bae1493cb34659f6a301b3fa67e07122b8 (diff)
ignore dwc2 EPENA check
-rw-r--r--port/dwc2/usb_dc_dwc2.c4
1 files changed, 4 insertions, 0 deletions
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;
}