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.
Fork of IAP_internal_flash_write by
Revision 5:806960ca964e, committed 2015-01-16
- Comitter:
- okano
- Date:
- Fri Jan 16 08:00:33 2015 +0000
- Parent:
- 4:5705a494169a
- Child:
- 6:2357a04a16ff
- Commit message:
- ver3.1.1 : Compile switch word has been changed for better MCU compatibility across platforms
Changed in this revision
| IAP.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/IAP.lib Tue Jan 13 09:11:47 2015 +0000 +++ b/IAP.lib Fri Jan 16 08:00:33 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/okano/code/IAP/#87e117b1bdf2 +http://mbed.org/users/okano/code/IAP/#cee1a2a734c9
--- a/main.cpp Tue Jan 13 09:11:47 2015 +0000
+++ b/main.cpp Fri Jan 16 08:00:33 2015 +0000
@@ -40,8 +40,9 @@
* revision 2.0 26-Nov.2012 LPC11U24 code added
* revision 2.1 26-Nov-2012 EEPROM access code imported from Suga koubou san's (http://mbed.org/users/okini3939/) library
* http://mbed.org/users/okini3939/code/M0_EEPROM_test/
- * revision 3.0 09-Jan-2014 LPC812 and LPC824 support added
- * revision 3.1 13-Jan-2014 LPC1114 support added
+ * revision 3.0 09-Jan-2015 LPC812 and LPC824 support added
+ * revision 3.1 13-Jan-2015 LPC1114 support added
+ * revision 3.1.1 16-Jan-2015 Target MCU name changed for better compatibility across the platforms
*/
#include "mbed.h"
@@ -49,13 +50,13 @@
#define MEM_SIZE 256
-#if defined(TARGET_LPC1768)
+#if defined(TARGET_LPC176X)
#define TARGET_SECTOR 29 // use sector 29 as target sector if it is on LPC1768
-#elif defined(TARGET_LPC11U24) || defined(TARGET_LPC1114)
+#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC11XX)
#define TARGET_SECTOR 7 // use sector 7 as target sector if it is on LPC11U24
#define TARGET_EEPROM_ADDRESS 64
#define TARGET_EEPROM_ADDRESS 64
-#elif defined(TARGET_LPC812) || defined(TARGET_LPC824)
+#elif defined(TARGET_LPC81X) || defined(TARGET_LPC82X)
#define TARGET_SECTOR 15 // use sector 15 as target sector if it is on LPC812
#endif
@@ -122,7 +123,7 @@
memdump( sector_start_adress[ TARGET_SECTOR ], MEM_SIZE * 3 );
-#if defined(TARGET_LPC812) || defined(TARGET_LPC824)
+#if defined(TARGET_LPC81X) || defined(TARGET_LPC82X)
iap.prepare( TARGET_SECTOR, TARGET_SECTOR );
r = iap.erase_page( 241, 241 ); // 241 is page number for sector 7 with 64 byte offset
@@ -134,7 +135,7 @@
#endif
-#if defined(TARGET_LPC11U24) // SAMPLE OF EEPROM ACCESS (LPC11U24 only)
+#if defined(TARGET_LPC11UXX) // SAMPLE OF EEPROM ACCESS (LPC11U24 only)
printf( "IAP: EEPROM writing test\r\n" );
char mem2[ MEM_SIZE ];
