| | |
| | | |
| | | }; |
| | | |
| | | #define BOARD_TYPE 15 |
| | | #define BOARD_TYPE 16 |
| | | #define BOARD_VER 1 |
| | | |
| | | #if (BOARD_TYPE == 11) |
| | |
| | | |
| | | #define GetBoardType() (BOARD_TYPE) |
| | | |
| | | #define PLCFUNC 1 |
| | | |
| | | #if ( BOARD_TYPE == 1) |
| | | #define DINPUT 4 |
| | | #define DOUTPUT 4 |
| | | #elif (BOARD_TYPE == 2 || BOARD_TYPE == 4 || BOARD_TYPE == 6 || BOARD_TYPE == 8 || BOARD_TYPE == 10 || BOARD_TYPE == 11 || BOARD_TYPE == 16) |
| | | #elif (BOARD_TYPE == 2 || BOARD_TYPE == 4 || BOARD_TYPE == 6 || BOARD_TYPE == 8 || BOARD_TYPE == 10 || BOARD_TYPE == 11 ) |
| | | #define DINPUT 8 |
| | | #define DOUTPUT 8 |
| | | #elif BOARD_TYPE == 3 || BOARD_TYPE == 5 || BOARD_TYPE == 7 || BOARD_TYPE == 9 || BOARD_TYPE == 13 || BOARD_TYPE == 15 |
| | | #elif BOARD_TYPE == 3 || BOARD_TYPE == 5 || BOARD_TYPE == 7 || BOARD_TYPE == 9 || BOARD_TYPE == 13 |
| | | #define DINPUT 16 |
| | | #define DOUTPUT 16 |
| | | #elif BOARD_TYPE == 14 |
| | | #define DINPUT 0 |
| | | #define DOUTPUT 6 |
| | | #elif (BOARD_TYPE == 15) |
| | | #define DINPUT 16 |
| | | #define DOUTPUT 16 |
| | | #elif (BOARD_TYPE == 16) |
| | | #define DINPUT 16 |
| | | #define DOUTPUT 16 |
| | | #define EXDINPUT 8 |
| | | #define EXDOUPUT 8 |
| | | #else |
| | | #define DINPUT 0 |
| | | #define DOUTPUT 0 |
| | | #endif |
| | | |
| | | typedef struct tagInfoBlockHdr { |
| | | unsigned short nBlkSign; // 开始标志 |
| | | unsigned short nBlkTypeVer; // 类型和版本 |
| | | unsigned short nBlkSize; // Block 大小, 包括开始和结束标志 |
| | | unsigned short Pad1; |
| | | }stInfoBlockHdr; |
| | | |
| | | typedef struct tagInfoBlockTail { |
| | | |
| | | unsigned short CRC16; |
| | | unsigned short EndSign; |
| | | }stInfoBlockTail; |
| | | |
| | | typedef struct tagBtLdrInfoBlock { |
| | | stInfoBlockHdr Hdr; |
| | | unsigned short nBtldrVer; |
| | | unsigned short nBtldrDevice; |
| | | unsigned short nBtldrSize; // 设计大小 |
| | | unsigned short nBtldrDataSize; //代码大小 |
| | | unsigned int nBtldr_AppAddr; |
| | | unsigned int nBtldr_NewAppInfoAddr; |
| | | unsigned int nBtldr_NewAppAddr; |
| | | stInfoBlockTail tail; |
| | | }stBtLdrInfoBlock, *pBtLdrInfoBlock; |
| | | |
| | | typedef struct tagAppInfoBlock { |
| | | stInfoBlockHdr Hdr; |
| | | unsigned short nAppVer; |
| | | unsigned short nAppDevice; |
| | | unsigned short nAppSize; // 代码设计大小 |
| | | unsigned short nAppDataSize; //实际代码大小 |
| | | unsigned int nAppStartAddr; |
| | | unsigned int nAppStartOffset; |
| | | unsigned int nApp; |
| | | stInfoBlockTail tail; |
| | | }stAppInfoBlock, * pAppInfoBlock; |
| | | |
| | | |
| | | |
| | | #endif /* __BOARDTYPE_H__ */ |