fix(nimble): Fix for clang compilation issues

This commit is contained in:
Rahul Tank
2026-06-04 21:51:56 +05:30
parent 424a685692
commit 804755b4f8
21 changed files with 98 additions and 218 deletions
@@ -15,6 +15,7 @@ extern "C" {
#define PEER_ADDR_VAL_SIZE 6
/** Misc. */
int peer_addr_parse(const char *addr_str, uint8_t addr[PEER_ADDR_VAL_SIZE]);
void print_bytes(const uint8_t *bytes, int len);
void print_mbuf(const struct os_mbuf *om);
void print_mbuf_data(const struct os_mbuf *om);
@@ -4,7 +4,21 @@
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <stdio.h>
#include <string.h>
#include "host/ble_hs.h"
#include "esp_central.h"
int
peer_addr_parse(const char *addr_str, uint8_t addr[PEER_ADDR_VAL_SIZE])
{
if (addr_str == NULL) {
return 0;
}
return sscanf(addr_str, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
&addr[5], &addr[4], &addr[3],
&addr[2], &addr[1], &addr[0]);
}
/**
* Utility function to log an array of bytes.