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/
GSwifi_net.h@19:cad912f5a6ba, 2012-11-06 (annotated)
- Committer:
- gsfan
- Date:
- Tue Nov 06 08:54:19 2012 +0000
- Revision:
- 19:cad912f5a6ba
- Parent:
- 18:4b97804c37d1
- Child:
- 20:151b5a4fdd29
fix
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gsfan | 18:4b97804c37d1 | 1 | /** |
gsfan | 18:4b97804c37d1 | 2 | * Gainspan wi-fi module library for mbed |
gsfan | 18:4b97804c37d1 | 3 | * Copyright (c) 2012 gsfan |
gsfan | 18:4b97804c37d1 | 4 | * Released under the MIT License: http://mbed.org/license/mit |
gsfan | 18:4b97804c37d1 | 5 | */ |
gsfan | 18:4b97804c37d1 | 6 | |
gsfan | 18:4b97804c37d1 | 7 | /** @file |
gsfan | 18:4b97804c37d1 | 8 | * @brief Gainspan wi-fi module library for mbed |
gsfan | 18:4b97804c37d1 | 9 | * GS1011MIC, GS1011MIP, GainSpan WiFi Breakout, etc. |
gsfan | 18:4b97804c37d1 | 10 | * module configuration: ATB=115200 |
gsfan | 18:4b97804c37d1 | 11 | */ |
gsfan | 18:4b97804c37d1 | 12 | |
gsfan | 18:4b97804c37d1 | 13 | #ifndef _GSWIFI_NET_H_ |
gsfan | 18:4b97804c37d1 | 14 | #define _GSWIFI_NET_H_ |
gsfan | 18:4b97804c37d1 | 15 | |
gsfan | 18:4b97804c37d1 | 16 | #include "mbed.h" |
gsfan | 19:cad912f5a6ba | 17 | #include "host.h" |
gsfan | 18:4b97804c37d1 | 18 | |
gsfan | 18:4b97804c37d1 | 19 | // GSwifi_smtp.cpp |
gsfan | 18:4b97804c37d1 | 20 | #define SMTP_TIMEOUT 15000 |
gsfan | 18:4b97804c37d1 | 21 | |
gsfan | 18:4b97804c37d1 | 22 | // GSwifi_httpd.cpp |
gsfan | 18:4b97804c37d1 | 23 | #define HTTPD_TIMEOUT 15000 |
gsfan | 18:4b97804c37d1 | 24 | #define HTTPD_HANDLE 10 |
gsfan | 18:4b97804c37d1 | 25 | #define HTTPD_BUF_SIZE 100 |
gsfan | 18:4b97804c37d1 | 26 | #define HTTPD_URI_SIZE 50 |
gsfan | 18:4b97804c37d1 | 27 | #define HTTPD_KEEPALIVE 5 |
gsfan | 18:4b97804c37d1 | 28 | |
gsfan | 18:4b97804c37d1 | 29 | struct GS_httpd { |
gsfan | 18:4b97804c37d1 | 30 | int mode; |
gsfan | 18:4b97804c37d1 | 31 | int type; |
gsfan | 19:cad912f5a6ba | 32 | char *buf; // body |
gsfan | 19:cad912f5a6ba | 33 | int len; // length of buf |
gsfan | 18:4b97804c37d1 | 34 | char *uri; |
gsfan | 19:cad912f5a6ba | 35 | char *file; |
gsfan | 19:cad912f5a6ba | 36 | char *query; |
gsfan | 19:cad912f5a6ba | 37 | int length; // content-length |
gsfan | 18:4b97804c37d1 | 38 | int keepalive; |
gsfan | 19:cad912f5a6ba | 39 | Host host; |
gsfan | 18:4b97804c37d1 | 40 | }; |
gsfan | 18:4b97804c37d1 | 41 | |
gsfan | 19:cad912f5a6ba | 42 | typedef void (*onHttpdCgiFunc)(int cid, GS_httpd *gshttpd); |
gsfan | 19:cad912f5a6ba | 43 | |
gsfan | 18:4b97804c37d1 | 44 | struct GS_httpd_handler { |
gsfan | 18:4b97804c37d1 | 45 | char *uri; |
gsfan | 18:4b97804c37d1 | 46 | char *dir; |
gsfan | 18:4b97804c37d1 | 47 | onHttpdCgiFunc onHttpCgi; |
gsfan | 18:4b97804c37d1 | 48 | }; |
gsfan | 18:4b97804c37d1 | 49 | |
gsfan | 18:4b97804c37d1 | 50 | #endif |