IAP class library for LPC1768, LPC11U24, LPC1114, LPC1347, LPC1549, LPC812 and LPC824

Fork of IAP by Tedd OKANO

Files at this revision

API Documentation at this revision

Comitter:
yuhki50
Date:
Wed Dec 23 07:55:39 2015 +0000
Parent:
7:c8bf974ecb33
Child:
9:f33e8f9a3677
Commit message:
support LPC13XX

Changed in this revision

IAP.cpp Show annotated file Show diff for this revision Revisions of this file
IAP.h Show annotated file Show diff for this revision Revisions of this file
--- a/IAP.cpp	Tue Mar 10 04:19:23 2015 +0000
+++ b/IAP.cpp	Wed Dec 23 07:55:39 2015 +0000
@@ -33,7 +33,9 @@
 #define     USER_FLASH_AREA_START_STR( x )      STR( x )
 #define     STR( x )                            #x
 
+#if not defined(TARGET_LPC13XX)
 unsigned char user_area[ USER_FLASH_AREA_SIZE ] __attribute__((section( ".ARM.__at_" USER_FLASH_AREA_START_STR( USER_FLASH_AREA_START ) ), zero_init));
+#endif
 
 /*
  *  Reserve of flash area is explained by Igor. Please refer next URL
@@ -57,7 +59,7 @@
     IAPCommand_Compare,
     IAPCommand_Reinvoke_ISP,
     IAPCommand_Read_device_serial_number,
-#if defined(TARGET_LPC11UXX)
+#if defined(TARGET_LPC11UXX) || defined(TARGET_LPC13XX)
     IAPCommand_EEPROM_Write = 61,
     IAPCommand_EEPROM_Read,
 #elif defined(TARGET_LPC81X) || defined(TARGET_LPC82X)
@@ -176,7 +178,7 @@
     return ( USER_FLASH_AREA_SIZE );
 }
 
-#if defined(TARGET_LPC11UXX)
+#if defined(TARGET_LPC11UXX) || defined(TARGET_LPC13XX)
 
 int IAP::write_eeprom( char *source_addr, char *target_addr, int size )
 {
--- a/IAP.h	Tue Mar 10 04:19:23 2015 +0000
+++ b/IAP.h	Wed Dec 23 07:55:39 2015 +0000
@@ -151,7 +151,7 @@
     (char *)FLASH_SECTOR_29
 };
 
-#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC11XX)
+#elif defined(TARGET_LPC11UXX) || defined(TARGET_LPC11XX) || defined(TARGET_LPC13XX)
 
 #define     USER_FLASH_AREA_START   FLASH_SECTOR_7
 #define     USER_FLASH_AREA_SIZE    (FLASH_SECTOR_SIZE * 1)
@@ -450,7 +450,7 @@
      */
     int   reserved_flash_area_size( void );
 
-#if defined(TARGET_LPC11UXX)
+#if defined(TARGET_LPC11UXX) || defined(TARGET_LPC13XX)
 
     /** Copy RAM to EEPROM (LPC11U24)
      *