| | |
| | | //uint32_t * pUID = (uint32_t *)(UID_BASE);
|
| | | const stKMInfoBlock KMInfoBlock =
|
| | | {
|
| | | BOARD_TYPE, //nDeviceType
|
| | | // sizeof(stKMInfoBlock),
|
| | | (BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer
|
| | | 0x0100, //ProgVer
|
| | | 0x0100, //KLinkVer
|
| | | 0x0100, //nCapacity
|
| | | 0x0100, //KBusVer
|
| | | |
| | | 4, //nCapacity1 ?K
|
| | | 1, //nCapacity2 ?k
|
| | | 16, //nDInput;
|
| | | 16, //nDOutput
|
| | | 0, //nAInput
|
| | |
| | | 0, //nHOutput
|
| | | 0, //nExt1;
|
| | | 0, //nExt2;
|
| | | 0, //nLogSize;
|
| | | 0, //nPorts;
|
| | | 0, //nManSize;
|
| | | 0, //nAbility;
|
| | | 6, //nSwitchBits;
|
| | | };
|
| | | const char VersionStr[] __attribute__((at(FLASH_BASE + 0X1000))) //__attribute__((at(0X8001000)))
|
| | | = "3.00";
|
| | |
| | | CFG_VER,
|
| | | 0x0000,
|
| | | 0x0000,
|
| | | {0,0,0,0,0,0},
|
| | | 0x0000,
|
| | | {
|
| | | {
|
| | | 1,
|
| | | 0,
|
| | | 2304, //Buadrate * 100;
|
| | | PortType_KLink, //PorttType
|
| | | 1, //ByteSize
|
| | | 1, //Station
|
| | | 2304, //Buadrate = * 100;
|
| | | 0, //ByteSize
|
| | | 0, //Parity
|
| | | 0, //StopBits
|
| | | 0, //endType
|
| | | 0, //EofChar
|
| | | 0, //SofChar
|
| | | 0, //endtime
|
| | | 0, //recvbuf
|
| | | 0, //bufsize
|
| | | },
|
| | | {
|
| | | 1,
|
| | | 0,
|
| | | 2304, //Buadrate * 100;
|
| | | PortType_KBus, //PorttType
|
| | | 1, //ByteSize
|
| | | 0, //Station
|
| | | 2304, //Buadrate = * 100;
|
| | | 0, //ByteSize
|
| | | 0, //Parity
|
| | | 0, //StopBits
|
| | | 0, //endType
|
| | | 0, //EofChar
|
| | | 0, //SofChar
|
| | | 0, //endtime
|
| | | 0, //recvbuf
|
| | | 0, //bufsize
|
| | | }
|
| | | },
|
| | | {{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}},
|
| | | {{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1},{0,1}},
|
| | | { //default port mapping
|
| | | 0,0,0,0,0,0
|
| | | },
|
| | | 0x0003,
|
| | | 0x0004,
|
| | | 0x0005,
|
| | |
| | | 0x000a,
|
| | | 0x000b,
|
| | | 0x000c,
|
| | | 0x000d,
|
| | | 0x000e,
|
| | | 0x000f,
|
| | | 0x0010,
|
| | | {0},
|
| | |
|
| | | 0x0011,
|
| | | END_SIGN,
|
| | | };
|
| | |
| | | }
|
| | | int WriteFactoryData(void * pDataBuf, int nByteCount)
|
| | | {
|
| | | stFactoryData * p1 = (stFactoryData*) pDataBuf;
|
| | | stFactoryData * p2 = (stFactoryData *)FACTORY_DATA_BASE;
|
| | | p1->Seq1= p2->Seq1+1;
|
| | | |
| | | EraseAndWriteToFlashMem(pDataBuf, (stFactoryData *)FACTORY_DATA_BASE,nByteCount);
|
| | | return 0;
|
| | | }
|