Skip to content

Commit ce75e43

Browse files
committed
Move debugPrint definition from library H to CPP, Fixes #3
1 parent 1651eb5 commit ce75e43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/TheThingsNetwork.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
#include <Arduino.h>
55
#include <TheThingsNetwork.h>
66

7+
#define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); }
8+
#define debugPrint(...) { if (debugStream) debugStream->print(__VA_ARGS__); }
9+
710
void TheThingsNetwork::init(Stream& modemStream, Stream& debugStream) {
811
this->modemStream = &modemStream;
912
this->debugStream = &debugStream;

src/TheThingsNetwork.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
#define PWRIDX_868 1
2121
#define PWRIDX_915 1
2222

23-
#define debugPrintLn(...) { if (debugStream) debugStream->println(__VA_ARGS__); }
24-
#define debugPrint(...) { if (debugStream) debugStream->print(__VA_ARGS__); }
25-
2623
#define HEX_CHAR_TO_NIBBLE(c) ((c >= 'A') ? (c - 'A' + 0x0A) : (c - '0'))
2724
#define HEX_PAIR_TO_BYTE(h, l) ((HEX_CHAR_TO_NIBBLE(h) << 4) + HEX_CHAR_TO_NIBBLE(l))
2825

0 commit comments

Comments
 (0)