LPC11U24 internal EEPROM

Dependents:   ver1_2_2_1

Committer:
okini3939
Date:
Sat Aug 04 11:42:27 2012 +0000
Revision:
1:724b44e46ecf
Parent:
0:c32514e75196
note

Who changed what in which revision?

UserRevisionLine numberNew contents of line
okini3939 1:724b44e46ecf 1 // OKANO's IAP code from
okini3939 1:724b44e46ecf 2 // http://mbed.org/users/okano/notebook/iap-in-application-programming-internal-flash-eras/
okini3939 0:c32514e75196 3 /**
okini3939 0:c32514e75196 4 * @file
okini3939 0:c32514e75196 5 */
okini3939 0:c32514e75196 6
okini3939 0:c32514e75196 7 #define EEPROM_ADDRESS 64
okini3939 0:c32514e75196 8
okini3939 0:c32514e75196 9 /** Copy RAM to EEPROM (LPC11U24)
okini3939 0:c32514e75196 10 *
okini3939 0:c32514e75196 11 * @param source_addr Source RAM address from which data bytes are to be read.
okini3939 0:c32514e75196 12 * @param target_addr Destination EEPROM address where data bytes are to be written.
okini3939 0:c32514e75196 13 * @param size Number of bytes to be written.
okini3939 0:c32514e75196 14 * @return error code: CMD_SUCCESS | SRC_ADDR_NOT_MAPPED | DST_ADDR_NOT_MAPPED
okini3939 0:c32514e75196 15 * Remark: The top 64 bytes of the EEPROM memory are reserved and cannot be written to.
okini3939 0:c32514e75196 16 */
okini3939 0:c32514e75196 17 int write_eeprom( char *source_addr, char *target_addr, int size );
okini3939 0:c32514e75196 18
okini3939 0:c32514e75196 19 /** Copy EEPROM to RAM (LPC11U24)
okini3939 0:c32514e75196 20 *
okini3939 0:c32514e75196 21 * @param source_addr Source EEPROM address from which data bytes are to be read.
okini3939 0:c32514e75196 22 * @param target_addr Destination RAM address where data bytes are to be written.
okini3939 0:c32514e75196 23 * @param size Number of bytes to be written.
okini3939 0:c32514e75196 24 * @return error code: CMD_SUCCESS | SRC_ADDR_NOT_MAPPED | DST_ADDR_NOT_MAPPED
okini3939 0:c32514e75196 25 * Remark: The top 64 bytes of the EEPROM memory are reserved and cannot be written to.
okini3939 0:c32514e75196 26 */
okini3939 0:c32514e75196 27 int read_eeprom( char *source_addr, char *target_addr, int size );
okini3939 0:c32514e75196 28