/**
|
******************************************************************************
|
* @file : BoardType.h
|
* @brief : Define of BoardType.
|
* This file contains the defines of the BoardType.
|
******************************************************************************
|
*/
|
#ifndef __BOARDTYPE_H__
|
#define __BOARDTYPE_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 USART2_USE_HARDWARE_DE 1
|
#define USART2_DE_ASSERTION_TIME 31
|
#define USART2_DE_DEASSERTION_TIME 31
|
|
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_16 = 15,
|
BOARD_V50_RADIO_8 = 16,
|
|
};
|
|
#define BOARD_TYPE 8
|
#define BOARD_VER 2
|
|
|
#if (BOARD_TYPE == 11)
|
#define XLAT_FREQ 12
|
#elif (BOARD_TYPE == 14)
|
#define XLAT_FREQ 12
|
#else
|
#define XLAT_FREQ 8
|
#endif
|
|
#define GetBoardType() (BOARD_TYPE)
|
|
#if ( BOARD_TYPE == 1)
|
#define DINPUT 4
|
#define DOUTPUT 4
|
#elif (BOARD_TYPE == 2 || BOARD_TYPE == 4 || BOARD_TYPE == 6 || BOARD_TYPE == 8 || BOARD_TYPE == 10 || BOARD_TYPE == 11 || BOARD_TYPE == 16)
|
#define DINPUT 8
|
#define DOUTPUT 8
|
#elif BOARD_TYPE == 3 || BOARD_TYPE == 5 || BOARD_TYPE == 7 || BOARD_TYPE == 9 || BOARD_TYPE == 13 || BOARD_TYPE == 15
|
#define DINPUT 16
|
#define DOUTPUT 16
|
#elif BOARD_TYPE == 14
|
#define DINPUT 0
|
#define DOUTPUT 6
|
#else
|
#define DINPUT 0
|
#define DOUTPUT 0
|
#endif
|
|
typedef struct tagInfoBlockHdr {
|
unsigned short nBlkSign; // ¿ªÊ¼±êÖ¾
|
unsigned short nBlkTypeVer; // ÀàÐͺͰ汾
|
unsigned short nBlkSize; // Block ´óС, °üÀ¨¿ªÊ¼ºÍ½áÊø±êÖ¾
|
unsigned short Pad1;
|
}stInfoBlockHdr;
|
|
typedef struct tagInfoBlockTail {
|
|
unsigned short CRC16;
|
unsigned short EndSign;
|
}stInfoBlockTail;
|
|
typedef struct tagBtLdrInfoBlock {
|
stInfoBlockHdr Hdr;
|
unsigned short nBtldrVer;
|
unsigned short nBtldrDevice;
|
unsigned short nBtldrSize; // Éè¼Æ´óС
|
unsigned short nBtldrDataSize; //´úÂë´óС
|
unsigned int nBtldr_AppAddr;
|
unsigned int nBtldr_NewAppInfoAddr;
|
unsigned int nBtldr_NewAppAddr;
|
stInfoBlockTail tail;
|
}stBtLdrInfoBlock, *pBtLdrInfoBlock;
|
|
typedef struct tagAppInfoBlock {
|
stInfoBlockHdr Hdr;
|
unsigned short nAppVer;
|
unsigned short nAppDevice;
|
unsigned short nAppSize; // ´úÂëÉè¼Æ´óС
|
unsigned short nAppDataSize; //ʵ¼Ê´úÂë´óС
|
unsigned int nAppStartAddr;
|
unsigned int nAppStartOffset;
|
unsigned int nApp;
|
stInfoBlockTail tail;
|
}stAppInfoBlock, * pAppInfoBlock;
|
|
|
#endif /* __BOARDTYPE_H__ */
|