mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
btstack_util: provide printf_hexdump if ENABLE_PRINTF_HEXDUMP is defined in btstack_config.h
This commit is contained in:
parent
da3afb49ed
commit
46059ae4c6
@ -49,7 +49,10 @@
|
||||
#include "btstack_debug.h"
|
||||
#include "btstack_util.h"
|
||||
|
||||
#ifdef ENABLE_PRINTF_HEXDUMP
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user