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.
Fork of ESP8266Interface by
Diff: ESP8266Interface.h
- Revision:
- 23:fd0f3197c30b
- Parent:
- 22:312453862371
- Child:
- 24:37504440f296
- Child:
- 25:91c4e9d34b77
--- a/ESP8266Interface.h Wed Jul 22 20:53:09 2015 +0000 +++ b/ESP8266Interface.h Thu Jul 23 21:25:30 2015 +0000 @@ -18,7 +18,7 @@ #define ESP8266INTERFACE_H #include "WiFiInterface.h" -#include "ATParser.h" +#include "ESP8266.h" /** ESP8266Socket class. This is a ESP8266 implementation of a socket that implements the SocketInterface class. @@ -29,7 +29,7 @@ class ESP8266Socket : public SocketInterface { public: - ESP8266Socket(uint32_t handle, ATParser* atParser, socket_protocol_t type, uint8_t id); + ESP8266Socket(uint32_t handle, ESP8266* driver, socket_protocol_t type, uint8_t id); virtual const char *getHostByName(const char *name) const; virtual void setAddress(const char* addr) ; virtual void setPort(uint16_t port) ; @@ -48,8 +48,7 @@ void handleRecieve(); protected: uint8_t _id; -private: - ATParser *atParser; + ESP8266* driver; }; /** ESP8266Interface class. @@ -59,7 +58,6 @@ { public: ESP8266Interface(PinName tx, PinName rx); - ESP8266Interface(PinName tx, PinName rx, const char *ap, const char *pass_phrase = 0, wifi_security_t security = WI_NONE, uint32_t timeout_ms = 15000); virtual int32_t init(void); virtual int32_t init(const char *ip, const char *mask, const char *gateway); virtual int32_t connect(uint32_t timeout_ms) ; @@ -74,8 +72,7 @@ virtual int deallocateSocket(SocketInterface *socket) ; private: - BufferedSerial serial; - ATParser atParser; + ESP8266 esp8266; const int numSockets = 5; int availableID[numSockets]; char ip[100];