19 ESP_LOGE(TAG,
" Invalid baud_rate: Integration requested baud_rate %" PRIu32
" but you have %" PRIu32
"!",
23 ESP_LOGE(TAG,
" Invalid stop bits: Integration requested stop_bits %u but you have %u!",
stop_bits,
27 ESP_LOGE(TAG,
" Invalid number of data bits: Integration requested %u data bits but you have %u!",
data_bits,
31 ESP_LOGE(TAG,
" Invalid parity: Integration requested parity %s but you have %s!",
44 return UARTParityStrings::get_log_str(
static_cast<uint8_t
>(parity), UARTParityStrings::LAST_INDEX);
UARTParityOptions get_parity() const
bool read_byte(uint8_t *data)
uint8_t get_data_bits() const
uint8_t get_stop_bits() const
virtual size_t available()=0
uint32_t get_baud_rate() const
void discard_available()
Read and drop every byte waiting in the receive buffer.
uint8_t UARTParityOptions parity
uint8_t UARTParityOptions uint8_t data_bits
ESPHOME_LOG_TAG(TAG, "uart.binary_sensor")
const LogString * parity_to_str(UARTParityOptions parity)
PROGMEM_STRING_TABLE(UARTParityStrings, "NONE", "EVEN", "ODD", "MARK", "SPACE", "UNKNOWN")