Added monitoring feature of ESP8266's UART

Dependents:   ESP8266_W7500_Example DualNetworkInterface-Basic

Fork of ESP8266Interface by ESP8266

Revision:
30:c035696b9397
Parent:
28:91e65e22e63a
Child:
31:fd0eaf273b11
--- a/ESP8266/ESP8266.h	Tue Apr 28 20:17:51 2015 +0000
+++ b/ESP8266/ESP8266.h	Wed Apr 29 22:43:03 2015 +0000
@@ -31,6 +31,8 @@
 #include "CBuffer.h"
 
 #define DEFAULT_WAIT_RESP_TIMEOUT 500
+#define ESP_TCP_TYPE 1
+#define ESP_UDP_TYPE 0 
 
 /**
  * The ESP8266 class
@@ -78,9 +80,21 @@
     bool disconnect();
     
     /*
-    * Start up a UDP Connection
+    * Start up a UDP or TCP Connection
+    * @param type 0 for UDP, 1 for TCP
+    * @param ip A string that contains the IP, no quotes
+    * @param port Numerical port number to connect to
+    * @param id number between 0-4, if defined it denotes ID to use in multimode (Default to Single connection mode with -1)
+    * @return true if sucessful, 0 if fail
     */
-    bool startUDP(char* ip, int port);
+    bool start(bool type, char* ip, int port, int id = -1);
+
+    /*
+    * Legacy Start for UDP only connection in transparent mode
+    * @param ip A string that contains the IP, no quotes
+    * @param port Numerical port number to connect to
+    */
+    bool ESP8266::startUDP(char* ip, int port);
 
     /**
     * Close a connection