From 17521417506e33ad2c0dbe07a19af1625a723613 Mon Sep 17 00:00:00 2001 From: Frank Leon Rose Date: Mon, 11 Dec 2017 09:05:29 -0500 Subject: [PATCH 1/2] Added declaration for LMIC_DEBUG_PRINTF_FN --- src/lmic/lmic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lmic/lmic.h b/src/lmic/lmic.h index 2f092434..3a7b2f6f 100644 --- a/src/lmic/lmic.h +++ b/src/lmic/lmic.h @@ -47,6 +47,7 @@ // and use it if so. # ifdef LMIC_DEBUG_PRINTF_FN # define LMIC_DEBUG_PRINTF(f, ...) LMIC_DEBUG_PRINTF_FN(f, ## __VA_ARGS__) + void LMIC_DEBUG_PRINTF_FN(const char *f, ...); # else // ndef LMIC_DEBUG_PRINTF_FN // if there's no other info, just use printf. In a pure Arduino environment, // that's what will happen. From 6e6648f72c3112524e1e155cde661f8446a7606d Mon Sep 17 00:00:00 2001 From: Frank Leon Rose Date: Fri, 15 Dec 2017 11:07:13 -0500 Subject: [PATCH 2/2] Declare LMIC_DEBUG_PRINTF_FN only if no LMIC_DEBUG_INCLUDE --- src/lmic/lmic.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lmic/lmic.h b/src/lmic/lmic.h index 3a7b2f6f..2145e1f3 100644 --- a/src/lmic/lmic.h +++ b/src/lmic/lmic.h @@ -47,7 +47,9 @@ // and use it if so. # ifdef LMIC_DEBUG_PRINTF_FN # define LMIC_DEBUG_PRINTF(f, ...) LMIC_DEBUG_PRINTF_FN(f, ## __VA_ARGS__) - void LMIC_DEBUG_PRINTF_FN(const char *f, ...); +# ifndef LMIC_DEBUG_INCLUDE // If you use LMIC_DEBUG_INCLUDE, put the declaration in there + void LMIC_DEBUG_PRINTF_FN(const char *f, ...); +# endif // ndef LMIC_DEBUG_INCLUDE # else // ndef LMIC_DEBUG_PRINTF_FN // if there's no other info, just use printf. In a pure Arduino environment, // that's what will happen.