Skip to content

Commit e6fde5e

Browse files
committed
fix(port/dwc2): fix dwc2 rx fifo size, remove divided by 4
1 parent 0487af6 commit e6fde5e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cherryusb_config_template.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
* (largest USB packet used / 4) + 1 for status information + 1 transfer complete +
267267
* 1 location each for Bulk/Control endpoint for handling NAK/NYET scenario
268268
*/
269-
// #define CONFIG_USB_DWC2_RX_FIFO_SIZE ((1012 - CONFIG_USB_DWC2_NPTX_FIFO_SIZE - CONFIG_USB_DWC2_PTX_FIFO_SIZE) / 4)
269+
// #define CONFIG_USB_DWC2_RX_FIFO_SIZE ((1012 - CONFIG_USB_DWC2_NPTX_FIFO_SIZE - CONFIG_USB_DWC2_PTX_FIFO_SIZE))
270270

271271
/* ---------------- MUSB Configuration ---------------- */
272272
// #define CONFIG_USB_MUSB_SUNXI

osal/idf/usb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
* (largest USB packet used / 4) + 1 for status information + 1 transfer complete +
250250
* 1 location each for Bulk/Control endpoint for handling NAK/NYET scenario
251251
*/
252-
#define CONFIG_USB_DWC2_RX_FIFO_SIZE ((200 - CONFIG_USB_DWC2_NPTX_FIFO_SIZE - CONFIG_USB_DWC2_PTX_FIFO_SIZE) / 4)
252+
#define CONFIG_USB_DWC2_RX_FIFO_SIZE ((200 - CONFIG_USB_DWC2_NPTX_FIFO_SIZE - CONFIG_USB_DWC2_PTX_FIFO_SIZE))
253253

254254
#elif CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32P4
255255
// todo: check c5, p4 in later

port/dwc2/usb_hc_dwc2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* 1 location each for Bulk/Control endpoint for handling NAK/NYET scenario
2727
*/
2828
#ifndef CONFIG_USB_DWC2_RX_FIFO_SIZE
29-
#define CONFIG_USB_DWC2_RX_FIFO_SIZE ((1012 - CONFIG_USB_DWC2_NPTX_FIFO_SIZE - CONFIG_USB_DWC2_PTX_FIFO_SIZE) / 4)
29+
#define CONFIG_USB_DWC2_RX_FIFO_SIZE ((1012 - CONFIG_USB_DWC2_NPTX_FIFO_SIZE - CONFIG_USB_DWC2_PTX_FIFO_SIZE))
3030
#endif
3131

3232
#define USB_OTG_GLB ((DWC2_GlobalTypeDef *)(bus->hcd.reg_base))

0 commit comments

Comments
 (0)