Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: IoT_Ex BatteryModelTester BatteryModelTester
Fork of WiflyInterface by
messages.h@34:a22a6343e3d4, 2016-07-10 (annotated)
- Committer:
- defrost
- Date:
- Sun Jul 10 11:13:33 2016 +0000
- Revision:
- 34:a22a6343e3d4
- Child:
- 37:7f2f9f78f866
- updated debug messages
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| defrost | 34:a22a6343e3d4 | 1 | // ************** |
| defrost | 34:a22a6343e3d4 | 2 | // * messages.h * |
| defrost | 34:a22a6343e3d4 | 3 | // ************** |
| defrost | 34:a22a6343e3d4 | 4 | // |
| defrost | 34:a22a6343e3d4 | 5 | // Created: 2016/06/29 |
| defrost | 34:a22a6343e3d4 | 6 | // By: Damien Frost |
| defrost | 34:a22a6343e3d4 | 7 | // |
| defrost | 34:a22a6343e3d4 | 8 | // Description: |
| defrost | 34:a22a6343e3d4 | 9 | // Used to display different levels of debugging messages to the terminal. |
| defrost | 34:a22a6343e3d4 | 10 | |
| defrost | 34:a22a6343e3d4 | 11 | #ifndef IQ_MESSAGES_H |
| defrost | 34:a22a6343e3d4 | 12 | #define IQ_MESSAGES_H |
| defrost | 34:a22a6343e3d4 | 13 | |
| defrost | 34:a22a6343e3d4 | 14 | #ifdef DEBUG |
| defrost | 34:a22a6343e3d4 | 15 | #define DBG(x, ...) printf("["FUNCNAME" : DBG] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__); |
| defrost | 34:a22a6343e3d4 | 16 | #else |
| defrost | 34:a22a6343e3d4 | 17 | #define DBG(x, ...) |
| defrost | 34:a22a6343e3d4 | 18 | #endif |
| defrost | 34:a22a6343e3d4 | 19 | |
| defrost | 34:a22a6343e3d4 | 20 | #ifdef ERRMESSAGES |
| defrost | 34:a22a6343e3d4 | 21 | #define ERR(x, ...) printf("["FUNCNAME" : ERR] "x"\r\n", ##__VA_ARGS__); |
| defrost | 34:a22a6343e3d4 | 22 | #else |
| defrost | 34:a22a6343e3d4 | 23 | #define ERR(x, ...) |
| defrost | 34:a22a6343e3d4 | 24 | #endif |
| defrost | 34:a22a6343e3d4 | 25 | |
| defrost | 34:a22a6343e3d4 | 26 | #ifdef WARNMESSAGES |
| defrost | 34:a22a6343e3d4 | 27 | #define WARN(x, ...) printf("["FUNCNAME" : WARN] "x"\r\n", ##__VA_ARGS__); |
| defrost | 34:a22a6343e3d4 | 28 | #else |
| defrost | 34:a22a6343e3d4 | 29 | #define WARN(x, ...) |
| defrost | 34:a22a6343e3d4 | 30 | #endif |
| defrost | 34:a22a6343e3d4 | 31 | |
| defrost | 34:a22a6343e3d4 | 32 | #ifdef INFOMESSAGES |
| defrost | 34:a22a6343e3d4 | 33 | #define INFO(x, ...) printf("["FUNCNAME" : INFO] "x"\r\n", ##__VA_ARGS__); |
| defrost | 34:a22a6343e3d4 | 34 | #else |
| defrost | 34:a22a6343e3d4 | 35 | #define INFO(x, ...) |
| defrost | 34:a22a6343e3d4 | 36 | #endif |
| defrost | 34:a22a6343e3d4 | 37 | |
| defrost | 34:a22a6343e3d4 | 38 | #endif /* IQ_MESSAGES_H */ |
