提交 | 用户 | 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 |
|
|
11 |
#include "BoardType.h" |
|
12 |
#include "MyQueue.h" |
|
13 |
|
|
14 |
|
7eb19e
|
15 |
|
483170
|
16 |
|
842bb6
|
17 |
#pragma anon_unions |
483170
|
18 |
typedef struct tagUartStat |
Q |
19 |
{ |
|
20 |
volatile int SendBytes; |
|
21 |
volatile int RecvBytes; |
842bb6
|
22 |
volatile int SentPacket; |
Q |
23 |
union{ |
|
24 |
volatile unsigned char state; |
|
25 |
struct { |
|
26 |
volatile unsigned char bInited:1; |
|
27 |
volatile unsigned char bSending:1; |
|
28 |
volatile unsigned char bRecving:1; |
|
29 |
volatile unsigned char bUseAltRecvBuf:1; |
|
30 |
|
|
31 |
}; |
|
32 |
}; |
|
33 |
volatile unsigned char bPacketRecved; |
|
34 |
volatile unsigned char bSendDone; |
483170
|
35 |
volatile int IRQCount; |
Q |
36 |
volatile int RXNECount; |
|
37 |
volatile int TXECount; |
|
38 |
volatile int PECount; |
|
39 |
volatile int OverRunCount; |
|
40 |
volatile int TcCount; //Transmit Complete |
|
41 |
volatile int IdelCount; //RecvIdel |
842bb6
|
42 |
// volatile int LostBytes; |
483170
|
43 |
volatile int DMACount; |
Q |
44 |
volatile int DMASendLen; |
|
45 |
volatile int DMARecvLen; |
|
46 |
stMyQueue QRx; |
|
47 |
stMyQueue QTx; |
842bb6
|
48 |
|
Q |
49 |
|
|
50 |
// volatile int OKPacket; |
|
51 |
// volatile int TimeOutErr; |
|
52 |
// volatile int NotPacketErr; |
|
53 |
// volatile int LengthErr; |
|
54 |
// volatile int BCCerr; |
483170
|
55 |
}stUartStat; |
Q |
56 |
|
|
57 |
|
|
58 |
extern stUartStat Uart1Stat; |
|
59 |
extern stUartStat Uart2Stat; |
|
60 |
|
842bb6
|
61 |
|
483170
|
62 |
//extern volatile int Uart2BaudGot; |
Q |
63 |
//extern volatile int Uart2BaudFirstGot; |
|
64 |
|
|
65 |
//extern volatile int Uart1DmaInts; |
|
66 |
//extern volatile int Uart2DmaInts; |
|
67 |
|
|
68 |
struct stSysConfig{ |
|
69 |
int bInited:1; |
|
70 |
int bConfiged:1; |
|
71 |
int bKBusMaster:1; |
|
72 |
}; |
|
73 |
|
|
74 |
|
|
75 |
#endif /* __GLOBALDEF_H__ */ |