fix(nimble): Fix for clang compilation issues

This commit is contained in:
Rahul Tank
2026-08-31 20:27:23 +08:00
committed by BOT
parent f3495027b0
commit 98ee8310b5
20 changed files with 97 additions and 217 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.