Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: HTTPClient_HelloWorld_IDW01M1 wifigianluigi HTTPClient_HelloWorld_IDW01M1_Fabio_Ricezione
Fork of HTTPClient by
Diff: HTTPWifi.h
- Revision:
- 19:17578cfdb57a
diff -r 277279a1891e -r 17578cfdb57a HTTPWifi.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPWifi.h Mon Nov 07 17:08:02 2016 +0000
@@ -0,0 +1,36 @@
+
+#if !defined(HTTPWIFI_H)
+#define HTTPWIFI_H
+
+#include "mbed.h"
+#include "SpwfInterface.h"
+#include "WiFiInterface.h"
+#include "HTTPSocket.h"
+
+class HTTPWiFi : public HTTPSocket
+{
+public:
+ HTTPWiFi(SpwfSAInterface &WiFiIntf, const char *ssid, const char *pass, nsapi_security_t security = NSAPI_SECURITY_NONE) : WiFi(WiFiIntf)
+ {
+// eth.init(); // Use DHCP
+ WiFi.connect(ssid, pass, security);
+ printf ("WIFI ssid: %s connected\n\r", ssid);
+ }
+
+ SpwfSAInterface& getWiFi()
+ {
+ return WiFi;
+ }
+
+/* void reconnect()
+ {
+ WiFi.connect(); // nothing I've tried actually works to reconnect
+ }
+*/
+
+private:
+
+SpwfSAInterface& WiFi;
+
+};
+#endif
