5#include <driver/uart.h>
8#ifdef USE_UART_WAKE_LOOP_ON_RX
9#include <driver/uart_select.h>
23 void setup()
override;
122#ifdef USE_UART_WAKE_LOOP_ON_RX
124 static void uart_rx_isr_callback(uart_port_t uart_num, uart_select_notif_t uart_select_notif, BaseType_t *task_woken);
ESP-IDF UART driver wrapper.
void set_flush_timeout(uint32_t flush_timeout_ms) override
size_t available_for_write() override
void dump_config() override
uint8_t get_hw_serial_number()
void set_rx_timeout(size_t rx_timeout) override
esp_err_t apply_line_settings_()
void set_framing_(const Framing &framing)
uart_config_t get_config_()
void set_tx_buffer_size(size_t tx_buffer_size)
TX ring buffer size for the driver; 0 leaves TX unbuffered so write_array() blocks until the FIFO has...
void check_logger_conflict() override
void set_pins_hold_(bool hold)
void flush_input()
Discard everything received so far: the peek cache and the driver's RX buffer.
bool peek_byte(uint8_t *data) override
size_t available() override
uint8_t clock_source_
uart_sclk_t stored in a byte; the IDF values are all small.
void load_settings()
Load the UART settings.
uint32_t line_inversion_mask_()
void write_array(const uint8_t *data, size_t len) override
void set_clock_source(uart_sclk_t clock_source)
void set_rx_full_threshold(size_t rx_full_threshold) override
bool read_array(uint8_t *data, size_t len) override
UARTFlushResult flush() override
void on_shutdown() override
uint32_t flush_timeout_ms_
0 means wait indefinitely (portMAX_DELAY).
static void uart_rx_isr_callback(uart_port_t uart_num, uart_select_notif_t uart_select_notif, BaseType_t *task_woken)
esp_err_t apply_settings_live()
Apply the current framing (baud rate, parity, data/stop bits) to the installed driver in place,...
float get_setup_priority() const override
Framing last_good_framing_
UARTParityOptions parity_
void load_settings()
Load the UART settings.
size_t rx_full_threshold_
constexpr float BUS
For communication buses like i2c/spi.
UARTFlushResult
Result of a flush() call.