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.
Dependents: IoT_Ex BatteryModelTester BatteryModelTester
Fork of WiflyInterface by
Revision 32:ab206f7f5090, committed 2016-05-12
- Comitter:
- defrost
- Date:
- Thu May 12 16:01:50 2016 +0000
- Parent:
- 31:2846355deb7e
- Child:
- 33:26a14bc6d90e
- Commit message:
- - Added sleep function to put the wifi module to sleep
Changed in this revision
| Wifly/Wifly.cpp | Show annotated file Show diff for this revision Revisions of this file |
| Wifly/Wifly.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/Wifly/Wifly.cpp Mon May 09 11:39:08 2016 +0000
+++ b/Wifly/Wifly.cpp Thu May 12 16:01:50 2016 +0000
@@ -613,4 +613,11 @@
}
return status;
+}
+
+void Wifly::sleep(void){
+ // This function puts the module to sleep:
+ sendCommand("sleep\r", NULL);
+ // It will wake up from sleep if any characters are sent to it.
+ return;
}
\ No newline at end of file
--- a/Wifly/Wifly.h Mon May 09 11:39:08 2016 +0000
+++ b/Wifly/Wifly.h Thu May 12 16:01:50 2016 +0000
@@ -222,6 +222,12 @@
return state.dhcp;
}
+ /**
+ * Puts the module to sleep
+ *
+ */
+ void sleep(void);
+
bool gethostbyname(const char * host, char * ip);
static Wifly * getInstance() {
