diff --git a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp index 3dd33b95e..057b66479 100644 --- a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp +++ b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp @@ -99,7 +99,11 @@ TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fal m_valid = true; } +#if ESP_IDF_VERSION_MAJOR >= 5 +void TasmotaSerial::end() { +#else void TasmotaSerial::end(bool turnOffDebug) { +#endif // ESP_IDF_VERSION_MAJOR >= 5 #ifdef ESP8266 if (m_hardserial) { // Serial.end(); // Keep active for logging @@ -117,7 +121,11 @@ void TasmotaSerial::end(bool turnOffDebug) { #ifdef ESP32 // Serial.printf("TSR: Freeing UART%d\n", m_uart); +#if ESP_IDF_VERSION_MAJOR >= 5 + TSerial->end(); +#else TSerial->end(turnOffDebug); +#endif // ESP_IDF_VERSION_MAJOR >= 5 bitClear(tasmota_serial_uart_bitmap, m_uart); #endif // ESP32 } diff --git a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h index 66caa4102..f236184e4 100644 --- a/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h +++ b/lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h @@ -45,7 +45,11 @@ class TasmotaSerial : public Stream { size_t getRxBufferSize() { return serial_buffer_size; } bool begin(uint32_t speed = TM_SERIAL_BAUDRATE, uint32_t config = SERIAL_8N1); + #if ESP_IDF_VERSION_MAJOR >= 5 + void end(); + #else void end(bool turnOffDebug = true); + #endif // ESP_IDF_VERSION_MAJOR >= 5 bool hardwareSerial(void); int peek(void); diff --git a/platformio_tasmota32.ini b/platformio_tasmota32.ini index fefc60ed4..0cb63d36e 100644 --- a/platformio_tasmota32.ini +++ b/platformio_tasmota32.ini @@ -100,7 +100,7 @@ build_unflags = ${esp32_defaults.build_unflags} build_flags = ${esp32_defaults.build_flags} [core32_30] -platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.11/platform-espressif32.zip +platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.01.12/platform-espressif32.zip platform_packages = build_unflags = ${core32.build_unflags} build_flags = ${core32.build_flags}