Loop based controller for dual lane siemens siplace feeder.
IAP_LPC11U.h@1:4d3738338cf1, 2017-02-04 (annotated)
- Committer:
- Issus
- Date:
- Sat Feb 04 01:27:29 2017 +0000
- Revision:
- 1:4d3738338cf1
Minimum on time for cover tape pickup. Added IAP for getting mcu serial number and future eeprom use. Moved defs to .h file.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Issus | 1:4d3738338cf1 | 1 | #if defined(TARGET_LPC11UXX) | defined(TARGET_LPC11U6X) |
| Issus | 1:4d3738338cf1 | 2 | |
| Issus | 1:4d3738338cf1 | 3 | #ifndef IAP_LPC11UXX_H |
| Issus | 1:4d3738338cf1 | 4 | #define IAP_LPC11UXX_H |
| Issus | 1:4d3738338cf1 | 5 | |
| Issus | 1:4d3738338cf1 | 6 | #include "mbed.h" |
| Issus | 1:4d3738338cf1 | 7 | |
| Issus | 1:4d3738338cf1 | 8 | //128-bit unique ID struct typedef |
| Issus | 1:4d3738338cf1 | 9 | struct UID { |
| Issus | 1:4d3738338cf1 | 10 | unsigned int word0; /**< Word 0 of 128-bit UID (bits 31 to 0) */ |
| Issus | 1:4d3738338cf1 | 11 | unsigned int word1; /**< Word 1 of 128-bit UID (bits 63 to 32) */ |
| Issus | 1:4d3738338cf1 | 12 | unsigned int word2; /**< Word 2 of 128-bit UID (bits 95 to 64) */ |
| Issus | 1:4d3738338cf1 | 13 | unsigned int word3; /**< Word 3 of 128-bit UID (bits 127 to 96) */ |
| Issus | 1:4d3738338cf1 | 14 | }; |
| Issus | 1:4d3738338cf1 | 15 | |
| Issus | 1:4d3738338cf1 | 16 | //IAP return code enumeration |
| Issus | 1:4d3738338cf1 | 17 | enum IapReturnCode { |
| Issus | 1:4d3738338cf1 | 18 | IAP_CMD_SUCCESS = 0, |
| Issus | 1:4d3738338cf1 | 19 | IAP_INVALID_COMMAND, |
| Issus | 1:4d3738338cf1 | 20 | IAP_SRC_ADDR_ERROR, |
| Issus | 1:4d3738338cf1 | 21 | IAP_DST_ADDR_ERROR, |
| Issus | 1:4d3738338cf1 | 22 | IAP_SRC_ADDR_NOT_MAPPED, |
| Issus | 1:4d3738338cf1 | 23 | IAP_DST_ADDR_NOT_MAPPED, |
| Issus | 1:4d3738338cf1 | 24 | IAP_COUNT_ERROR, |
| Issus | 1:4d3738338cf1 | 25 | IAP_INVALID_SECTOR, |
| Issus | 1:4d3738338cf1 | 26 | IAP_SECTOR_NOT_BLANK, |
| Issus | 1:4d3738338cf1 | 27 | IAP_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION, |
| Issus | 1:4d3738338cf1 | 28 | IAP_COMPARE_ERROR, |
| Issus | 1:4d3738338cf1 | 29 | IAP_BUSY |
| Issus | 1:4d3738338cf1 | 30 | }; |
| Issus | 1:4d3738338cf1 | 31 | |
| Issus | 1:4d3738338cf1 | 32 | //Function prototypes |
| Issus | 1:4d3738338cf1 | 33 | IapReturnCode IAP_PrepareSectors(unsigned int sector_start, unsigned int sector_end); |
| Issus | 1:4d3738338cf1 | 34 | IapReturnCode IAP_CopyRAMToFlash(void* ram_address, void* flash_address, unsigned int length); |
| Issus | 1:4d3738338cf1 | 35 | IapReturnCode IAP_EraseSectors(unsigned int sector_start, unsigned int sector_end); |
| Issus | 1:4d3738338cf1 | 36 | IapReturnCode IAP_BlankCheckSectors(unsigned int sector_start, unsigned int sector_end); |
| Issus | 1:4d3738338cf1 | 37 | unsigned int IAP_ReadPartID(); |
| Issus | 1:4d3738338cf1 | 38 | unsigned short IAP_ReadBootCodeVersion(); |
| Issus | 1:4d3738338cf1 | 39 | IapReturnCode IAP_Compare(void* address1, void* address2, unsigned int bytes); |
| Issus | 1:4d3738338cf1 | 40 | void IAP_ReinvokeISP(); |
| Issus | 1:4d3738338cf1 | 41 | UID IAP_ReadUID(); |
| Issus | 1:4d3738338cf1 | 42 | IapReturnCode IAP_ErasePage(unsigned int page_start, unsigned int page_end); |
| Issus | 1:4d3738338cf1 | 43 | IapReturnCode IAP_WriteEEPROM(unsigned int ee_address, char* buffer, unsigned int length); |
| Issus | 1:4d3738338cf1 | 44 | IapReturnCode IAP_ReadEEPROM(unsigned int ee_address, char* buffer, unsigned int length); |
| Issus | 1:4d3738338cf1 | 45 | |
| Issus | 1:4d3738338cf1 | 46 | #endif |
| Issus | 1:4d3738338cf1 | 47 | |
| Issus | 1:4d3738338cf1 | 48 | #endif |
Mark Harris