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@37:7f2f9f78f866, 2016-10-06 (annotated)
- Committer:
- defrost
- Date:
- Thu Oct 06 08:04:10 2016 +0000
- Revision:
- 37:7f2f9f78f866
- Parent:
- 34:a22a6343e3d4
- updated comments in messages.h
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| defrost | 37:7f2f9f78f866 | 1 | /** |
| defrost | 37:7f2f9f78f866 | 2 | * @author Damien Frost |
| defrost | 37:7f2f9f78f866 | 3 | * |
| defrost | 37:7f2f9f78f866 | 4 | * @section LICENSE |
| defrost | 37:7f2f9f78f866 | 5 | * |
| defrost | 37:7f2f9f78f866 | 6 | * Copyright (c) 2016 Damien Frost |
| defrost | 37:7f2f9f78f866 | 7 | * |
| defrost | 37:7f2f9f78f866 | 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| defrost | 37:7f2f9f78f866 | 9 | * of this software and associated documentation files (the "Software"), to deal |
| defrost | 37:7f2f9f78f866 | 10 | * in the Software without restriction, including without limitation the rights |
| defrost | 37:7f2f9f78f866 | 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| defrost | 37:7f2f9f78f866 | 12 | * copies of the Software, and to permit persons to whom the Software is |
| defrost | 37:7f2f9f78f866 | 13 | * furnished to do so, subject to the following conditions: |
| defrost | 37:7f2f9f78f866 | 14 | * |
| defrost | 37:7f2f9f78f866 | 15 | * The above copyright notice and this permission notice shall be included in |
| defrost | 37:7f2f9f78f866 | 16 | * all copies or substantial portions of the Software. |
| defrost | 37:7f2f9f78f866 | 17 | * |
| defrost | 37:7f2f9f78f866 | 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| defrost | 37:7f2f9f78f866 | 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| defrost | 37:7f2f9f78f866 | 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| defrost | 37:7f2f9f78f866 | 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| defrost | 37:7f2f9f78f866 | 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| defrost | 37:7f2f9f78f866 | 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| defrost | 37:7f2f9f78f866 | 24 | * THE SOFTWARE. |
| defrost | 37:7f2f9f78f866 | 25 | * |
| defrost | 37:7f2f9f78f866 | 26 | * @file "messages.h" |
| defrost | 37:7f2f9f78f866 | 27 | * |
| defrost | 37:7f2f9f78f866 | 28 | * @section DESCRIPTION |
| defrost | 37:7f2f9f78f866 | 29 | * Messaging system used to display information over the serial port. |
| defrost | 37:7f2f9f78f866 | 30 | * |
| defrost | 37:7f2f9f78f866 | 31 | */ |
| defrost | 34:a22a6343e3d4 | 32 | |
| defrost | 34:a22a6343e3d4 | 33 | #ifndef IQ_MESSAGES_H |
| defrost | 34:a22a6343e3d4 | 34 | #define IQ_MESSAGES_H |
| defrost | 34:a22a6343e3d4 | 35 | |
| defrost | 34:a22a6343e3d4 | 36 | #ifdef DEBUG |
| defrost | 34:a22a6343e3d4 | 37 | #define DBG(x, ...) printf("["FUNCNAME" : DBG] "x" <line %d>\r\n", ##__VA_ARGS__,__LINE__); |
| defrost | 34:a22a6343e3d4 | 38 | #else |
| defrost | 34:a22a6343e3d4 | 39 | #define DBG(x, ...) |
| defrost | 34:a22a6343e3d4 | 40 | #endif |
| defrost | 34:a22a6343e3d4 | 41 | |
| defrost | 34:a22a6343e3d4 | 42 | #ifdef ERRMESSAGES |
| defrost | 34:a22a6343e3d4 | 43 | #define ERR(x, ...) printf("["FUNCNAME" : ERR] "x"\r\n", ##__VA_ARGS__); |
| defrost | 34:a22a6343e3d4 | 44 | #else |
| defrost | 34:a22a6343e3d4 | 45 | #define ERR(x, ...) |
| defrost | 34:a22a6343e3d4 | 46 | #endif |
| defrost | 34:a22a6343e3d4 | 47 | |
| defrost | 34:a22a6343e3d4 | 48 | #ifdef WARNMESSAGES |
| defrost | 34:a22a6343e3d4 | 49 | #define WARN(x, ...) printf("["FUNCNAME" : WARN] "x"\r\n", ##__VA_ARGS__); |
| defrost | 34:a22a6343e3d4 | 50 | #else |
| defrost | 34:a22a6343e3d4 | 51 | #define WARN(x, ...) |
| defrost | 34:a22a6343e3d4 | 52 | #endif |
| defrost | 34:a22a6343e3d4 | 53 | |
| defrost | 34:a22a6343e3d4 | 54 | #ifdef INFOMESSAGES |
| defrost | 34:a22a6343e3d4 | 55 | #define INFO(x, ...) printf("["FUNCNAME" : INFO] "x"\r\n", ##__VA_ARGS__); |
| defrost | 34:a22a6343e3d4 | 56 | #else |
| defrost | 34:a22a6343e3d4 | 57 | #define INFO(x, ...) |
| defrost | 34:a22a6343e3d4 | 58 | #endif |
| defrost | 34:a22a6343e3d4 | 59 | |
| defrost | 34:a22a6343e3d4 | 60 | #endif /* IQ_MESSAGES_H */ |
