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: EthernetNetIf FirmwareUpdater HTTPClient mbed
Revision 0:a3eb8d59a819, committed 2014-11-13
- Comitter:
- vinajarr
- Date:
- Thu Nov 13 07:22:23 2014 +0000
- Commit message:
- Firmware update remote
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetNetIf.lib Thu Nov 13 07:22:23 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mamezu/code/EthernetNetIf/#0f6c82fcde82
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FirmwareUpdater.lib Thu Nov 13 07:22:23 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/shintamainjp/code/FirmwareUpdater/#851bd91fa0ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HTTPClient.lib Thu Nov 13 07:22:23 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mamezu/code/HTTPClient/#62fac7f06c8d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Nov 13 07:22:23 2014 +0000
@@ -0,0 +1,51 @@
+#include "mbed.h"
+#include "FirmwareUpdater.h"
+#include "EthernetNetIf.h"
+
+EthernetNetIf eth;
+FirmwareUpdater fwup("http://mbed.org/media/uploads/vinajarr/", "firm2", true);
+
+DigitalOut myled(LED1); // LED Rojo PB22
+
+
+// There are 2 files for the firmware.
+// 1. firm.txt : firmware version file.
+// 2. firm.bin : firmware binary file.
+
+void check_newfirm() {
+ if (fwup.exist() == 0) {
+ printf("Found a new firmware.\n");
+ if (fwup.execute() == 0) {
+ printf("Update succeed.\n");
+ printf("Resetting this system...\n\n\n\n\n");
+ fwup.reset();
+ } else {
+ printf("Update failed!\n");
+ }
+ }
+ else{
+ printf("Not found a new firmware.\n");
+ printf("actual version: %d \n",fwup.get_);
+ }
+}
+
+int main(void) {
+
+ eth.setup();
+
+ while(1){
+
+ check_newfirm();
+
+ // Your application is here.
+
+ myled = 1;
+ wait(0.1);
+ myled = 0;
+ wait(0.2);
+
+ }
+
+
+
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 13 07:22:23 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e \ No newline at end of file