Really simple program to preload into Nucleo boards to drive messages on the LCD shield for Ada Lovelace Day in ARM Sheffield
Diff: debug.h
- Revision:
- 0:59256585cc71
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debug.h Wed Oct 05 16:40:24 2016 +0000 @@ -0,0 +1,16 @@ +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + + +#ifdef DEBUG +#define INFO(x, ...) std::printf("[INFO: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); +#define WARN(x, ...) std::printf("[WARN: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); +#define ERR(x, ...) std::printf("[ERR: %s:%d]"x"\r\n", __FILE__, __LINE__, ##__VA_ARGS__); +#else +#define INFO(x, ...) +#define WARN(x, ...) +#define ERR(x, ...) +#endif + + +#endif \ No newline at end of file