1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 20:32:21 +01:00

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

This commit is contained in:
Jimmy Hedman
2023-07-27 07:18:02 +02:00
committed by GitHub
parent 959d1944fd
commit 3eff7e76aa
10 changed files with 32 additions and 21 deletions

View File

@@ -4,6 +4,7 @@
#include <cstring>
#include <cstdio>
#include <cinttypes>
#include "esphome/core/log.h"
namespace esphome {
@@ -166,7 +167,7 @@ std::string ESPBTUUID::to_string() const {
case ESP_UUID_LEN_16:
return str_snprintf("0x%02X%02X", 6, this->uuid_.uuid.uuid16 >> 8, this->uuid_.uuid.uuid16 & 0xff);
case ESP_UUID_LEN_32:
return str_snprintf("0x%02X%02X%02X%02X", 10, this->uuid_.uuid.uuid32 >> 24,
return str_snprintf("0x%02" PRIX32 "%02" PRIX32 "%02" PRIX32 "%02" PRIX32, 10, (this->uuid_.uuid.uuid32 >> 24),
(this->uuid_.uuid.uuid32 >> 16 & 0xff), (this->uuid_.uuid.uuid32 >> 8 & 0xff),
this->uuid_.uuid.uuid32 & 0xff);
default: