Tedd OKANO
/
test_iap_20150205
small test code for IAP
Revision 3:09b4670e337a, committed 2015-02-08
- Comitter:
- okano
- Date:
- Sun Feb 08 12:49:25 2015 +0000
- Parent:
- 2:806eb710bbb0
- Commit message:
- compare command added
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 806eb710bbb0 -r 09b4670e337a main.cpp --- 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