summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorLimor "Ladyada" Fried <[email protected]>2024-04-25 17:24:51 -0400
committerGitHub <[email protected]>2024-04-25 17:24:51 -0400
commita0cba9b0454b72905075d4adb131e77a16b63bcf (patch)
treec262c4a1cde6d10135d89ba40eacc16af42a0d1b /src/common
parentfc91e15488523548b6eafa63a3cb6190c1ba72d8 (diff)
parent022de87550fdc63dd6dea91f39feecfce59eabe5 (diff)
Merge pull request #2611 from hathach/add-esp32-max3421e
Add esp32 max3421e
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h7
-rw-r--r--src/common/tusb_verify.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 0ae2573cd..5a567f2d5 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -329,6 +329,9 @@
#define TUP_USBIP_DWC2
#define TUP_DCD_ENDPOINT_MAX 6
+#elif TU_CHECK_MCU(OPT_MCU_ESP32) && (CFG_TUD_ENABLED || !(defined(CFG_TUH_MAX3421) && CFG_TUH_MAX3421))
+ #error "MCUs are only supported with CFG_TUH_MAX3421 enabled"
+
//--------------------------------------------------------------------+
// Dialog
//--------------------------------------------------------------------+
@@ -426,8 +429,8 @@
#define TUP_MCU_MULTIPLE_CORE 0
#endif
-#ifndef TUP_DCD_ENDPOINT_MAX
- #warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8"
+#if !defined(TUP_DCD_ENDPOINT_MAX) && defined(CFG_TUD_ENABLED) && CFG_TUD_ENABLED
+#warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8"
#define TUP_DCD_ENDPOINT_MAX 8
#endif
diff --git a/src/common/tusb_verify.h b/src/common/tusb_verify.h
index 71406dacf..0a9549c99 100644
--- a/src/common/tusb_verify.h
+++ b/src/common/tusb_verify.h
@@ -84,7 +84,7 @@
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */ \
} while(0)
-#elif defined(__riscv)
+#elif defined(__riscv) && !TUP_MCU_ESPRESSIF
#define TU_BREAKPOINT() do { __asm("ebreak\n"); } while(0)
#elif defined(_mips)