提交 | 用户 | age
|
483170
|
1 |
/** |
Q |
2 |
****************************************************************************** |
|
3 |
* @file : GlobalDef.h |
|
4 |
* @brief : Header for GlobalDef.c file. |
|
5 |
* This file contains the Global defines of the application. |
|
6 |
****************************************************************************** |
|
7 |
*/ |
|
8 |
#ifndef __GLOBALDEF_H__ |
|
9 |
#define __GLOBALDEF_H__ |
|
10 |
#include "MyQueue.h" |
|
11 |
/* |
|
12 |
0 //old board 4 in 4 out |
|
13 |
1 //old board 8 in 8 out |
|
14 |
2 //Master 16 in16 out |
|
15 |
3 //Slave 8 in 8 out |
|
16 |
4 //New Master 16 in16 out V1.2 |
|
17 |
5 //Slave 8 in 8 out V1.2 |
|
18 |
*/ |
|
19 |
|
|
20 |
|
|
21 |
#define DefaultUart1Baud 230400 |
|
22 |
#define DefaultUart2Baud 1000000 |
|
23 |
|
|
24 |
enum enBOARD_TYPE |
|
25 |
{ |
|
26 |
BOARD_UNKNOWN =0, |
|
27 |
BOARD_OLD4=1, // 1 //old board 4 in 4 o |
|
28 |
BOARD_OLD8, //2 old board 8 in 8 o |
|
29 |
BOARD_MASTER, //3 Master 16 in16 o |
|
30 |
BOARD_SLAVE, //4 Slave 8 in 8 o |
|
31 |
BOARD_NEW_MASTER, //5 New Master 16 in16 o |
|
32 |
BOARD_NEW_SLAVE, //6 New Slave 8 in 8 o |
|
33 |
BOARD_V4_MASTER, //7 New V4 Master 16 in16 o |
|
34 |
BOARD_V4_SLAVE, //8 New V4 Slave 8 in 8 o |
|
35 |
BOARD_V42_MASTER, //9 New V4.2 Master 16 in16 o |
|
36 |
BOARD_V42_SLAVE, //10 New V4.2 Slave 8 in 8 o |
|
37 |
|
|
38 |
BOARD_V30_MINI =11, //11 Mini Board |
|
39 |
|
|
40 |
BOARD_V45_NET = 13, |
|
41 |
|
|
42 |
BOARD_EXT_FP0 = 14, |
|
43 |
|
|
44 |
BOARD_V50_RADIO = 15, |
|
45 |
}; |
|
46 |
|
|
47 |
#define BOARD_TYPE 9 |
|
48 |
#define XLAT_FREQ 8 |
|
49 |
|
|
50 |
|
|
51 |
#define GetBoardType() (BOARD_TYPE) |
|
52 |
|
|
53 |
extern volatile int PendSvCount; |
|
54 |
|
|
55 |
typedef struct tagUartStat |
|
56 |
{ |
|
57 |
volatile int Inited; |
|
58 |
volatile int RecvBytes; |
|
59 |
volatile int SendBytes; |
|
60 |
volatile int Sending; |
|
61 |
volatile int Recving; |
|
62 |
volatile int UseAltRecvBuf; |
|
63 |
volatile int IntCount; |
|
64 |
volatile int RXNECount; |
|
65 |
volatile int TXECount; |
|
66 |
volatile int PECount; |
|
67 |
volatile int OverRunCount; |
|
68 |
volatile int TcCount; //Transmit Complete |
|
69 |
volatile int IdelCount; //RecvIdel |
|
70 |
volatile int LostBytes; |
|
71 |
volatile int DMACount; |
|
72 |
volatile int DMASendLen; |
|
73 |
volatile int DMARecvLen; |
|
74 |
stMyQueue QRx; |
|
75 |
stMyQueue QTx; |
|
76 |
volatile int SentPacket; |
|
77 |
volatile int bPacketRecved; |
|
78 |
volatile int OKPacket; |
|
79 |
volatile int TimeOutErr; |
|
80 |
volatile int NotPacketErr; |
|
81 |
volatile int LengthErr; |
|
82 |
volatile int BCCerr; |
|
83 |
}stUartStat; |
|
84 |
|
|
85 |
|
|
86 |
extern stUartStat Uart1Stat; |
|
87 |
extern stUartStat Uart2Stat; |
|
88 |
|
|
89 |
extern unsigned int Uart1Baud; |
|
90 |
extern unsigned int Uart2Baud; |
|
91 |
|
|
92 |
extern unsigned char Uart1RecvBuf1[128]; |
|
93 |
extern int Uart1RecvBuf1DataLen; |
|
94 |
extern unsigned char Uart1RecvBuf2[128]; |
|
95 |
extern int Uart1RecvBuf2DataLen; |
|
96 |
|
|
97 |
extern unsigned char Uart2RecvBuf1[128]; |
|
98 |
extern int Uart2RecvBuf1DataLen; |
|
99 |
extern unsigned char Uart2RecvBuf2[128]; |
|
100 |
extern int Uart2RecvBuf2DataLen; |
|
101 |
|
|
102 |
extern volatile int Uart1BaudGot; |
|
103 |
extern volatile int Uart1BaudFirstGot; |
|
104 |
extern volatile int Uart2BaudGot; |
|
105 |
extern volatile int Uart2BaudFirstGot; |
|
106 |
|
|
107 |
extern volatile int Uart1DmaInts; |
|
108 |
extern volatile int Uart2DmaInts; |
|
109 |
|
|
110 |
struct stSysConfig{ |
|
111 |
int bInited:1; |
|
112 |
int bConfiged:1; |
|
113 |
int bKBusMaster:1; |
|
114 |
}; |
|
115 |
|
|
116 |
|
|
117 |
#endif /* __GLOBALDEF_H__ */ |