Debug library

Dependents:   NetworkingCoreLib LwIPNetworking yeswecancoap lwip

Revision:
1:bd1844de60f1
Parent:
0:3ac250c92185
Child:
3:53f6e0430d8e
--- a/dbg.h	Thu May 24 15:33:14 2012 +0000
+++ b/dbg.h	Thu May 31 15:09:00 2012 +0000
@@ -31,15 +31,14 @@
 
 void debug_init(void);
 void debug(int level, const char* module, int line, const char* fmt, ...);
+void debug_set_newline(const char* newline);
 void debug_error(const char* module, int line, int ret);
-
-#if __DEBUG__
-//#undef __DEBUG__
-#endif
-//#define __DEBUG__ 0
+void debug_exact(const char* fmt, ...);
 
 #define DBG_INIT() do{ debug_init(); }while(0)
 
+#define DBG_SET_NEWLINE( x ) do{ debug_set_newline(x); }while(0)
+
 #if __DEBUG__ > 0
 #ifndef __MODULE__
 #error "__MODULE__ must be defined"
@@ -68,8 +67,10 @@
 
 #if __DEBUG__ >= 4
 #define DBG(...) do{ debug(4, __MODULE__, __LINE__, __VA_ARGS__); }while(0)
+#define DBGX(...) do{ debug_exact(__VA_ARGS__); }while(0)
 #else
 #define DBG(...) do{ }while(0)
+#define DBGX(...) do{ }while(0)
 #endif
 
 #ifdef __cplusplus