mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-07 19:01:06 +00:00
btstack_debug: allow to provide custom BTSTACK_PRINTF
This commit is contained in:
parent
a3dc965a0a
commit
cd4b342469
@ -57,13 +57,20 @@
|
|||||||
// Avoid complaints of unused arguments when log levels are disabled.
|
// Avoid complaints of unused arguments when log levels are disabled.
|
||||||
static inline void __log_unused(const char *format, ...) {}
|
static inline void __log_unused(const char *format, ...) {}
|
||||||
|
|
||||||
|
// allow to provide port specific printf
|
||||||
|
#ifndef BTSTACK_PRINTF
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
#define HCI_DUMP_LOG(log_level, format, ...) hci_dump_log_P(log_level, PSTR(format), ## __VA_ARGS__)
|
|
||||||
#define BTSTACK_PRINTF(format, ...) printf_P(PSTR(format), ## __VA_ARGS__)
|
#define BTSTACK_PRINTF(format, ...) printf_P(PSTR(format), ## __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define HCI_DUMP_LOG(log_level, format, ...) hci_dump_log(log_level, format, ## __VA_ARGS__)
|
|
||||||
#define BTSTACK_PRINTF(format, ...) printf(format, ## __VA_ARGS__)
|
#define BTSTACK_PRINTF(format, ...) printf(format, ## __VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __AVR__
|
||||||
|
#define HCI_DUMP_LOG(log_level, format, ...) hci_dump_log_P(log_level, PSTR(format), ## __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define HCI_DUMP_LOG(log_level, format, ...) hci_dump_log(log_level, format, ## __VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_LOG_DEBUG
|
#ifdef ENABLE_LOG_DEBUG
|
||||||
#ifdef ENABLE_LOG_INTO_HCI_DUMP
|
#ifdef ENABLE_LOG_INTO_HCI_DUMP
|
||||||
|
Loading…
Reference in New Issue
Block a user