19template<
size_t RX_BUFFER_SIZE>
50 for (
size_t i = 0; i <
len; i++)
index_type free_space() const
bool push(const T &value)
UART without a wire: the derived class writes and feeds reads with inject_rx().
StaticRingBuffer< uint8_t, RX_BUFFER_SIZE > rx_
void debug_tx_(const uint8_t *data, size_t len)
For write_array() of the derived class: hands the written bytes to a configured UART debugger.
bool inject_rx(const uint8_t *data, size_t len)
Adds one whole block to the RX ring; false, and nothing kept, when it does not fit.
A UART configured in YAML: what its reader writes goes to on_tx, and inject_rx hands it bytes to read...
void dump_config() override
void inject(const uint8_t *data, size_t len)
Logs a block that does not fit the RX ring.
void inject_progmem(const uint8_t *data, size_t len)
inject() for a constant payload in flash on ESP8266, read without a heap copy.
void add_on_tx_callback(F &&callback)
uart::UARTFlushResult flush() override
CallbackManager< void(std::span< const uint8_t >)> tx_callback_
void write_array(const uint8_t *data, size_t len) override
const Component * component
UARTFlushResult
Result of a flush() call.
@ UART_FLUSH_RESULT_SUCCESS
Confirmed: all bytes left the TX FIFO.
void log_inject_dropped(size_t len)
void dump_virtual_uart_config(uart::UARTComponent *component)
void log_own_write_dropped()
uint8_t progmem_read_byte(const uint8_t *addr)