📄 txc_envoy_database.h
字号:
/*--------------------------------------------------------------------------
******* ****
* ***** ** * * * * * * ***** **** * *
* * * * * ** * * * * * * * * * *
* * * * * * * * **** * * * * * ******
* ***** ****** * * * * * ** * * * * * *
* * * * * * ** * * ** ** * * * * * *
* * * * * * * **** * * * * **** * *
Proprietary and Confidential
This program is made available only to customers and prospective customers
of TranSwitch Corporation under license and may be used only with TranSwitch
semi-conductor products.
Copyright(c) 2004 TranSwitch Inc.
--------------------------------------------------------------------------
******* ** ** ** ** ******** ** **
******* *** ** ** ** ********** ** **
** ** * ** ** ** ** ** ** **
***** ** * ** ** ** ** ** * *
***** ** * ** ** ** ** ** **
** ** * ** ** ** ** ** **
******* ** *** **** ********** **
******* ** ** ** ******** **
--------------------------------------------------------------------------
TranSwitch Envoy-CE2/CE4
Device Driver
--------------------------------------------------------------------------
Workfile: txc_envoy_database.h
Description: This header file contains Envoy database header define
--------------------------------------------------------------------------
Revision History
--------------------------------------------------------------------------
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
#ifndef TXC_ENVOY_DATABASE_H
#define TXC_ENVOY_DATABASE_H
/****************************************************************************
** Defines **
****************************************************************************/
#define ENVOY_CE2_DEVICE_NUMBER 6880 /* data read from device Envoy ID register */
#define ENVOY_CE4_DEVICE_NUMBER 6885
#define ENVOY_CE2_MAX_MAC_PORTS 16
#define ENVOY_CE4_MAX_MAC_PORTS 32
#define ENVOY_CE2_MAX_MAC_PORT_BLOCKS 2
#define ENVOY_CE4_MAX_MAC_PORT_BLOCKS 4
#define ENVOY_MAX_GMII_PORT 4
#define ENVOY_MAX_MAC_TERMS 4
#define ENVOY_CE2_MAX_SPI3_PORTS 16
#define ENVOY_CE4_MAX_SPI3_PORTS 32
#define ENVOY_CE2_MAX_FIFO_PORTS 16
#define ENVOY_CE4_MAX_FIFO_PORTS 32
#define ENVOY_CE2 0
#define ENVOY_CE4 1
/****************************************************************************
** Data Structures **
****************************************************************************/
typedef struct
{
TXC_BOOL deviceActive; /* must be first */
TXC_U16BIT deviceType;
TXC_VOID_PTR baseAddr;
} ENVOY_DEVICE_DATABASE;
typedef struct
{
TXC_BOOL driverActive;
/* required RTOS Resources */
TXC_SEM_ID semId;
/* device specific elements */
ENVOY_DEVICE_DATABASE envoyDeviceData [ENVOY_MAX_DEVICES];
} ENVOY_DRIVER_DATABASE;
/****************************************************************************
** Function Prototypes **
****************************************************************************/
void TXC_ENVOY_InitDatabase (void);
TXC_U16BIT ENVOY_DbVerifyHandle (TXC_U16BIT);
TXC_U16BIT ENVOY_DbGetMaxMacPorts (TXC_U16BIT);
TXC_U16BIT ENVOY_DbGetMaxMacPortBlocks (TXC_U16BIT handle);
TXC_U16BIT ENVOY_DbGetMaxMacPortNum (TXC_U16BIT handle);
TXC_U16BIT ENVOY_DbGetMaxMacTerms (TXC_U16BIT);
TXC_U16BIT ENVOY_DbGetMaxSpi3Ports (TXC_U16BIT handle);
TXC_U16BIT ENVOY_DbGetMaxFifoBports (TXC_U16BIT handle);
TXC_U16BIT ENVOY_DbGetDeviceType (TXC_U16BIT);
TXC_VOID_PTR ENVOY_DbGetDeviceAddr (TXC_U16BIT handle);
TXC_SEM_ID ENVOY_DbGetSemId (void);
/****************************************************************************
** End of Module **
****************************************************************************/
#endif /* TXC_ENVOY_DATABASE_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -