aboutsummaryrefslogtreecommitdiff
path: root/src/zjs_common.h
diff options
context:
space:
mode:
authorJimmy Huang <jimmy.huang@linux.intel.com>2016-10-05 08:48:47 -0700
committerGeoff Gustafson <grgustaf@users.noreply.github.com>2016-10-05 08:48:47 -0700
commitaa0f294ef7f771c931291deb504817f0052e0c71 (patch)
tree00eeffe9bea24da246ef1ff40ad7dcb291e26b59 /src/zjs_common.h
parent44b473bdff2b87db52ff91a29e7e52b7649ca3e0 (diff)
[Demo] Cleaned up debug messages for the BLE demo (#248)
Moved the DBG_PRINT macro to zjs_common.h for ARC to use as well, move all unneeded print messages for the demo to debug, and added a newline to indicate the beginning of the app Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
Diffstat (limited to 'src/zjs_common.h')
-rw-r--r--src/zjs_common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zjs_common.h b/src/zjs_common.h
index bffd08e..b127b3c 100644
--- a/src/zjs_common.h
+++ b/src/zjs_common.h
@@ -9,6 +9,14 @@
#define PRINT printf
+#ifdef DEBUG_BUILD
+#define DBG_PRINT \
+ PRINT("%s:%d %s(): ", __FILE__, __LINE__, __func__); \
+ PRINT
+#else
+#define DBG_PRINT(fmat ...) do {} while(0);
+#endif
+
// TODO: We should instead have a macro that changes in debug vs. release build,
// to save string space and instead print error codes or something for release.