Freedman v2

Dependents:   Freedman_v2

Fork of WizFi250Interface by DongEun Koak

Revision:
9:12ecb377f63f
Parent:
8:431172d536ee
Child:
10:187e3fd24123
diff -r 431172d536ee -r 12ecb377f63f WizFi250/WizFi250.h
--- a/WizFi250/WizFi250.h	Fri Nov 14 16:53:10 2014 +0900
+++ b/WizFi250/WizFi250.h	Fri Jun 19 15:34:40 2015 +0900
@@ -34,8 +34,10 @@
 
 using namespace std;
 
+#define BUF_SIZE 1600
+
 //Debug is disabled by default
-#if 0
+#if 1
 #define WIZ_DBG(x, ...) std::printf("[WizFi250: DBG]" x "\r\n", ##__VA_ARGS__);
 #define WIZ_WARN(x, ...) std::printf("[WizFi250: WARN]" x "\r\n", ##__VA_ARGS__);
 #define WIZ_ERR(x, ...) std::printf("[WizFi250: ERR]" x "\r\n", ##__VA_ARGS__);
@@ -93,6 +95,7 @@
         RES_SSEND,
         RES_FDNS,
         RES_SMGMT,
+        RES_WSTATUS,
     };
 
     enum Mode {
@@ -125,6 +128,7 @@
     int cmdWSET     (WiFiMode mode, const char *ssid, const char *bssid = NULL, int channel = 1);
     int cmdWSEC     (WiFiMode mode, const char *key, const char *sec = NULL);
     int cmdWJOIN    ();
+    int cmdWSTATUS  ();
     int cmdSCON     ( const char *openType, const char *socketType, int localPort, const char *dataMode = "0");
     int cmdSCON     ( const char *openType, const char *socketType, const char *remoteIp, int remotePort, int localPort = 0, const char *dataMode = "0");
     int cmdSSEND    ( const char *data, int cid, int sendSize, const char *remoteIp = NULL, int remotePort = 0, int Timeout = 2000 );
@@ -195,8 +199,8 @@
         int cid;
         int n;
         CircBuffer<char> *buf;
-        char dbgRespBuf[128];
-        char dummyBuf[128];
+        char dbgRespBuf[BUF_SIZE];
+        //char dummyBuf[BUF_SIZE];
     } _state;
 
 
@@ -209,7 +213,7 @@
         int port;
         int send_length;
         int recv_length;
-        CircBuffer<char> *buf;
+        CircBuffer<char> *buf = NULL;
         volatile bool received;
         volatile int parent;
         volatile bool accept;
@@ -253,7 +257,7 @@
     void resSSEND       (const char *buf);
     void resFDNS        (const char *buf);
     void resSMGMT       (const char *buf);
-
+    void resWSTATUS     (const char *buf);
 
 
     // --------- WizFi250_hal.cpp ---------