Library to implement various levels of messages in cpp files
Dependents: IoT_Ex BatteryModelTester BatteryModelTester
Diff: messages.h
- Revision:
- 4:695f0085a392
- Parent:
- 3:7968911e2787
- Child:
- 5:34f9e8994d54
diff -r 7968911e2787 -r 695f0085a392 messages.h --- a/messages.h Thu Nov 24 16:44:19 2016 +0000 +++ b/messages.h Tue Jan 17 16:20:07 2017 +0000 @@ -59,25 +59,25 @@ #define MESSAGES_H #ifdef DEBUG -#define DBG(x, ...) printf("["FUNCNAME" : DBG] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__); +#define DBG(serPort, x, ...) serPort->printf("["FUNCNAME" : DBG] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__); #else #define DBG(x, ...) #endif #ifdef ERRMESSAGES -#define ERR(x, ...) printf("["FUNCNAME" : ERR] "x"\r\n", ##__VA_ARGS__); +#define ERR(serPort, x, ...) serPort->printf("["FUNCNAME" : ERR] "x"\r\n", ##__VA_ARGS__); #else #define ERR(x, ...) #endif #ifdef WARNMESSAGES -#define WARN(x, ...) printf("["FUNCNAME" : WARN] "x"\r\n", ##__VA_ARGS__); +#define WARN(serPort, x, ...) serPort->printf("["FUNCNAME" : WARN] "x"\r\n", ##__VA_ARGS__); #else #define WARN(x, ...) #endif #ifdef INFOMESSAGES -#define INFO(x, ...) printf("["FUNCNAME" : INFO] "x"\r\n", ##__VA_ARGS__); +#define INFO(serPort, x, ...) serPort->printf("["FUNCNAME" : INFO] "x"\r\n", ##__VA_ARGS__); #else #define INFO(x, ...) #endif