This commit is contained in:
Martin Bauer
2024-04-14 18:04:52 +02:00
parent a9ad6e9245
commit 269c6054eb
17 changed files with 763 additions and 15 deletions

View File

@@ -0,0 +1,18 @@
// Copied from https://github.com/ESPresense/ESPresense/blob/master/lib/BleFingerprint/string_utils.h
#pragma once
#include <string>
#define Sprintf(f, ...) ({ char* s; asprintf(&s, f, __VA_ARGS__); std::string r = s; free(s); r; })
namespace esphome
{
namespace nimble_tracker
{
std::string hexStr(const uint8_t *data, int len);
uint8_t hextob(char ch);
bool hextostr(const std::string &hexStr, uint8_t *output, size_t len);
} // namespace nimble_tracker
} // namespace esphome