Loop based controller for dual lane siemens siplace feeder.

Dependencies:   USBDevice mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IAP_LPC11U.h Source File

IAP_LPC11U.h

00001 #if defined(TARGET_LPC11UXX) | defined(TARGET_LPC11U6X)
00002  
00003 #ifndef IAP_LPC11UXX_H
00004 #define IAP_LPC11UXX_H
00005  
00006 #include "mbed.h"
00007  
00008 //128-bit unique ID struct typedef
00009 struct UID {
00010     unsigned int word0; /**< Word 0 of 128-bit UID (bits 31 to 0) */
00011     unsigned int word1; /**< Word 1 of 128-bit UID (bits 63 to 32) */
00012     unsigned int word2; /**< Word 2 of 128-bit UID (bits 95 to 64) */
00013     unsigned int word3; /**< Word 3 of 128-bit UID (bits 127 to 96) */
00014 };
00015  
00016 //IAP return code enumeration
00017 enum IapReturnCode {
00018     IAP_CMD_SUCCESS = 0,
00019     IAP_INVALID_COMMAND,
00020     IAP_SRC_ADDR_ERROR,
00021     IAP_DST_ADDR_ERROR,
00022     IAP_SRC_ADDR_NOT_MAPPED,
00023     IAP_DST_ADDR_NOT_MAPPED,
00024     IAP_COUNT_ERROR,
00025     IAP_INVALID_SECTOR,
00026     IAP_SECTOR_NOT_BLANK,
00027     IAP_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION,
00028     IAP_COMPARE_ERROR,
00029     IAP_BUSY
00030 };
00031  
00032 //Function prototypes
00033 IapReturnCode IAP_PrepareSectors(unsigned int sector_start, unsigned int sector_end);
00034 IapReturnCode IAP_CopyRAMToFlash(void* ram_address, void* flash_address, unsigned int length);
00035 IapReturnCode IAP_EraseSectors(unsigned int sector_start, unsigned int sector_end);
00036 IapReturnCode IAP_BlankCheckSectors(unsigned int sector_start, unsigned int sector_end);
00037 unsigned int IAP_ReadPartID();
00038 unsigned short IAP_ReadBootCodeVersion();
00039 IapReturnCode IAP_Compare(void* address1, void* address2, unsigned int bytes);
00040 void IAP_ReinvokeISP();
00041 UID IAP_ReadUID();
00042 IapReturnCode IAP_ErasePage(unsigned int page_start, unsigned int page_end);
00043 IapReturnCode IAP_WriteEEPROM(unsigned int ee_address, char* buffer, unsigned int length);
00044 IapReturnCode IAP_ReadEEPROM(unsigned int ee_address, char* buffer, unsigned int length);
00045  
00046 #endif
00047  
00048 #endif