Vesrion IAP with LPC11U24_EEPROM_ONLY options

Fork of IAP by Tedd OKANO

This is IAP library from http://mbed.org/users/okano/notebook/iap-in-application-programming-internal-flash-eras/ Added option LPC11U24_EEPROM_ONLY in IAP.h that disable flash write/read functions if they not needed and working only EEPROM write/read functions. It make for clear memory allocation for flash write functions (4k).

Revision:
2:0c7ec806673e
Parent:
1:ff906ad52cf9
--- a/IAP.cpp	Mon Nov 26 06:02:24 2012 +0000
+++ b/IAP.cpp	Sat Dec 28 21:01:05 2013 +0000
@@ -30,8 +30,9 @@
 #define     USER_FLASH_AREA_START_STR( x )      STR( x )
 #define     STR( x )                            #x
 
+#ifndef LPC11U24_EEPROM_ONLY
 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
@@ -102,6 +103,7 @@
  *  @return error code: CMD_SUCCESS | BUSY | SECTOR_NOT_BLANK | INVALID_SECTOR
  */
 
+#ifndef LPC11U24_EEPROM_ONLY
 int IAP::blank_check( int start, int end ) {
     IAP_command[ 0 ]    = IAPCommand_Blank_check_sector;
     IAP_command[ 1 ]    = (unsigned int)start;  //  Start Sector Number
@@ -227,6 +229,7 @@
 {
     return ( USER_FLASH_AREA_SIZE );
 }
+#endif
 
 #if defined(TARGET_LPC11U24)
 /** Copy RAM to EEPROM (LPC11U24)