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.
Fork of SX1272Lib by
Diff: debug/debug.h
- Revision:
- 23:273a2f93ae99
- Parent:
- 10:4a0720f9b7a3
--- a/debug/debug.h Thu Nov 26 16:55:15 2015 +0000
+++ b/debug/debug.h Tue Feb 09 02:05:06 2016 +0000
@@ -21,11 +21,12 @@
/** @file debug.h */
-#ifndef NDEBUG
-
#include <stdarg.h>
#include <stdio.h>
+#define NDEBUG
+#ifndef NDEBUG
+
/** Output a debug message
*
* @param format printf-style format string, followed by variables
@@ -37,6 +38,14 @@
va_end(args);
}
+#else
+static inline void debug(const char *format, ...) {}
+#endif
+
+
+//#define NDEBUG_IF
+#ifndef NDEBUG_IF
+
/** Conditionally output a debug message
*
* @param condition output only if condition is true
@@ -50,12 +59,8 @@
va_end(args);
}
}
-
#else
-
-static inline void debug(const char *format, ...) {}
-static inline void debug(bool condition, const char *format, ...) {}
-
+static inline void debug_if(bool condition, const char *format, ...) {}
#endif
#endif
