GSwifiInterface library (interface for GainSpan Wi-Fi GS1011 modules) Please see https://mbed.org/users/gsfan/notebook/GSwifiInterface/
Dependents: GSwifiInterface_HelloWorld GSwifiInterface_HelloServo GSwifiInterface_UDPEchoServer GSwifiInterface_UDPEchoClient ... more
Fork of WiflyInterface by
GainSpan Wi-Fi library
The GS1011/GS2100 is an ultra low power 802.11b wireless module from GainSpan.
mbed RTOS supported.
- about this library: http://mbed.org/users/gsfan/notebook/GSwifiInterface/
- about Wi-Fi module: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
ゲインスパン Wi-Fi モジュール ライブラリ
ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011/GS2100 シリーズ用のライブラリです。
mbed RTOS に対応しています。(mbed2.0)
- このライブラリについて: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
- Wi-FIモジュールについて: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
- UARTコマンド、SPIデータインターフェースに対応しました。(2019/09)
Diff: GSwifi/GSwifi_at.cpp
- Revision:
- 10:7d8134e7df01
- Parent:
- 8:64184a968e3b
- Child:
- 11:71d67fea5ace
--- a/GSwifi/GSwifi_at.cpp Thu Oct 31 06:59:46 2013 +0000 +++ b/GSwifi/GSwifi_at.cpp Thu Oct 31 08:34:45 2013 +0000 @@ -22,7 +22,7 @@ _state.ok = false; _state.failure = false; _state.res = RES_NULL; - _state.mode = MODE_COMMAND; + _state.n = 0; } int GSwifi::sendCommand(const char * cmd, Response res, int timeout) { @@ -33,7 +33,6 @@ clearFlags(); _state.res = res; - _state.n = 0; for (i = 0; i < strlen(cmd); i ++) { putUart(cmd[i]); } @@ -45,7 +44,7 @@ if (timeout) { t.start(); for (;;) { - if (_state.ok) break; + if (_state.ok && _state.res == RES_NULL) break; if (_state.failure || t.read_ms() > timeout) { WARN("failure or timeout\r\n"); _state.res = RES_NULL;