LPCOpen Platform for LPC112X microcontrollers  112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
Macros | Typedefs | Functions
iap.h File Reference

Go to the source code of this file.

Macros

#define IAP_PREWRRITE_CMD   50
 
#define IAP_WRISECTOR_CMD   51
 
#define IAP_ERSSECTOR_CMD   52
 
#define IAP_BLANK_CHECK_SECTOR_CMD   53
 
#define IAP_REPID_CMD   54
 
#define IAP_READ_BOOT_CODE_CMD   55
 
#define IAP_COMPARE_CMD   56
 
#define IAP_REINVOKE_ISP_CMD   57
 
#define IAP_READ_UID_CMD   58
 
#define IAP_ERASE_PAGE_CMD   59
 
#define IAP_EEPROM_WRITE   61
 
#define IAP_EEPROM_READ   62
 
#define IAP_CMD_SUCCESS   0
 
#define IAP_INVALID_COMMAND   1
 
#define IAP_SRC_ADDR_ERROR   2
 
#define IAP_DST_ADDR_ERROR   3
 
#define IAP_SRC_ADDR_NOT_MAPPED   4
 
#define IAP_DST_ADDR_NOT_MAPPED   5
 
#define IAP_COUNT_ERROR   6
 
#define IAP_INVALID_SECTOR   7
 
#define IAP_SECTOR_NOT_BLANK   8
 
#define IAP_SECTOR_NOT_PREPARED   9
 
#define IAP_COMPARE_ERROR   10
 
#define IAP_BUSY   11
 
#define IAP_PARAM_ERROR   12
 
#define IAP_ADDR_ERROR   13
 
#define IAP_ADDR_NOT_MAPPED   14
 
#define IAP_CMD_LOCKED   15
 
#define IAP_INVALID_CODE   16
 
#define IAP_INVALID_BAUD_RATE   17
 
#define IAP_INVALID_STOP_BIT   18
 
#define IAP_CRP_ENABLED   19
 

Typedefs

typedef void(* IAP_ENTRY_T )(unsigned int[], unsigned int[])
 

Functions

uint8_t Chip_IAP_PreSectorForReadWrite (uint32_t strSector, uint32_t endSector)
 Prepare sector for write operation. More...
 
uint8_t Chip_IAP_CopyRamToFlash (uint32_t dstAdd, uint32_t *srcAdd, uint32_t byteswrt)
 Copy RAM to flash. More...
 
uint8_t Chip_IAP_EraseSector (uint32_t strSector, uint32_t endSector)
 Erase sector. More...
 
uint8_t Chip_IAP_BlankCheckSector (uint32_t strSector, uint32_t endSector)
 Blank check a sector or multiples sector of on-chip flash memory. More...
 
uint32_t Chip_IAP_ReadPID (void)
 Read part identification number. More...
 
uint32_t Chip_IAP_ReadBootCode (void)
 Read boot code version number. More...
 
uint8_t Chip_IAP_Compare (uint32_t dstAdd, uint32_t srcAdd, uint32_t bytescmp)
 Compare the memory contents at two locations. More...
 
uint8_t Chip_IAP_ReinvokeISP (void)
 IAP reinvoke ISP to invoke the bootloader in ISP mode. More...
 
uint32_t Chip_IAP_ReadUID (uint32_t *uid)
 Read the unique ID. More...
 
uint8_t Chip_IAP_ErasePage (uint32_t strPage, uint32_t endPage)
 Erase a page or multiple papers of on-chip flash memory. More...