1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

use PRIx macros for printing u32/i32 ints (#4671)

This fix compilation issues with the latest esp-idf.
This commit is contained in:
Jörg Thalheim
2023-04-10 23:20:02 +01:00
committed by GitHub
parent b56fa8c50a
commit 421ebcc8b2
9 changed files with 27 additions and 18 deletions

View File

@@ -5,6 +5,7 @@
#include "esphome/core/log.h"
#include "esphome/core/helpers.h"
#include <cstring>
#include <cinttypes>
namespace esphome {
namespace i2c {
@@ -47,7 +48,7 @@ void IDFI2CBus::dump_config() {
ESP_LOGCONFIG(TAG, "I2C Bus:");
ESP_LOGCONFIG(TAG, " SDA Pin: GPIO%u", this->sda_pin_);
ESP_LOGCONFIG(TAG, " SCL Pin: GPIO%u", this->scl_pin_);
ESP_LOGCONFIG(TAG, " Frequency: %u Hz", this->frequency_);
ESP_LOGCONFIG(TAG, " Frequency: %" PRIu32 " Hz", this->frequency_);
switch (this->recovery_result_) {
case RECOVERY_COMPLETED:
ESP_LOGCONFIG(TAG, " Recovery: bus successfully recovered");