|
| | UARTDevice ()=default |
| |
| | UARTDevice (UARTComponent *parent) |
| |
| void | set_uart_parent (UARTComponent *parent) |
| |
| void | write_byte (uint8_t data) |
| |
| void | set_rx_full_threshold (size_t rx_full_threshold) |
| |
| void | set_rx_full_threshold_ms (size_t time) |
| |
| size_t | get_rx_full_threshold () |
| |
| void | set_rx_timeout (size_t rx_timeout) |
| |
| size_t | get_rx_timeout () |
| |
| void | write_array (const uint8_t *data, size_t len) |
| |
| void | write_array_progmem (const uint8_t *data, size_t len) |
| |
| void | write_array (const std::vector< uint8_t > &data) |
| |
| template<size_t N> |
| void | write_array (const std::array< uint8_t, N > &data) |
| |
| void | write_str (const char *str) |
| |
| bool | read_byte (uint8_t *data) |
| |
| bool | peek_byte (uint8_t *data) |
| |
| bool | read_array (uint8_t *data, size_t len) |
| |
| template<size_t N> |
| optional< std::array< uint8_t, N > > | read_array () |
| |
| size_t | available () |
| |
| template<size_t N = 64, typename F > |
| bool | read_available_chunks (F &&on_chunk) |
| | Pass the bytes available now to on_chunk(data, len) in N byte chunks; returning false stops.
|
| |
| template<size_t N = 64, typename F > |
| bool | read_available_chunks (F &&on_chunk, size_t count) |
| | Same, reading exactly count bytes; count must not exceed available().
|
| |
| template<size_t N = 64, typename F > |
| bool | read_available (F &&on_byte) |
| | Same as read_available_chunks(), calling on_byte(uint8_t) once per byte.
|
| |
| template<size_t N = 64, typename F > |
| bool | read_available (F &&on_byte, size_t count) |
| |
| void | discard_available () |
| | Read and drop every byte waiting in the receive buffer.
|
| |
| UARTFlushResult | flush () |
| |
| int | read () |
| |
| size_t | write (uint8_t data) |
| |
| int | peek () |
| |
| | ESPDEPRECATED ("Use uart.final_validate_device_schema() in Python instead. Removed in 2027.3.0", "2026.9.0") void check_uart_settings(uint32_t baud_rate |
| | Check that the configuration of the UART bus matches the provided values and otherwise print a warning.
|
| |
Definition at line 15 of file uart.h.
template<size_t N = 64, typename F >
| bool esphome::uart::UARTDevice::read_available_chunks |
( |
F && | on_chunk | ) |
|
|
inline |
Pass the bytes available now to on_chunk(data, len) in N byte chunks; returning false stops.
Returns false only on a read error.
Definition at line 56 of file uart.h.