-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce helper methods that can be called from C code. This helps "…
…debugging" the rtl_433 at runtime
- Loading branch information
1 parent
fb48489
commit c239347
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "99_helper.h" | ||
#include "3_Serial.h" | ||
|
||
extern "C" { | ||
|
||
void SerialPrintLn(const char* msg) | ||
{ | ||
Serial.println(msg); | ||
} | ||
|
||
void SerialPrintMsg(const char* msg) | ||
{ | ||
Serial.print(msg); | ||
} | ||
|
||
void SerialPrint(int value) | ||
{ | ||
Serial.print(value); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* This header is here to allow calling Serial.printXXX methods from C files | ||
* It is most useful when "debugging" the rtl_433 code | ||
*/ | ||
|
||
#ifndef Helper_H | ||
#define Helper_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
void SerialPrintLn(const char* msg); | ||
void SerialPrintMsg(const char* msg); | ||
void SerialPrint(int value); | ||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |