11static const char *
const TAG =
"uart";
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!",
37 return UARTParityStrings::get_log_str(
static_cast<uint8_t
>(parity), UARTParityStrings::LAST_INDEX);
UARTParityOptions get_parity() const
uint8_t get_data_bits() const
uint8_t get_stop_bits() const
uint32_t get_baud_rate() const
void check_uart_settings(uint32_t baud_rate, uint8_t stop_bits=1, UARTParityOptions parity=UART_CONFIG_PARITY_NONE, uint8_t data_bits=8)
Check that the configuration of the UART bus matches the provided values and otherwise print a warnin...
PROGMEM_STRING_TABLE(UARTParityStrings, "NONE", "EVEN", "ODD", "UNKNOWN")
const LogString * parity_to_str(UARTParityOptions parity)