Skip to content

Commit

Permalink
Move debugPrint definition from library H to CPP, Fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
FokkeZB committed Aug 19, 2016
1 parent 1651eb5 commit ce75e43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/TheThingsNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#include <Arduino.h>
#include <TheThingsNetwork.h>

#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;
Expand Down
3 changes: 0 additions & 3 deletions src/TheThingsNetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit ce75e43

Please sign in to comment.