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
Revision 46:6b1bd1268074, committed 2016-02-25
- Comitter:
- Christopher Haster
- Date:
- Thu Feb 25 03:34:36 2016 -0600
- Branch:
- api-changes
- Parent:
- 45:538e5ce2f0d3
- Child:
- 47:60a4b49e8b83
- Commit message:
- Removed storing IP address locally
Changed in this revision
| ESP8266Interface.cpp | Show annotated file Show diff for this revision Revisions of this file |
| ESP8266Interface.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/ESP8266Interface.cpp Thu Feb 25 03:32:37 2016 -0600
+++ b/ESP8266Interface.cpp Thu Feb 25 03:34:36 2016 -0600
@@ -83,10 +83,8 @@
return NS_ERROR_NO_CONNECTION;
}
- _ip_address = _esp.getIPAddress();
- _mac_address = _esp.getMACAddress();
- if (!_ip_address || !_mac_address) {
- return NS_ERROR_NO_ADDRESS;
+ if (!_esp.getIPAddress()) {
+ return NS_ERROR_DHCP_FAILURE;
}
return 0;
@@ -105,12 +103,12 @@
const char *ESP8266Interface::getIPAddress()
{
- return _ip_address;
+ return _esp.getIPAddress();
}
const char *ESP8266Interface::getMACAddress()
{
- return _mac_address;
+ return _esp.getMACAddress();
}
SocketInterface *ESP8266Interface::createSocket(socket_protocol_t proto)
--- a/ESP8266Interface.h Thu Feb 25 03:32:37 2016 -0600
+++ b/ESP8266Interface.h Thu Feb 25 03:34:36 2016 -0600
@@ -49,10 +49,7 @@
private:
ESP8266 _esp;
-
bool _ids[ESP8266_SOCKET_COUNT];
- const char *_ip_address;
- const char *_mac_address;
};
