GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
Fork of GSwifi_old by
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/
Information
Please change the baud rate in advance.
- ATB=115200
- AT&W0
It may be better and sometimes faster.
GSwifi gs(p13, p14, baud);
Heavily modified new library: http://mbed.org/users/gsfan/code/GSwifi
ゲインスパン Wi-Fi モジュール ライブラリ
ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。
解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
Information
モジュールはあらかじめ次のコマンドでボーレートを変更しておく。
- ATB=115200
- AT&W0
場合によってはもっと高速の方がいいかもしれない。クラス宣言時にレート設定をする。
GSwifi gs(p13, p14, baud);
大幅に更新された新しいライブラリ: http://mbed.org/users/gsfan/code/GSwifi
Diff: GSwifi.cpp
- Revision:
- 13:03b420e152b7
- Parent:
- 12:63e714550791
- Child:
- 14:9e89b922ace1
--- a/GSwifi.cpp Tue Sep 11 03:45:53 2012 +0000 +++ b/GSwifi.cpp Tue Sep 11 04:01:49 2012 +0000 @@ -306,7 +306,7 @@ for (i = 0; i < 10; i ++) { wait_ms(10); poll(); - ring_clear(_buf_cmd); + _buf_cmd.clear(); } return 0; } @@ -854,11 +854,10 @@ } void GSwifi::poll() { - int i; + int i, j; if (_gs_enter) { // received "\n" - int i; char buf[GS_CMD_SIZE]; wait_ms(10); @@ -923,7 +922,6 @@ // recv interrupt _gs_sock[i].received = 0; if (_gs_sock[i].onGsReceive != NULL) { - int j; for (j = 0; j < 1500 / GS_DATA_SIZE + 1; j ++) { if (! _gs_sock[i].data->use()) break; _gs_sock[i].onGsReceive(i, _gs_sock[i].data->use());