From 0061ea218213c6848d50649bcbba57c9eab543bf Mon Sep 17 00:00:00 2001 From: Kevincoooool <33611679+Kevincoooool@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:43:50 +0800 Subject: [PATCH] Update usb_config.h --- additions/usb_config.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/additions/usb_config.h b/additions/usb_config.h index 7b6ab5e..80196f5 100644 --- a/additions/usb_config.h +++ b/additions/usb_config.h @@ -233,11 +233,25 @@ #define CONFIG_USB_DWC2_DMA_ENABLE -#elif CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32P4 +#elif CONFIG_IDF_TARGET_ESP32C5 #define CONFIG_USB_HS #define ESP_USBD_BASE 0x60080000 // todo: check c5, p4 in later #define CONFIG_USBDEV_EP_NUM 7 +#elif CONFIG_IDF_TARGET_ESP32P4 +#define CONFIG_USB_HS +#define ESP_USBD_BASE 0x50000000 +// p4 tested +#define CONFIG_USBDEV_EP_NUM 8 +#define CONFIG_USB_DWC2_RXALL_FIFO_SIZE (896 - 512 * 8) +#define CONFIG_USB_DWC2_TX0_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX1_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX2_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX3_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX4_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX5_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX6_FIFO_SIZE (512) +#define CONFIG_USB_DWC2_TX7_FIFO_SIZE (512) #else #error "Unsupported SoC" #endif