From 1fe18cf7b63049253f6ebd6358b4f4b9cebde1e4 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 15 Apr 2024 13:00:09 +0200 Subject: [PATCH] Fix Core3 ESP32S2 compile --- tasmota/include/tasconsole.h | 14 +++++++------- tasmota/tasmota.ino | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tasmota/include/tasconsole.h b/tasmota/include/tasconsole.h index f6b1021d1..f3f975752 100644 --- a/tasmota/include/tasconsole.h +++ b/tasmota/include/tasconsole.h @@ -21,7 +21,7 @@ class TASCONSOLE { virtual size_t printf(char *) = 0; virtual size_t read() = 0; virtual size_t setRxBufferSize(size_t) = 0; - virtual size_t setTxBufferSize(size_t) = 0; +// virtual size_t setTxBufferSize(size_t) = 0; }; public: @@ -66,9 +66,9 @@ public: return object->setRxBufferSize(rx_queue_len); } - size_t setTxBufferSize(size_t rx_queue_len) { - return object->setTxBufferSize(rx_queue_len); - } +// size_t setTxBufferSize(size_t rx_queue_len) { +// return object->setTxBufferSize(rx_queue_len); +// } template< typename T > struct Model : Concept { @@ -108,9 +108,9 @@ public: return object.setRxBufferSize(size); } - size_t setTxBufferSize(size_t size) override { - return object.setTxBufferSize(size); - } +// size_t setTxBufferSize(size_t size) override { +// return object.setTxBufferSize(size); +// } private: T object; diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index 7fc589bb5..703565959 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -236,7 +236,9 @@ TASCONSOLE TasConsole{HWCDCSerial}; // ESP32C3/C6/S3 embedded USB using #else // No ARDUINO_USB_MODE #include "USB.h" #include "USBCDC.h" -//USBCDC USBSerial; // Already defined in USBCDC.cpp +#if !ARDUINO_USB_CDC_ON_BOOT +USBCDC USBSerial; // Already defined in USBCDC.cpp +#endif // ARDUINO_USB_CDC_ON_BOOT TASCONSOLE TasConsole{USBSerial}; // ESP32Sx embedded USB interface //#warning **** TasConsole uses USBCDC **** #endif // ARDUINO_USB_MODE