提交 | 用户 | age
|
842bb6
|
1 |
#include "BoardType.h" |
Q |
2 |
#include "KMachine.h" |
|
3 |
#include "KBus.h" |
|
4 |
|
|
5 |
#define APP_ADDR 0x08001000 //应用程序首地址定义 |
|
6 |
#define APPINFOBLOCK_ADDR (APP_ADDR + 0x100) //程序信息块 地址 |
|
7 |
#define INFOBLOCK_ADDR (APP_ADDR + 0x1000) //信息块 地址 |
|
8 |
|
|
9 |
|
|
10 |
#define APP_START_ADDR IROM1_START_ADDRESS |
|
11 |
extern int Region$$Table$$Limit; |
|
12 |
|
|
13 |
const stAppInfoBlock AppInfoBlock __attribute__((at(APPINFOBLOCK_ADDR))) = |
|
14 |
{ |
|
15 |
0xAA55, // StartSign |
|
16 |
0x0301, // BlockType |
|
17 |
sizeof(stAppInfoBlock), //BlockSize |
|
18 |
0, // Pad, |
|
19 |
0x0109, //AppVer |
|
20 |
(BOARD_TYPE<<8) + BOARD_VER, //AppDevice; |
|
21 |
0x1000, //AppSize; |
|
22 |
0x0C00, //AppDataSize; |
|
23 |
APP_ADDR, //nAppStartAddr |
|
24 |
(int)&Region$$Table$$Limit, //nBtldr_NewAppInfoAddr |
|
25 |
0x08009000, //nBtldr_NewAppAddr |
|
26 |
0xCCCC, //crc16; |
|
27 |
0xAA55 //EndSign; |
|
28 |
|
|
29 |
}; |
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
const stKMInfoBlock KMInfoBlock __attribute__((at(INFOBLOCK_ADDR))) = |
|
34 |
{ |
|
35 |
// sizeof(stKMInfoBlock), |
|
36 |
(BOARD_TYPE<<8) + BOARD_VER, //nDeviceType BOARD_VER, //nDevieVer |
|
37 |
0x0109, //ProgVer |
|
38 |
0x0102, //KLinkVer |
|
39 |
KBUS_VER, //KBusVer |
|
40 |
// 0x0100, //KNetVer |
|
41 |
// 0x0100, //KWLVer |
|
42 |
|
|
43 |
4, //nCapacity1 ?K |
|
44 |
1, //nCapacity2 ?k |
|
45 |
|
|
46 |
DINPUT, //nDInput; |
|
47 |
DOUTPUT, //nDOutput |
|
48 |
|
|
49 |
0, //nAInput |
|
50 |
0, //nAOutput |
|
51 |
0, //nHInput |
|
52 |
0, //nHOutput |
|
53 |
0, //nExt1; |
|
54 |
0, //nExt2; |
|
55 |
0, //nLogSize; |
|
56 |
0, //nPorts; |
|
57 |
0, //nManSize; |
|
58 |
0, //nAbility; |
|
59 |
6, //nSwitchBits; |
|
60 |
}; |
|
61 |
|
|
62 |
const stDeviceInfo MyDeviceInfo={ |
|
63 |
|
|
64 |
(BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 |
|
65 |
0x0109, //ProgVer // unsigned short ClientVer; // 子机版本 |
|
66 |
|
|
67 |
DINPUT, // unsigned char InBitCount; // 输入开关量数量 |
|
68 |
DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 |
|
69 |
0, // unsigned char InDWCount; // 输入数据字数 |
|
70 |
0, // unsigned char OutDWCount; // 输出数据字数 |
|
71 |
0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) |
|
72 |
0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) |
|
73 |
// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 |
|
74 |
// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 |
|
75 |
}; |
|
76 |
|
|
77 |
const stExDeviceInfo MyExDeviceInfo ={ |
|
78 |
(BOARD_TYPE<<8) + BOARD_VER, //nDeviceTypeVer // unsigned short ClientType; // 子机类型 |
|
79 |
0x0109, //ProgVer // unsigned short ClientVer; // 子机版本 |
|
80 |
|
|
81 |
DINPUT, // unsigned char InBitCount; // 输入开关量数量 |
|
82 |
DOUTPUT, // unsigned char OutBitCount; // 输出开关量数量 |
|
83 |
0, // unsigned char InDWCount; // 输入数据字数 |
|
84 |
0, // unsigned char OutDWCount; // 输出数据字数 |
|
85 |
0, // unsigned char AIWCount; // 输入模拟量通道(字)数 // 16位为一个字(通道) |
|
86 |
0, // unsigned char AQWCount; // 输出模拟量通道(字)数 // 16位为一个字(通道) |
|
87 |
// 0, // unsigned char AIBits; // 每通道位数 // 16位以下 |
|
88 |
// 0, // unsigned char AQbits; // 每通道位数 // 16位以下 |
|
89 |
|
|
90 |
}; |
|
91 |
|
|
92 |
|