mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
Make uart error message go away (#5329)
* Make error message in log go away. * Test for IDF version.
This commit is contained in:
parent
211b3eddea
commit
2bb5f53b98
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue