Library to implement various levels of messages in cpp files
Dependents: IoT_Ex BatteryModelTester BatteryModelTester
Diff: messages.h
- Revision:
- 7:d78684eca79d
- Parent:
- 6:fef815be8d4f
- Child:
- 8:7017082b1f18
diff -r fef815be8d4f -r d78684eca79d messages.h --- a/messages.h Fri Jan 20 10:45:05 2017 +0000 +++ b/messages.h Tue Apr 25 14:57:16 2017 +0000 @@ -55,6 +55,8 @@ * */ +#include "mbed.h" + #ifndef MESSAGES_H #define MESSAGES_H @@ -82,4 +84,11 @@ #define INFO(x, ...) #endif +#ifdef MEMMESSAGES +//#define MEM(serPort, x, ...) serPort->printf("["FUNCNAME" : MEM] "x"\r\n", ##__VA_ARGS__); +#define MEM(serPort) serPort->printf("["FUNCNAME" : MEM] SP: %d, PC: %d\r\n", __current_pc(), __current_sp()); +#else +#define MEM(x, ...) +#endif + #endif /* MESSAGES_H */ \ No newline at end of file