From 46059ae4c634c46cf3837237e4147ada9d4bd335 Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Fri, 6 Nov 2020 13:44:10 +0100 Subject: [PATCH] btstack_util: provide printf_hexdump if ENABLE_PRINTF_HEXDUMP is defined in btstack_config.h --- src/btstack_util.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/btstack_util.c b/src/btstack_util.c index 746230896..eb4ecfc72 100644 --- a/src/btstack_util.c +++ b/src/btstack_util.c @@ -49,7 +49,10 @@ #include "btstack_debug.h" #include "btstack_util.h" +#ifdef ENABLE_PRINTF_HEXDUMP #include +#endif + #include /** @@ -202,6 +205,7 @@ int nibble_for_char(char c){ return -1; } +#ifdef ENABLE_PRINTF_HEXDUMP void printf_hexdump(const void *data, int size){ char buffer[4]; buffer[2] = ' '; @@ -216,6 +220,7 @@ void printf_hexdump(const void *data, int size){ } printf("\n"); } +#endif #if defined(ENABLE_LOG_INFO) || defined(ENABLE_LOG_DEBUG) static void log_hexdump(int level, const void * data, int size){