From 61113e6918cb50a94a35574b1acf9a15a5ea01ed Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 10 Oct 2022 14:21:25 +0200 Subject: [PATCH] Fix serial on ESP32C3/S2/S3 using USB console --- tasmota/tasmota_support/support.ino | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tasmota/tasmota_support/support.ino b/tasmota/tasmota_support/support.ino index 204cbe5aa..3d940b493 100755 --- a/tasmota/tasmota_support/support.ino +++ b/tasmota/tasmota_support/support.ino @@ -1994,11 +1994,19 @@ void SetSerial(uint32_t baudrate, uint32_t serial_config) { } void ClaimSerial(void) { +#ifdef ESP32 +#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 +#ifdef USE_USB_CDC_CONSOLE + return; // USB console does not use serial +#endif // USE_USB_CDC_CONSOLE +#endif // ESP32C3, S2 or S3 +#endif // ESP32 TasmotaGlobal.serial_local = true; AddLog(LOG_LEVEL_INFO, PSTR("SNS: Hardware Serial")); SetSeriallog(LOG_LEVEL_NONE); TasmotaGlobal.baudrate = GetSerialBaudrate(); Settings->baudrate = TasmotaGlobal.baudrate / 300; + } void SerialSendRaw(char *codes)