Control Surface
main
MIDI Control Surface library for Arduino
|
Macros for printing debug information that can be easily enabled or disabled.
Macros | |
#define | NAMEDVALUE(x) F(DEBUG_STR(x) " = ") << x |
Macro for printing an expression as a string, followed by its value. | |
#define | DEBUG(x) |
Print an expression to the debug output if debugging is enabled. | |
#define | DEBUGREF(x) |
Print an expression and its location (file and line number) to the debug output if debugging is enabled. | |
#define | DEBUGFN(x) |
Print an expression and its function (function name and line number) to the debug output if debugging is enabled. | |
#define | DEBUGTIME(x) |
Print an expression and the time since startup to the debug output if debugging is enabled. | |
#define | DEBUGVAL(...) DEBUGVALN(COUNT(__VA_ARGS__))(__VA_ARGS__) |
Print multiple expressions and their values to the debug output if debugging is enabled. | |
#define NAMEDVALUE | ( | x | ) | F(DEBUG_STR(x) " = ") << x |
#define DEBUG | ( | x | ) |
Print an expression to the debug output if debugging is enabled.
#define DEBUGREF | ( | x | ) |
Print an expression and its location (file and line number) to the debug output if debugging is enabled.
The location is saved in PROGMEM using the F(...)
macro.
#define DEBUGFN | ( | x | ) |
Print an expression and its function (function name and line number) to the debug output if debugging is enabled.
The function name is saved in RAM.
#define DEBUGTIME | ( | x | ) |
Print an expression and the time since startup to the debug output if debugging is enabled.
Format: [hours:minutes:seconds.milliseconds]
Print multiple expressions and their values to the debug output if debugging is enabled.
For example, DEBUGVAL(1 + 1, digitalRead(2))
could print 1 + 1 = 2, digitalRead(2) = 0
. A maximum of 10 expressions is supported. The expression strings are saved in PROGMEM using the F(...)
macro.