提交 | 用户 | 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 |
|
eaf5d5
|
14 |
#define DefaultUart1Baud 115200 |
483170
|
15 |
#define DefaultUart2Baud 1000000 |
Q |
16 |
#define AlterUart2Baud 500000 |
|
17 |
|
|
18 |
extern volatile int PendSvCount; |
|
19 |
|
|
20 |
typedef struct tagUartStat |
|
21 |
{ |
|
22 |
volatile int SendBytes; |
|
23 |
volatile int RecvBytes; |
|
24 |
volatile char bInited; |
|
25 |
volatile char bSending; |
|
26 |
volatile char bRecving; |
|
27 |
volatile char bUseAltRecvBuf; |
|
28 |
volatile int IRQCount; |
|
29 |
volatile int RXNECount; |
|
30 |
volatile int TXECount; |
|
31 |
volatile int PECount; |
|
32 |
volatile int OverRunCount; |
|
33 |
volatile int TcCount; //Transmit Complete |
|
34 |
volatile int IdelCount; //RecvIdel |
|
35 |
volatile int LostBytes; |
|
36 |
volatile int DMACount; |
|
37 |
volatile int DMASendLen; |
|
38 |
volatile int DMARecvLen; |
|
39 |
stMyQueue QRx; |
|
40 |
stMyQueue QTx; |
|
41 |
volatile int SentPacket; |
|
42 |
volatile int bPacketRecved; |
|
43 |
volatile int OKPacket; |
|
44 |
volatile int TimeOutErr; |
|
45 |
volatile int NotPacketErr; |
|
46 |
volatile int LengthErr; |
|
47 |
volatile int BCCerr; |
|
48 |
}stUartStat; |
|
49 |
|
|
50 |
|
|
51 |
extern stUartStat Uart1Stat; |
|
52 |
extern stUartStat Uart2Stat; |
|
53 |
|
|
54 |
extern unsigned int Uart1Baud; |
|
55 |
extern unsigned int Uart2Baud; |
|
56 |
|
|
57 |
extern unsigned char Uart1RecvBuf1[128]; |
|
58 |
extern int Uart1RecvBuf1DataLen; |
|
59 |
//extern unsigned char Uart1RecvBuf2[128]; |
|
60 |
//extern int Uart1RecvBuf2DataLen; |
|
61 |
|
|
62 |
extern unsigned char Uart2RecvBuf1[128]; |
|
63 |
extern int Uart2RecvBuf1DataLen; |
|
64 |
//extern unsigned char Uart2RecvBuf2[128]; |
|
65 |
//extern int Uart2RecvBuf2DataLen; |
|
66 |
|
|
67 |
extern volatile int Uart1BaudGot; |
|
68 |
extern volatile int Uart1BaudFirstGot; |
|
69 |
//extern volatile int Uart2BaudGot; |
|
70 |
//extern volatile int Uart2BaudFirstGot; |
|
71 |
|
|
72 |
//extern volatile int Uart1DmaInts; |
|
73 |
//extern volatile int Uart2DmaInts; |
|
74 |
|
|
75 |
struct stSysConfig{ |
|
76 |
int bInited:1; |
|
77 |
int bConfiged:1; |
|
78 |
int bKBusMaster:1; |
|
79 |
}; |
|
80 |
|
|
81 |
|
|
82 |
#endif /* __GLOBALDEF_H__ */ |