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
HTTPWifi.h
- Committer:
- mapellil
- Date:
- 2016-11-07
- Revision:
- 19:17578cfdb57a
File content as of revision 19:17578cfdb57a:
#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
