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.
Dependencies: ATParser
Fork of ESP8266 by
Revision 20:32e5a5a328e0, committed 2016-02-23
- Comitter:
- Christopher Haster
- Date:
- Tue Feb 23 01:29:53 2016 -0600
- Parent:
- 19:8937a010f5b9
- Child:
- 21:1a9b555962b5
- Commit message:
- Added second reset attempt in case device locks into weird state
Changed in this revision
| ESP8266.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ESP8266.cpp Mon Feb 22 23:42:40 2016 +0000
+++ b/ESP8266.cpp Tue Feb 23 01:29:53 2016 -0600
@@ -39,8 +39,14 @@
bool ESP8266::reset(void)
{
- return _parser.send("AT+RST")
- && _parser.recv("OK\r\nready");
+ for (int i = 0; i < 2; i++) {
+ if (_parser.send("AT+RST")
+ && _parser.recv("OK\r\nready")) {
+ return true;
+ }
+ }
+
+ return false;
}
bool ESP8266::dhcp(bool enabled, int mode)
