summaryrefslogtreecommitdiff
path: root/ports/esp32/uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/uart.h')
-rw-r--r--ports/esp32/uart.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/esp32/uart.h b/ports/esp32/uart.h
index f32d5cf34..e3c7482e7 100644
--- a/ports/esp32/uart.h
+++ b/ports/esp32/uart.h
@@ -28,6 +28,11 @@
#ifndef MICROPY_INCLUDED_ESP32_UART_H
#define MICROPY_INCLUDED_ESP32_UART_H
+// Whether to enable the REPL on a UART.
+#ifndef MICROPY_HW_ENABLE_UART_REPL
+#define MICROPY_HW_ENABLE_UART_REPL (!CONFIG_USB_ENABLED && !CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG)
+#endif
+
#ifndef MICROPY_HW_UART_REPL
#define MICROPY_HW_UART_REPL (UART_NUM_0)
#endif