- Added setBaud() function - Added CheckNetworkStatus() function - Improved messaging system

Dependents:   IoT_Ex BatteryModelTester BatteryModelTester

Fork of WiflyInterface by Components

Revision:
34:a22a6343e3d4
Parent:
28:6478767092aa
Child:
35:ce3afc021ec2
--- a/WiflyInterface.cpp	Tue Jun 28 16:22:27 2016 +0000
+++ b/WiflyInterface.cpp	Sun Jul 10 11:13:33 2016 +0000
@@ -2,22 +2,11 @@
 
 //#define DEBUG
 #define INFOMESSAGES
-//Debug is disabled by default
-#ifdef DEBUG
-#define DBG(x, ...) pc.printf("[WiflyInterface : DBG] "x"\r\n", ##__VA_ARGS__);
-#define WARN(x, ...) pc.printf("[WiflyInterface : WARN] "x"\r\n", ##__VA_ARGS__);
-#define ERR(x, ...) pc.printf("[WiflyInterface : ERR] "x"\r\n", ##__VA_ARGS__);
-#else
-#define DBG(x, ...)
-#define WARN(x, ...)
-#define ERR(x, ...)
-#endif
+#define WARNMESSAGES
+#define ERRMESSAGES
+#define FUNCNAME "WiflyInterface"
+#include "messages.h"
 
-#ifdef INFOMESSAGES
-#define INFO(x, ...) pc.printf("[WiflyInterface : INFO] "x"\r\n", ##__VA_ARGS__);
-#else
-#define INFO(x, ...)
-#endif
 
 WiflyInterface::WiflyInterface( PinName tx, PinName rx, PinName reset, PinName tcp_status,
                                 const char * ssid, const char * phrase, Security sec) :