Make uart error message go away (#5329)

* Make error message in log go away.

* Test for IDF version.
This commit is contained in:
Clyde Stubbs 2023-09-02 08:10:08 +10:00 committed by GitHub
parent 211b3eddea
commit 2bb5f53b98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@
#ifdef USE_ESP_IDF
#include <driver/uart.h>
#include "freertos/FreeRTOS.h"
#include "esp_idf_version.h"
#endif // USE_ESP_IDF
#if defined(USE_ESP32_FRAMEWORK_ARDUINO) || defined(USE_ESP_IDF)
@ -239,6 +240,9 @@ void Logger::pre_setup() {
uart_config.parity = UART_PARITY_DISABLE;
uart_config.stop_bits = UART_STOP_BITS_1;
uart_config.flow_ctrl = UART_HW_FLOWCTRL_DISABLE;
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
uart_config.source_clk = UART_SCLK_DEFAULT;
#endif
uart_param_config(uart_num_, &uart_config);
const int uart_buffer_size = tx_buffer_size_;
// Install UART driver using an event queue here