mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(nimble): Fix for clang compilation issues
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user