From c840b07bfe1896057be4cb3f10157b81e69dc030 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Wed, 9 Jun 2010 17:32:07 +0000 Subject: [PATCH] add utils used by sdp --- include/btstack/utils.h | 1 + src/utils.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/btstack/utils.h b/include/btstack/utils.h index fbf64c29c..960b1c294 100644 --- a/include/btstack/utils.h +++ b/include/btstack/utils.h @@ -91,6 +91,7 @@ void net_store_16(uint8_t *buffer, uint16_t pos, uint16_t value); void net_store_32(uint8_t *buffer, uint16_t pos, uint32_t value); void hexdump(void *data, int size); +void printUUID(uint8_t *uuid); void print_bd_addr(bd_addr_t addr); int sscan_bd_addr(uint8_t * addr_string, bd_addr_t addr); diff --git a/src/utils.c b/src/utils.c index 97d86469f..2b6b34162 100644 --- a/src/utils.c +++ b/src/utils.c @@ -82,6 +82,12 @@ void hexdump(void *data, int size){ printf("\n"); } +void printUUID(uint8_t *uuid) { + printf("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], uuid[6], uuid[7], + uuid[8], uuid[9], uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]); +} + void print_bd_addr( bd_addr_t addr){ int i; for (i=0; i