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:
- 41:3f4d5f4862d2
- Parent:
- 40:83c6b4129468
- Child:
- 42:4bf09cadf328
--- a/ESP8266Interface.cpp Wed Feb 24 22:17:45 2016 -0600 +++ b/ESP8266Interface.cpp Wed Feb 24 22:21:43 2016 -0600 @@ -32,20 +32,32 @@ const char *pass_phrase, wifi_security_t) { - if (!_esp.startup(3)) return -1; - if (!_esp.dhcp(true, 1)) return -1; - if (!_esp.connect(ap, pass_phrase)) return -1; + if (!_esp.startup(3)) { + return -1; + } + + if (!_esp.dhcp(true, 1)) { + return -1; + } + + if (!_esp.connect(ap, pass_phrase)) { + return -1; + } _ip_address = _esp.getIPAddress(); _mac_address = _esp.getMACAddress(); - if (!_ip_address || !_mac_address) return -1; + if (!_ip_address || !_mac_address) { + return -1; + } return 0; } int32_t ESP8266Interface::disconnect() { - if (!_esp.disconnect()) return -1; + if (!_esp.disconnect()) { + return -1; + } return 0; }