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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user