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/

Files at this revision

API Documentation at this revision

Comitter:
gsfan
Date:
Sun Oct 28 14:26:31 2012 +0000
Parent:
16:aea56cce3bf5
Child:
18:4b97804c37d1
Commit message:
fix httpGet/Post

Changed in this revision

GSwifi.cpp Show annotated file Show diff for this revision Revisions of this file
GSwifi.h Show annotated file Show diff for this revision Revisions of this file
--- a/GSwifi.cpp	Thu Oct 18 02:21:27 2012 +0000
+++ b/GSwifi.cpp	Sun Oct 28 14:26:31 2012 +0000
@@ -1109,7 +1109,7 @@
     return _gs_sock[cid].connect;
 }
 
-int GSwifi::httpGet (Host &host, char *uri, int ssl, char *user, char *pwd, onGsReceiveFunc ponGsReceive) {
+int GSwifi::httpGet (Host &host, char *uri, char *user, char *pwd, int ssl, onGsReceiveFunc ponGsReceive) {
     char cmd[GS_CMD_SIZE];
 
     if (! _connect || _status != GSSTAT_READY) return -1;
@@ -1156,10 +1156,10 @@
 }
 
 int GSwifi::httpGet (Host &host, char *uri, int ssl, onGsReceiveFunc ponGsReceive) {
-    return httpGet (host, uri, ssl, NULL, NULL, ponGsReceive);
+    return httpGet (host, uri, NULL, NULL, ssl, ponGsReceive);
 }
 
-int GSwifi::httpPost (Host &host, char *uri, char *body, int ssl, char *user, char *pwd, onGsReceiveFunc ponGsReceive) {
+int GSwifi::httpPost (Host &host, char *uri, char *body, char *user, char *pwd, int ssl, onGsReceiveFunc ponGsReceive) {
     char cmd[GS_CMD_SIZE];
     int i, len;
 
@@ -1215,7 +1215,7 @@
 }
 
 int GSwifi::httpPost (Host &host, char *uri, char *body, int ssl, onGsReceiveFunc ponGsReceive) {
-    return httpPost (host, uri, body, ssl, NULL, NULL, ponGsReceive);
+    return httpPost (host, uri, body, NULL, NULL, ssl, ponGsReceive);
 }
 
 int GSwifi::certAdd (char *name, char *cert, int len) {
--- a/GSwifi.h	Thu Oct 18 02:21:27 2012 +0000
+++ b/GSwifi.h	Sun Oct 28 14:26:31 2012 +0000
@@ -302,14 +302,14 @@
      * @return CID, -1:failure
      * If you use ssl, please set system time.
      */
-    int httpGet (Host &host, char *uri, int ssl, char *user, char *pwd, onGsReceiveFunc ponGsReceive = NULL);
+    int httpGet (Host &host, char *uri, char *user, char *pwd, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL);
     int httpGet (Host &host, char *uri, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL);
     /**
      * http request
      * @return CID, -1:failure
      * If you use ssl, please set system time.
      */
-    int httpPost (Host &host, char *uri, char *body, int ssl, char *user, char *pwd, onGsReceiveFunc ponGsReceive = NULL);
+    int httpPost (Host &host, char *uri, char *body, char *user, char *pwd, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL);
     int httpPost (Host &host, char *uri, char *body, int ssl = 0, onGsReceiveFunc ponGsReceive = NULL);
     /**
      * certificate