Library to use a wifly module: RN 131 C/G

Dependents:   RN-XV_simple_server

Revision:
10:d3e3e925f62f
Parent:
9:984c1436dd42
Child:
11:6eb90004d92a
diff -r 984c1436dd42 -r d3e3e925f62f Wifly.h
--- a/Wifly.h	Mon Aug 15 16:05:21 2011 +0000
+++ b/Wifly.h	Tue Sep 06 16:44:24 2011 +0000
@@ -100,10 +100,11 @@
         *
         * @param str string to be sent
         * @param ACK string which must be acknowledge by the wifi module
+        * @param res pointeur where will be stored the response from the wifi module. If res == NULL or ACK != "NO", no response is returned. (by default, res = NULL)
         *
         * @return true if ACK has been found in the response from the wifi module. False otherwise or if there is no response in 3s.
         */
-        bool Send(char * str, char * ACK); 
+        bool Send(char * str, char * ACK, char * res = NULL); 
         
         /**
         * Connect the wifi module to the network. Return true if set correctly, false if not.
@@ -176,6 +177,7 @@
         bool changeBaudrate(int baudrate);
         
         
+        
     
     private:
         Serial wifi;
@@ -188,6 +190,14 @@
         char * ip;
         char * netmask;
         int channel;
+        
+        char tmp_buf_rx[100];
+        char buf_rx[100];
+        volatile int length;
+        volatile bool new_msg;
+        
+        void attach_rx(bool null);
+        void handler_rx(void);
 };
 
 #endif
\ No newline at end of file