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
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/
ゲインスパン Wi-Fi モジュール ライブラリ
ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。
解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
Diff: GSwifi.h
- Revision:
- 41:0afda15e9bb4
- Parent:
- 40:72f70748f6e8
- Child:
- 42:9b3c38d66fa8
--- a/GSwifi.h Thu Aug 01 15:09:49 2013 +0000 +++ b/GSwifi.h Wed Aug 21 13:53:56 2013 +0000 @@ -185,19 +185,31 @@ // ----- GSwifi.cpp ----- /** - * default constructor + * default constructor (no fllow controll) + * @param p_tx mbed TXD pin (GS RXD) + * @param p_rx mbed RXD pin (GS TXD) + * @param p_reset GS RESET pin + * @param p_alarm GS ALARM pin + * @param baud uart baud rate */ GSwifi (PinName p_tx, PinName p_rx, PinName p_reset, PinName p_alarm = NC, int baud = GS_BAUD); /** - * Default constructor (with hardware fllow controll) + * default constructor (with hardware fllow controll) + * @param p_tx mbed TXD pin (GS RXD) + * @param p_rx mbed RXD pin (GS TXD) + * @param p_cts mbed CTS pin (GS RTS) + * @param p_rts mbed RTS pin (GS CTS) + * @param p_reset GS RESET pin + * @param p_alarm GS ALARM pin + * @param baud uart baud rate */ GSwifi (PinName p_tx, PinName p_rx, PinName p_cts, PinName p_rts, PinName p_reset, PinName p_alarm = NC, int baud = GS_BAUD); /** - * send command + * polling */ void poll(); /** - * change baud rate + * send command */ int command (const char *cmd, GSRESPONCE res, int timeout = GS_TIMEOUT); /** @@ -214,11 +226,12 @@ * @param ssid SSID * @param pass pass phrase * @param dhcp 0:static ip, 1:dhcp - * @param reconnect auto re-connect + * @param reconnect auto re-connect time + * @param name my host name * @retval 0 success * @retval -1 failure */ - int connect (GSSECURITY sec, const char *ssid, const char *pass, int dhcp = 1, int reconnect = 0, char *name = NULL); + int connect (GSSECURITY sec, const char *ssid, const char *pass, int dhcp = 1, int reconnect = GS_RECONNECT, char *name = NULL); /** * adhock * @param sec GSSEC_OPEN or GSSEC_WEP @@ -237,6 +250,7 @@ * @param pass 10 or 26 hexadecimal digits * @param ipaddr my ip address (dhcp start address) * @param netmask subnet mask + * @param dns my host name * @retval 0 success * @retval -1 failure * firmware: s2w-secureweb, s2w-web, s2w-wpsweb @@ -592,7 +606,7 @@ time_t _time; GSSECURITY _sec; char *_ssid, *_pass; - int _reconnect, _reconnect_count; + int _reconnect; time_t _reconnect_time; #ifdef GS_ENABLE_HTTPD