IAP class library for LPC1768, LPC11U24, LPC1114, LPC812 and LPC824
Dependents: MakerBotServer SystemManagement IAP_testing Arch_Pro_TCPSocket ... more
Diff: IAP.h
- Revision:
- 8:1d79b2bb1131
- Parent:
- 7:c8bf974ecb33
--- a/IAP.h Tue Mar 10 04:19:23 2015 +0000 +++ b/IAP.h Thu Aug 16 06:11:23 2018 +0000 @@ -25,6 +25,8 @@ * 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 + * revision 3.1.2 10-Mar-2015 merged with pull requests. reinvoke_isp() added and modified read_serial() to return a pointer. + * revision 3.1.3 16-Aug-2018 "write_page" function added for LPC81X/LPC82X */ @@ -473,6 +475,8 @@ int read_eeprom( char *source_addr, char *target_addr, int size ); #elif defined(TARGET_LPC81X) || defined(TARGET_LPC82X) +#define LPC8XX_SCTR_SIZE 1024 +#define LPC8XX_PAGE_SIZE 64 /** Erase page(s) (LPC812, LPC824) * @@ -482,6 +486,14 @@ */ int erase_page( int start, int end ); + /** Write page (LPC812, LPC824) + * + * @param source_addr Source EEPROM address from which data bytes are to be read. + * @param target_page Target page number. + * @return error code: CMD_SUCCESS | SRC_ADDR_ERROR (Address not a word boundary) | DST_ADDR_ERROR (Address not on correct boundary) | SRC_ADDR_NOT_MAPPED | DST_ADDR_NOT_MAPPED | COUNT_ERROR (Byte count is not 256 | 512 | 1024 | 4096) | SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION | BUSY BUSY | INVALID_SECTOR (error from parepare command) + */ + int write_page( char *source_addr, int target_page ); + #endif private: