/** ****************************************************************************** * @file : GlobalDef.h * @brief : Header for GlobalDef.c file. * This file contains the Global defines of the application. ****************************************************************************** */ #ifndef __GLOBALDEF_H__ #define __GLOBALDEF_H__ #include "BoardType.h" #include "MyQueue.h" #pragma anon_unions typedef struct tagUartStat { volatile int SendBytes; volatile int RecvBytes; volatile int SentPacket; union{ volatile unsigned char state; struct { volatile unsigned char bInited:1; volatile unsigned char bSending:1; volatile unsigned char bRecving:1; volatile unsigned char bUseAltRecvBuf:1; }; }; volatile unsigned char bPacketRecved; volatile unsigned char bSendDone; volatile int IRQCount; volatile int RXNECount; volatile int TXECount; volatile int PECount; volatile int OverRunCount; volatile int TcCount; //Transmit Complete volatile int IdelCount; //RecvIdel // volatile int LostBytes; volatile int DMACount; volatile int DMASendLen; volatile int DMARecvLen; stMyQueue QRx; stMyQueue QTx; // volatile int OKPacket; // volatile int TimeOutErr; // volatile int NotPacketErr; // volatile int LengthErr; // volatile int BCCerr; }stUartStat; extern stUartStat Uart1Stat; extern stUartStat Uart2Stat; //extern volatile int Uart2BaudGot; //extern volatile int Uart2BaudFirstGot; //extern volatile int Uart1DmaInts; //extern volatile int Uart2DmaInts; struct stSysConfig{ int bInited:1; int bConfiged:1; int bKBusMaster:1; }; #endif /* __GLOBALDEF_H__ */