Prepare some components for idf >= 5 (#5061)

This commit is contained in:
Jimmy Hedman
2023-07-27 00:18:02 -05:00
committed by GitHub
parent 959d1944fd
commit 3eff7e76aa
10 changed files with 32 additions and 21 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/application.h"
#include "esphome/core/defines.h"
#include <cinttypes>
namespace esphome {
namespace uart {
@@ -12,8 +13,8 @@ static const char *const TAG = "uart";
void UARTDevice::check_uart_settings(uint32_t baud_rate, uint8_t stop_bits, UARTParityOptions parity,
uint8_t data_bits) {
if (this->parent_->get_baud_rate() != baud_rate) {
ESP_LOGE(TAG, " Invalid baud_rate: Integration requested baud_rate %u but you have %u!", baud_rate,
this->parent_->get_baud_rate());
ESP_LOGE(TAG, " Invalid baud_rate: Integration requested baud_rate %" PRIu32 " but you have %" PRIu32 "!",
baud_rate, this->parent_->get_baud_rate());
}
if (this->parent_->get_stop_bits() != stop_bits) {
ESP_LOGE(TAG, " Invalid stop bits: Integration requested stop_bits %u but you have %u!", stop_bits,