Skip to content

Commit f8c5b98

Browse files
committed
ESP32-C3 does not have ets_write_char_uart
1 parent 3833fa2 commit f8c5b98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,15 @@ int log_printfv(const char *format, va_list arg)
659659
}
660660
#endif
661661

662+
#if CONFIG_IDF_TARGET_ESP32C3
663+
vsnprintf(temp, len+1, format, arg);
664+
ets_printf("%s", temp);
665+
#else
662666
int wlen = vsnprintf(temp, len+1, format, arg);
663-
//ets_printf("%s", temp);
664667
for (int i = 0; i < wlen; i++) {
665668
ets_write_char_uart(temp[i]);
666669
}
670+
#endif
667671

668672
#if !CONFIG_DISABLE_HAL_LOCKS
669673
if(s_uart_debug_nr != -1 && _uart_bus_array[s_uart_debug_nr].lock){

0 commit comments

Comments
 (0)