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.
Diff: tests/blocking/wiconnect/WiconnectTests.cpp
- Revision:
- 22:26420b641605
- Parent:
- 12:3dd3a1be40c1
--- a/tests/blocking/wiconnect/WiconnectTests.cpp Tue Aug 26 23:57:16 2014 +0000
+++ b/tests/blocking/wiconnect/WiconnectTests.cpp Thu Oct 23 15:17:15 2014 -0700
@@ -123,6 +123,37 @@
}
return result;
}
+
+/*************************************************************************************************/
+WiconnectResult wiconnectUpdateFirmwareCommand(int argc, char **argv)
+{
+ WiconnectResult result;
+ bool forceUpdate = false;
+ const char *version = NULL;
+ Wiconnect *wiconnect = Wiconnect::getInstance();
+
+ if(argc > 0)
+ {
+ if(strcmp(argv[0], "-f") == 0)
+ {
+ forceUpdate = true;
+ }
+ else
+ {
+ version = argv[0];
+ }
+ }
+
+ if(!WICONNECT_FAILED(result, wiconnect->updateFirmware(forceUpdate, version)))
+ {
+ wiconnect->getVersion();
+ LOG_INFO("Success!");
+ LOG_INFO("Firmware version: %s", wiconnect->getResponseBuffer());
+ }
+
+ return result;
+}
+
/*************************************************************************************************/
WiconnectResult wiconnectDebugEnableCommand(int argc, char **argv)