Multitech + KL46Z NanoService example with the RTOS

Dependencies:   mbed SocketModem nanoservice_client_1_12

Committer:
zdshelby
Date:
Fri Mar 28 16:45:52 2014 +0000
Revision:
14:63c1fd3c95a6
Parent:
9:5b116d75f41a
- Minor resource updates

Who changed what in which revision?

UserRevisionLine numberNew contents of line
zdshelby 0:f739ace74102 1 #ifndef DEBUG_H
zdshelby 0:f739ace74102 2 #define DEBUG_H
zdshelby 0:f739ace74102 3
zdshelby 0:f739ace74102 4 #include "mbed.h"
zdshelby 0:f739ace74102 5
zdshelby 0:f739ace74102 6 // Set the debugging level, 0 = off, 1 = simple, 2 = detailed
zdshelby 0:f739ace74102 7 #define DEBUG_LEVEL 1
zdshelby 0:f739ace74102 8
zdshelby 0:f739ace74102 9 #if (DEBUG_LEVEL) == 2
zdshelby 0:f739ace74102 10 #define DEBUG(x, ...) printf("[DEBUG: %s:%d] " x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
zdshelby 9:5b116d75f41a 11 #define WARNING(x, ...) printf("[WARNING: %s:%d] " x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
zdshelby 9:5b116d75f41a 12 #define ERROR(x, ...) printf("[ERROR: %s:%d] " x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__);
zdshelby 0:f739ace74102 13 #elif (DEBUG_LEVEL) == 1
zdshelby 0:f739ace74102 14 #define DEBUG(x, ...) printf("[DEBUG] " x "\r\n", ##__VA_ARGS__);
zdshelby 9:5b116d75f41a 15 #define WARNING(x, ...) printf("[WARNING] " x "\r\n", ##__VA_ARGS__);
zdshelby 9:5b116d75f41a 16 #define ERROR(x, ...) printf("[ERROR] " x "\r\n", ##__VA_ARGS__);
zdshelby 0:f739ace74102 17 #elif (DEBUG_LEVEL) == 0
zdshelby 0:f739ace74102 18 #define DEBUG(x, ...)
zdshelby 9:5b116d75f41a 19 #define WARNING(x, ...)
zdshelby 9:5b116d75f41a 20 #define ERROR(x, ...)
zdshelby 0:f739ace74102 21 #endif
zdshelby 0:f739ace74102 22
zdshelby 0:f739ace74102 23 #endif // DEBUG_H