debug version

Dependents:   HTTPClient_WiFi_HelloWorld_src

Fork of SNICInterface by muRata

Revision:
43:d80bbb12ffe6
Parent:
42:17d89443d899
Child:
49:3376556ba6ad
--- a/SNIC/MurataObject.h	Fri Sep 19 01:46:17 2014 +0000
+++ b/SNIC/MurataObject.h	Fri Nov 14 00:52:31 2014 +0000
@@ -20,13 +20,25 @@
 #define _MURATA_OBJECT_H_
 #include "mbed.h"
 
-//#define _DEBUG      /* If this definition is enabled, debug log is output. */
+#define _DEBUG      /* If this definition is enabled, debug log is output. */
+//#define _FUNC_TRACE
 
 #ifdef _DEBUG
 extern Serial pc;
 #define DEBUG_PRINT(...)    { pc.printf(__VA_ARGS__);}
+
+#ifdef _FUNC_TRACE
+#define FUNC_IN()             { pc.printf( "%s[%d]%s[tid:%x] IN\r\n", __FILE__, __LINE__, __FUNCTION__, Thread::gettid());}
+#define FUNC_OUT()            { pc.printf( "%s[%d]%s[tid:%x] OUT\r\n", __FILE__, __LINE__, __FUNCTION__, Thread::gettid() );}
+#else
+#define FUNC_IN()
+#define FUNC_OUT()
+#endif
+
 #else
 #define DEBUG_PRINT(...)
+#define FUNC_IN()
+#define FUNC_OUT()
 #endif
 
 class C_MurataObject{