OLD
OLD
Diff: GSwifi_net.h
- Revision:
- 18:4b97804c37d1
- Child:
- 19:cad912f5a6ba
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GSwifi_net.h Thu Nov 01 02:55:57 2012 +0000 @@ -0,0 +1,46 @@ +/** + * Gainspan wi-fi module library for mbed + * Copyright (c) 2012 gsfan + * Released under the MIT License: http://mbed.org/license/mit + */ + +/** @file + * @brief Gainspan wi-fi module library for mbed + * GS1011MIC, GS1011MIP, GainSpan WiFi Breakout, etc. + * module configuration: ATB=115200 + */ + +#ifndef _GSWIFI_NET_H_ +#define _GSWIFI_NET_H_ + +#include "mbed.h" + +// GSwifi_smtp.cpp +#define SMTP_TIMEOUT 15000 + +// GSwifi_httpd.cpp +#define HTTPD_TIMEOUT 15000 +#define HTTPD_HANDLE 10 +#define HTTPD_BUF_SIZE 100 +#define HTTPD_URI_SIZE 50 +#define HTTPD_KEEPALIVE 5 + +typedef void (*onHttpdCgiFunc)(int cid, char *file, char *post, int len); + +struct GS_httpd { + int mode; + int type; + char *buf; + int len; + char *uri; + int length; + int keepalive; +}; + +struct GS_httpd_handler { + char *uri; + char *dir; + onHttpdCgiFunc onHttpCgi; +}; + +#endif