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.
Dependencies: mbed SocketModem nanoservice_client_1_12
debug.h
00001 #ifndef DEBUG_H 00002 #define DEBUG_H 00003 00004 #include "mbed.h" 00005 00006 // Set the debugging level, 0 = off, 1 = simple, 2 = detailed 00007 #define DEBUG_LEVEL 1 00008 00009 #if (DEBUG_LEVEL) == 2 00010 #define DEBUG(x, ...) printf("[DEBUG: %s:%d] " x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00011 #define WARNING(x, ...) printf("[WARNING: %s:%d] " x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00012 #define ERROR(x, ...) printf("[ERROR: %s:%d] " x "\r\n", __FILE__, __LINE__, ##__VA_ARGS__); 00013 #elif (DEBUG_LEVEL) == 1 00014 #define DEBUG(x, ...) printf("[DEBUG] " x "\r\n", ##__VA_ARGS__); 00015 #define WARNING(x, ...) printf("[WARNING] " x "\r\n", ##__VA_ARGS__); 00016 #define ERROR(x, ...) printf("[ERROR] " x "\r\n", ##__VA_ARGS__); 00017 #elif (DEBUG_LEVEL) == 0 00018 #define DEBUG(x, ...) 00019 #define WARNING(x, ...) 00020 #define ERROR(x, ...) 00021 #endif 00022 00023 #endif // DEBUG_H
Generated on Fri Jul 22 2022 11:30:09 by
1.7.2