- add esp32 c3, c6 mcu option
- skip breakpoint for espressif riscv
This commit is contained in:
@@ -126,7 +126,10 @@ static void usb_host_task(void *param) {
|
|||||||
(void) param;
|
(void) param;
|
||||||
|
|
||||||
// init host stack on configured roothub port
|
// init host stack on configured roothub port
|
||||||
tuh_init(BOARD_TUH_RHPORT);
|
if (!tuh_init(BOARD_TUH_RHPORT)) {
|
||||||
|
printf("Failed to init USB Host Stack\r\n");
|
||||||
|
vTaskSuspend(NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (board_init_after_tusb) {
|
if (board_init_after_tusb) {
|
||||||
board_init_after_tusb();
|
board_init_after_tusb();
|
||||||
|
@@ -429,8 +429,8 @@
|
|||||||
#define TUP_MCU_MULTIPLE_CORE 0
|
#define TUP_MCU_MULTIPLE_CORE 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(TUP_DCD_ENDPOINT_MAX)
|
#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"
|
#warning "TUP_DCD_ENDPOINT_MAX is not defined for this MCU, default to 8"
|
||||||
#define TUP_DCD_ENDPOINT_MAX 8
|
#define TUP_DCD_ENDPOINT_MAX 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@
|
|||||||
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */ \
|
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n"); /* Only halt mcu if debugger is attached */ \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#elif defined(__riscv)
|
#elif defined(__riscv) && !TUP_MCU_ESPRESSIF
|
||||||
#define TU_BREAKPOINT() do { __asm("ebreak\n"); } while(0)
|
#define TU_BREAKPOINT() do { __asm("ebreak\n"); } while(0)
|
||||||
|
|
||||||
#elif defined(_mips)
|
#elif defined(_mips)
|
||||||
|
@@ -479,6 +479,8 @@ bool hcd_init(uint8_t rhport) {
|
|||||||
_hcd_data.spi_mutex = osal_mutex_create(&_hcd_data.spi_mutexdef);
|
_hcd_data.spi_mutex = osal_mutex_create(&_hcd_data.spi_mutexdef);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// NOTE: driver does not seem to work without nRST pin signal
|
||||||
|
|
||||||
// full duplex, interrupt negative edge
|
// full duplex, interrupt negative edge
|
||||||
reg_write(rhport, PINCTL_ADDR, _tuh_cfg.pinctl | PINCTL_FDUPSPI, false);
|
reg_write(rhport, PINCTL_ADDR, _tuh_cfg.pinctl | PINCTL_FDUPSPI, false);
|
||||||
|
|
||||||
|
@@ -120,6 +120,8 @@
|
|||||||
#define OPT_MCU_ESP32S2 900 ///< Espressif ESP32-S2
|
#define OPT_MCU_ESP32S2 900 ///< Espressif ESP32-S2
|
||||||
#define OPT_MCU_ESP32S3 901 ///< Espressif ESP32-S3
|
#define OPT_MCU_ESP32S3 901 ///< Espressif ESP32-S3
|
||||||
#define OPT_MCU_ESP32 902 ///< Espressif ESP32 (for host max3421e)
|
#define OPT_MCU_ESP32 902 ///< Espressif ESP32 (for host max3421e)
|
||||||
|
#define OPT_MCU_ESP32C3 903 ///< Espressif ESP32-C3
|
||||||
|
#define OPT_MCU_ESP32C6 904 ///< Espressif ESP32-C6
|
||||||
#define TUP_MCU_ESPRESSIF (CFG_TUSB_MCU >= 900 && CFG_TUSB_MCU < 1000) // check if Espressif MCU
|
#define TUP_MCU_ESPRESSIF (CFG_TUSB_MCU >= 900 && CFG_TUSB_MCU < 1000) // check if Espressif MCU
|
||||||
|
|
||||||
// Dialog
|
// Dialog
|
||||||
|
Reference in New Issue
Block a user