📄 txc_envoy_database.c
字号:
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT ENVOY_DbGetMaxMacPortBlocks (TXC_U16BIT handle)
{
TXC_U16BIT deviceType;
/* First, get the device type. */
deviceType = ENVOY_DbGetDeviceType (handle);
if (deviceType == ENVOY_CE2)
{
return ENVOY_CE2_MAX_MAC_PORT_BLOCKS;
}
else if (deviceType == ENVOY_CE4)
{
return ENVOY_CE4_MAX_MAC_PORT_BLOCKS;
}
else
return 0;
}
/*--------------------------------------------------------------------------*
FUNCTION: ENVOY_DbGetMaxSpi3Ports
DESCRIPTION: This function returns the maximum allowable SPI-3 ports.
INPUTS: handle
RETURNS: maximum allowable SPI-3 ports.
CAVEATS: None
REVISION HISTORY:
Date Author Description
------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT ENVOY_DbGetMaxSpi3Ports (TXC_U16BIT handle)
{
TXC_U16BIT deviceType;
/* First, get the device type. */
deviceType = ENVOY_DbGetDeviceType (handle);
if (deviceType == ENVOY_CE2)
{
return ENVOY_CE2_MAX_SPI3_PORTS;
}
else if (deviceType == ENVOY_CE4)
{
return ENVOY_CE4_MAX_SPI3_PORTS;
}
else
return 0;
}
/*--------------------------------------------------------------------------*
FUNCTION: ENVOY_DbGetMaxFifoBports
DESCRIPTION: This function returns the maximum allowable PBCB ports.
INPUTS: handle
RETURNS: maximum allowable PBCB ports.
CAVEATS: None
REVISION HISTORY:
Date Author Description
------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT ENVOY_DbGetMaxFifoBports (TXC_U16BIT handle)
{
TXC_U16BIT deviceType;
/* First, get the device type. */
deviceType = ENVOY_DbGetDeviceType (handle);
if (deviceType == ENVOY_CE2)
{
return ENVOY_CE2_MAX_FIFO_PORTS;
}
else if (deviceType == ENVOY_CE4)
{
return ENVOY_CE4_MAX_FIFO_PORTS;
}
else
return 0;
}
/*--------------------------------------------------------------------------*
FUNCTION: ENVOY_DbGetMaxMacTerms
DESCRIPTION: This function returns the maximum allowable terminals.
INPUTS: handle
RETURNS: maximum allowable terms.
CAVEATS: None
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT ENVOY_DbGetMaxMacTerms (TXC_U16BIT handle)
{
return ENVOY_MAX_MAC_TERMS;
}
/*--------------------------------------------------------------------------*
FUNCTION: ENVOY_DbGetDeviceType
DESCRIPTION: This function retrieves the device type from the database for
the given handle.
INPUTS: handle
RETURNS: device type for given handle
CAVEATS: None
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_U16BIT ENVOY_DbGetDeviceType (TXC_U16BIT handle)
{
return envoyDatabase.envoyDeviceData[handle].deviceType;
}
/*--------------------------------------------------------------------------*
FUNCTION: ENVOY_DbGetDeviceAddr
DESCRIPTION: returns the device base address supplied by the user
INPUTS: handle
RETURNS: void pointer to the device base addr
CAVEATS: None
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_VOID_PTR ENVOY_DbGetDeviceAddr (TXC_U16BIT handle)
{
return envoyDatabase.envoyDeviceData[handle].baseAddr;
}
/*--------------------------------------------------------------------------*
FUNCTION: ENVOY_DbGetSemId
DESCRIPTION: returns the driver semaphore ID
INPUTS: none
RETURNS: sem Id
CAVEATS: None
REVISION HISTORY:
Rev Date Author Description
----- ------- ------------ -----------------
0.5.0 6/03/04 F. Giannella Initial release (beta)
*--------------------------------------------------------------------------*/
TXC_SEM_ID ENVOY_DbGetSemId (void)
{
return envoyDatabase.semId;
}
/****************************************************************************
** End of Module **
****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -