mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
25c61606a1
Nimble: Added BLE SPP Service Closes: https://github.com/espressif/esp-idf/issues/7303 See merge request espressif/esp-idf!16123
31 lines
571 B
C
31 lines
571 B
C
/*
|
|
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include "ble_spp_server.h"
|
|
|
|
/**
|
|
* Utility function to log an array of bytes.
|
|
*/
|
|
void
|
|
print_bytes(const uint8_t *bytes, int len)
|
|
{
|
|
int i;
|
|
|
|
for (i = 0; i < len; i++) {
|
|
MODLOG_DFLT(INFO, "%s0x%02x", i != 0 ? ":" : "", bytes[i]);
|
|
}
|
|
}
|
|
|
|
void
|
|
print_addr(const void *addr)
|
|
{
|
|
const uint8_t *u8p;
|
|
|
|
u8p = addr;
|
|
MODLOG_DFLT(INFO, "%02x:%02x:%02x:%02x:%02x:%02x",
|
|
u8p[5], u8p[4], u8p[3], u8p[2], u8p[1], u8p[0]);
|
|
}
|