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.cpp
- Branch:
- api-changes
- Revision:
- 38:eb1e46561a19
- Parent:
- 34:9c26a3dcdc1f
- Child:
- 39:7e85bf8003fa
diff -r 77ad7da7474b -r eb1e46561a19 ESP8266Interface.cpp --- a/ESP8266Interface.cpp Tue Feb 23 01:31:42 2016 -0600 +++ b/ESP8266Interface.cpp Tue Feb 23 04:02:07 2016 -0600 @@ -26,10 +26,9 @@ int32_t ESP8266Interface::connect( const char *ap, const char *pass_phrase, - wifi_security_t, - uint32_t timeout_ms) + wifi_security_t) { - _esp.setTimeout(timeout_ms); + _esp.setTimeout(getTimeout()); if (!_esp.startup(3)) return -1; if (!_esp.dhcp(true, 1)) return -1; @@ -59,6 +58,12 @@ return _mac_address; } +void ESP8266Interface::setTimeout(uint32_t timeout) +{ + NetworkInterface::setTimeout(timeout); + _esp.setTimeout(timeout); +} + SocketInterface *ESP8266Interface::createSocket(socket_protocol_t proto) { // Look for an unused socket