/**
|
******************************************************************************
|
* @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 "MyQueue.h"
|
/*
|
0 //old board 4 in 4 out
|
1 //old board 8 in 8 out
|
2 //Master 16 in16 out
|
3 //Slave 8 in 8 out
|
4 //New Master 16 in16 out V1.2
|
5 //Slave 8 in 8 out V1.2
|
*/
|
|
|
#define DefaultUart1Baud 230400
|
#define DefaultUart2Baud 1000000
|
|
enum enBOARD_TYPE
|
{
|
BOARD_UNKNOWN =0,
|
BOARD_OLD4=1, // 1 //old board 4 in 4 o
|
BOARD_OLD8, //2 old board 8 in 8 o
|
BOARD_MASTER, //3 Master 16 in16 o
|
BOARD_SLAVE, //4 Slave 8 in 8 o
|
BOARD_NEW_MASTER, //5 New Master 16 in16 o
|
BOARD_NEW_SLAVE, //6 New Slave 8 in 8 o
|
BOARD_V4_MASTER, //7 New V4 Master 16 in16 o
|
BOARD_V4_SLAVE, //8 New V4 Slave 8 in 8 o
|
BOARD_V42_MASTER, //9 New V4.2 Master 16 in16 o
|
BOARD_V42_SLAVE, //10 New V4.2 Slave 8 in 8 o
|
|
BOARD_V30_MINI =11, //11 Mini Board
|
|
BOARD_V45_NET = 13,
|
|
BOARD_EXT_FP0 = 14,
|
|
BOARD_V50_RADIO = 15,
|
};
|
|
#define BOARD_TYPE 15
|
#define XLAT_FREQ 8
|
|
|
#define GetBoardType() (BOARD_TYPE)
|
|
extern volatile int PendSvCount;
|
|
typedef struct tagUartStat
|
{
|
volatile int Inited;
|
volatile int RecvBytes;
|
volatile int SendBytes;
|
volatile int Sending;
|
volatile int Recving;
|
volatile int UseAltRecvBuf;
|
volatile int IntCount;
|
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 SentPacket;
|
volatile int bPacketRecved;
|
volatile int OKPacket;
|
volatile int TimeOutErr;
|
volatile int NotPacketErr;
|
volatile int LengthErr;
|
volatile int BCCerr;
|
}stUartStat;
|
|
|
extern stUartStat Uart1Stat;
|
extern stUartStat Uart2Stat;
|
|
extern unsigned int Uart1Baud;
|
extern unsigned int Uart2Baud;
|
|
extern unsigned char Uart1RecvBuf1[128];
|
extern int Uart1RecvBuf1DataLen;
|
extern unsigned char Uart1RecvBuf2[128];
|
extern int Uart1RecvBuf2DataLen;
|
|
extern unsigned char Uart2RecvBuf1[128];
|
extern int Uart2RecvBuf1DataLen;
|
extern unsigned char Uart2RecvBuf2[128];
|
extern int Uart2RecvBuf2DataLen;
|
|
extern volatile int Uart1BaudGot;
|
extern volatile int Uart1BaudFirstGot;
|
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__ */
|