diff options
| author | hathach <[email protected]> | 2024-11-27 11:54:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-11-27 11:54:11 +0700 |
| commit | d9ef3cd1b392025f2b850b10fbefca4306a87322 (patch) | |
| tree | 6df75d7b3d7ecaf3cf0b01e3c4d86e7fe2c15df4 /src/common | |
| parent | 9e4b855e5309976ead84d6cc65288e0e03f27ba5 (diff) | |
default CFG_TUH_DWC2_DMA_ENABLE to 0
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_mcu.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h index e74e8b780..d43e5f2ba 100644 --- a/src/common/tusb_mcu.h +++ b/src/common/tusb_mcu.h @@ -354,9 +354,12 @@ #define TUP_USBIP_DWC2 #define TUP_USBIP_DWC2_ESP32 #define TUP_DCD_ENDPOINT_MAX 7 // only 5 TX FIFO for endpoint IN - #define CFG_TUH_DWC2_DMA_ENABLE_DEFAULT 0 // TODO currently have issue with buffer DMA with espressif #define CFG_TUSB_OS_INC_PATH_DEFAULT freertos/ + // Disable slave if DMA is enabled + #define CFG_TUD_DWC2_SLAVE_ENABLE_DEFAULT !CFG_TUD_DWC2_DMA_ENABLE + #define CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT !CFG_TUH_DWC2_DMA_ENABLE + #elif TU_CHECK_MCU(OPT_MCU_ESP32P4) #define TUP_USBIP_DWC2 #define TUP_USBIP_DWC2_ESP32 @@ -365,10 +368,11 @@ #define CFG_TUSB_OS_INC_PATH_DEFAULT freertos/ - // #define CFG_TUH_DWC2_DMA_ENABLE_DEFAULT 1 - // #define CFG_TUD_DWC2_SLAVE_ENABLE_DEFAULT 0 + // Disable slave if DMA is enabled + #define CFG_TUD_DWC2_SLAVE_ENABLE_DEFAULT !CFG_TUD_DWC2_DMA_ENABLE + #define CFG_TUH_DWC2_SLAVE_ENABLE_DEFAULT !CFG_TUH_DWC2_DMA_ENABLE - // Enable host/device dcache if DMA is enabled + // Enable dcache if DMA is enabled #define CFG_TUD_MEM_DCACHE_ENABLE_DEFAULT CFG_TUD_DWC2_DMA_ENABLE #define CFG_TUH_MEM_DCACHE_ENABLE_DEFAULT CFG_TUH_DWC2_DMA_ENABLE #define CFG_TUSB_MEM_DCACHE_LINE_SIZE_DEFAULT 64 |
