diff --git a/src/TheThingsNetwork.cpp b/src/TheThingsNetwork.cpp index 5f36beb3..e90c0237 100644 --- a/src/TheThingsNetwork.cpp +++ b/src/TheThingsNetwork.cpp @@ -4,6 +4,9 @@ #include #include +#define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); } +#define debugPrint(...) { if (debugStream) debugStream->print(__VA_ARGS__); } + void TheThingsNetwork::init(Stream& modemStream, Stream& debugStream) { this->modemStream = &modemStream; this->debugStream = &debugStream; diff --git a/src/TheThingsNetwork.h b/src/TheThingsNetwork.h index 5fa7b3b0..b07f781a 100644 --- a/src/TheThingsNetwork.h +++ b/src/TheThingsNetwork.h @@ -20,9 +20,6 @@ #define PWRIDX_868 1 #define PWRIDX_915 1 -#define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); } -#define debugPrint(...) { if (debugStream) debugStream->print(__VA_ARGS__); } - #define HEX_CHAR_TO_NIBBLE(c) ((c >= 'A') ? (c - 'A' + 0x0A) : (c - '0')) #define HEX_PAIR_TO_BYTE(h, l) ((HEX_CHAR_TO_NIBBLE(h) << 4) + HEX_CHAR_TO_NIBBLE(l))