GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Dependents:   GSwifi_httpd GSwifi_websocket GSwifi_tcpclient GSwifi_tcpserver ... more

Fork of GSwifi by gs fan

GainSpan Wi-Fi library

The GS1011 is an ultra low power 802.11b wireless module from GainSpan.

see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

/media/uploads/gsfan/gs_im_002.jpg /media/uploads/gsfan/gs1011m_2.jpg

ゲインスパン Wi-Fi モジュール ライブラリ

ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。

解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Revision:
29:1c4419512941
Parent:
28:fbba4c58d14c
Child:
31:0abdc584823d
--- a/GSwifi.cpp	Fri Feb 22 03:07:43 2013 +0000
+++ b/GSwifi.cpp	Tue Feb 26 02:48:31 2013 +0000
@@ -246,7 +246,7 @@
 
                 if (_gs_sock[_cid].protocol == GSPROT_HTTPGET) {
                     // recv interrupt
-                    if (_gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->use()) == 0)
+                    if (_gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->available()) == 0)
                         _gs_sock[_cid].received = false;
                 }
                 break;
@@ -266,7 +266,7 @@
                 if (len < GS_DATA_SIZE && _gs_sock[_cid].data->isFull()) {
                     // buffer full
                     // recv interrupt
-                    _gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->use());
+                    _gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->available());
                 }
             }
         }
@@ -331,7 +331,7 @@
             if (len && _gs_sock[_cid].data->isFull()) {
                 // buffer full
                 // recv interrupt
-                _gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->use());
+                _gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->available());
             }
             if (len == 0) {
                 DBG("recv binary %d\r\n", _cid);
@@ -341,7 +341,7 @@
 
                 if (_gs_sock[_cid].protocol == GSPROT_HTTPGET) {
                     // recv interrupt
-                    if (_gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->use()) == 0)
+                    if (_gs_sock[_cid].onGsReceive.call(_cid, _gs_sock[_cid].data->available()) == 0)
                         _gs_sock[_cid].received = false;
                 }
             }
@@ -695,7 +695,7 @@
     return 0;
 }
 
-int GSwifi::getMac (char *mac) {
+int GSwifi::getMacAddress (char *mac) {
     memcpy(mac, _mac, 6);
     return 0;
 }
@@ -1060,7 +1060,7 @@
             _gs_sock[i].received = false;
             for (j = 0; j < 1500 / GS_DATA_SIZE + 1; j ++) {
                 if (! _gs_sock[i].connect || _gs_sock[i].data->isEmpty()) break;
-                _gs_sock[i].onGsReceive.call(i, _gs_sock[i].data->use());
+                _gs_sock[i].onGsReceive.call(i, _gs_sock[i].data->available());
             }
         }
     }
@@ -1164,7 +1164,7 @@
     
     DBG("GS mode=%d, escape=%d, cid=%d\r\n", _gs_mode, _escape, _cid);
     for (i = 0; i < 16; i ++) {
-        DBG("%d: connect=%d, type=%d, protocol=%d, len=%d\r\n", i, _gs_sock[i].connect, _gs_sock[i].type, _gs_sock[i].protocol, _gs_sock[i].data->use());
+        DBG("%d: connect=%d, type=%d, protocol=%d, len=%d\r\n", i, _gs_sock[i].connect, _gs_sock[i].type, _gs_sock[i].protocol, _gs_sock[i].data->available());
         if (_gs_sock[i].protocol == GSPROT_HTTPD) {
             DBG("  mode=%d, type=%d, len=%d\r\n", i, _httpd[i].mode, _httpd[i].type, _httpd[i].len);
         }