get hcd work esp32p4 but only in slave mode. In DMA channel's HCDMA is increased but data transfer over USB is not correct.

This commit is contained in:
hathach
2024-11-08 17:23:43 +07:00
parent ab8160a29b
commit 5d00488907
6 changed files with 34 additions and 6 deletions

View File

@@ -241,6 +241,8 @@
#include "tusb_config.h"
#endif
#include "common/tusb_mcu.h"
//--------------------------------------------------------------------+
// USBIP
//--------------------------------------------------------------------+
@@ -256,12 +258,18 @@
// Enable DWC2 Slave mode for host
#ifndef CFG_TUH_DWC2_SLAVE_ENABLE
#define CFG_TUH_DWC2_SLAVE_ENABLE 1
#ifndef CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT
#define CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT 1
#endif
#define CFG_TUH_DWC2_SLAVE_ENABLE CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT
#endif
// Enable DWC2 DMA for host
#ifndef CFG_TUH_DWC2_DMA_ENABLE
#define CFG_TUH_DWC2_DMA_ENABLE 1
#ifndef CFG_TUH_DWC2_DMA_ENABLE_DEFAULT
#define CFG_TUH_DWC2_DMA_ENABLE_DEFAULT 1
#endif
#define CFG_TUH_DWC2_DMA_ENABLE CFG_TUH_DWC2_DMA_ENABLE_DEFAULT
#endif
// Enable PIO-USB software host controller
@@ -278,7 +286,6 @@
#define CFG_TUH_MAX3421 0
#endif
#include "common/tusb_mcu.h"
//--------------------------------------------------------------------
// RootHub Mode detection