small test code for IAP

Dependencies:   mbed

Revision:
3:09b4670e337a
Parent:
2:806eb710bbb0
--- a/main.cpp	Sun Feb 08 12:28:24 2015 +0000
+++ b/main.cpp	Sun Feb 08 12:49:25 2015 +0000
@@ -99,4 +99,12 @@
     iap_entry( command, result );
 
     printf( "error code for \"copy from ram to flash\" = %d\r\n", result[ 0 ] );
+
+    command[0]  = 56;                               //  "compare" command
+    command[1]  = (unsigned int)FLASH_TARGET_ADDR;  //  Addrees of Flash
+    command[2]  = (unsigned int)a;                  //  Addrees of Sram
+    command[3]  = 4;                                //  data size (only 4 bytes are compared because it should be multiple of 4)
+    iap_entry( command, result );
+
+    printf( "error code for \"compare\" = %d\r\n", result[ 0 ] );
 }
\ No newline at end of file