SWUpdate library to be used with RPC.

Fork of SWUpdate by David Smart

Revision:
16:de99e872fc9d
Parent:
15:49cc43dcbbf6
Child:
17:1d318666246c
--- a/SWUpdate.h	Sat Jun 28 19:46:46 2014 +0000
+++ b/SWUpdate.h	Sat Jul 05 16:06:55 2014 +0000
@@ -106,8 +106,8 @@
 
 // This defines the maximum string length for a fully qualified
 // filename. Usually, this will be pretty short 
-// (e.g. "/local/myprog.bin"), but we want to be generous.
-#define SW_MAX_FQFN 30
+// (e.g. "/local/myprog.bin"), which should be 19 max with 8.3 filename.
+#define SW_MAX_FQFN 20
 
 // This defines the maximum string length for the url, including
 // the base filename of interest.
@@ -139,6 +139,13 @@
 /// server URL that is hosting the embedded software. We also give it 
 /// the "root" name of the file of interest, which permits you to
 /// have different applications served from the same location. 
+/// 
+/// Note that the root name can be a long filename, as is typically 
+/// produced from the cloud-based build process. This name will
+/// be truncated to the first 6 characters when installed on the
+/// mbed local file system, in order to retain space for a 2-digit
+/// version number.
+///
 /// One optional parameter lets you decide what happens if a new 
 /// version is installed - automatically reboot to launch it, or
 /// return to the calling program which may perform a more orderly
@@ -147,7 +154,7 @@
 /// @code
 ///     ...
 ///     if (NowIsTheTimeToCheckForSoftwareUpdates()) {
-///         if (SWUP_OK == SoftwareUpdate("http://192.168.1.200", "myprog", DEFER_REBOOT)) {
+///         if (SWUP_OK == SoftwareUpdate("http://192.168.1.200/path/to/file", "myprog_LPC1768", DEFER_REBOOT)) {
 ///             printf("Software updated, rebooting now...\r\n");
 ///             wait_ms(5000);
 ///             mbed_reset();