u-blox / ublox-cellular-driver-gen

Dependents:   example-ublox-at-cellular-interface-ext example-ublox-cellular-driver-gen HelloMQTT ublox_new_driver_test ... more

Files at this revision

API Documentation at this revision

Comitter:
rob.meades@u-blox.com
Date:
Tue Jun 13 10:45:14 2017 +0100
Parent:
3:027c9eaec52c
Child:
5:b935404dcf7c
Commit message:
Make debug prints conditional on _debug_trace_on.

Changed in this revision

UbloxCellularDriverGen.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/UbloxCellularDriverGen.cpp	Tue Jun 13 00:29:44 2017 +0100
+++ b/UbloxCellularDriverGen.cpp	Tue Jun 13 10:45:14 2017 +0100
@@ -19,9 +19,10 @@
 #include "mbed_trace.h"
 #define TRACE_GROUP "UCID"
 #else
-#define debug_if(_debug_trace_on, ...) (void(0)) // dummies if feature common pal is not added
-#define tr_info(...)  (void(0)) // dummies if feature common pal is not added
-#define tr_error(...) (void(0)) // dummies if feature common pal is not added
+#define tr_debug(format, ...) debug_if(_debug_trace_on, format "\n", ## __VA_ARGS__)
+#define tr_info(format, ...)  debug_if(_debug_trace_on, format "\n", ## __VA_ARGS__)
+#define tr_warn(format, ...)  debug_if(_debug_trace_on, format "\n", ## __VA_ARGS__)
+#define tr_error(format, ...) debug_if(_debug_trace_on, format "\n", ## __VA_ARGS__)
 #endif
 
 /**********************************************************************