pin pong

Dependents:   SX1272PingPong

Fork of SX1276Lib by Semtech

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