Skip to content

Commit 1744fba

Browse files
authored
fix(uart): log will only use ets_printf() for uart and cdc
1 parent 858678a commit 1744fba

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

cores/esp32/esp32-hal-uart.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,17 +1120,9 @@ int log_printfv(const char *format, va_list arg) {
11201120
}
11211121
#endif
11221122
*/
1123-
#if ARDUINO_LOG_FORCE_ETS_PRINTF == 1 || (ARDUINO_USB_CDC_ON_BOOT == 1 && ARDUINO_USB_MODE == 0) || CONFIG_IDF_TARGET_ESP32C3 \
1124-
|| ((CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32P4) && ARDUINO_USB_CDC_ON_BOOT == 1)
11251123
vsnprintf(temp, len + 1, format, arg);
11261124
ets_printf("%s", temp);
1127-
#else
1128-
int wlen = vsnprintf(temp, len + 1, format, arg);
1129-
for (int i = 0; i < wlen; i++) {
1130-
ets_write_char_uart(temp[i]);
1131-
}
1132-
#endif
1133-
/*
1125+
/*
11341126
// This causes dead locks with logging and also with constructors that may send logs
11351127
#if !CONFIG_DISABLE_HAL_LOCKS
11361128
if(s_uart_debug_nr != -1 && _uart_bus_array[s_uart_debug_nr].lock){

0 commit comments

Comments
 (0)