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:
Wed Aug 22 01:33:46 2012 +0000
Parent:
9:3b819ba34c6c
Child:
11:983f4e832a3e
Commit message:
fix baud

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	Wed Aug 22 00:27:58 2012 +0000
+++ b/GSwifi.cpp	Wed Aug 22 01:33:46 2012 +0000
@@ -27,24 +27,24 @@
 #define _gs_putc(c) _gs.putc(c)
 #endif
 
-GSwifi::GSwifi (PinName p_tx, PinName p_rx) : _gs(p_tx, p_rx), _buf_cmd(GS_CMD_SIZE) {
+GSwifi::GSwifi (PinName p_tx, PinName p_rx, int baud) : _gs(p_tx, p_rx), _buf_cmd(GS_CMD_SIZE) {
     _connect = false;
     _status = GSSTAT_READY;
     _escape = 0;
     _gs_mode = GSMODE_COMMAND;
 
-    _gs.baud(GS_BAUD);
+    _gs.baud(baud);
     _gs.attach(this, &GSwifi::isr_recv, Serial::RxIrq);
     _rts = false;
 }
 
-GSwifi::GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts) : _gs(p_tx, p_rx), _buf_cmd(GS_CMD_SIZE) {
+GSwifi::GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts, int baud) : _gs(p_tx, p_rx), _buf_cmd(GS_CMD_SIZE) {
     _connect = false;
     _status = GSSTAT_READY;
     _escape = 0;
     _gs_mode = GSMODE_COMMAND;
 
-    _gs.baud(GS_BAUD);
+    _gs.baud(baud);
     _gs.attach(this, &GSwifi::isr_recv, Serial::RxIrq);
 
 #if defined(TARGET_LPC1768) || defined(TARGET_LPC2368)
--- a/GSwifi.h	Wed Aug 22 00:27:58 2012 +0000
+++ b/GSwifi.h	Wed Aug 22 01:33:46 2012 +0000
@@ -117,11 +117,11 @@
     /**
      * default constructor
      */
-    GSwifi (PinName p_tx, PinName p_rx);
+    GSwifi (PinName p_tx, PinName p_rx, int baud = GS_BAUD);
     /**
      * Default constructor (with hardware fllow controll)
      */
-    GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts);
+    GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts, int baud = GS_BAUD);
     /**
      * send command
      */