XilinxProcessorIPLib/drivers/can/src/xcan.c
XCan_Config *XCan_LookupConfig(u16 DeviceId)
{
	XCan_Config *CfgPtr = NULL;
	int Index;

	for (Index = 0; Index < XPAR_XCAN_NUM_INSTANCES; Index++) {
		if (XCan_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XCan_ConfigTable[Index];
			break;
		}
	}

	return CfgPtr;
}
/*****************************************************************************/
/**
*
* This function looks for the device configuration based on the unique device
* ID. The table XCan_ConfigTable[] contains the configuration information for
* each device in the system.
*
* @param	DeviceId is the unique device ID of the device being looked up.
*
* @return	A pointer to the configuration table entry corresponding to the
*		given device ID, or NULL if no match is found.
*
* @note		None.
*
******************************************************************************/
This function looks for the device configuration based on the unique device
ID. The table XCan_ConfigTable[] contains the configuration information for
each device in the system.
This function looks for the device configuration based on the unique device ID . The table XCan_ConfigTable [] contains the configuration information for each device in the system .
XCan_Config *XCan_LookupConfig(u16 DeviceId)
{
	XCan_Config *CfgPtr = NULL;
	int Index;
	for (Index = 0; Index < XPAR_XCAN_NUM_INSTANCES; Index++) {
		if (XCan_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XCan_ConfigTable[Index];
			break;
		}
	}
	return CfgPtr;
}
XCan_Config * XCan_LookupConfig ( u16 DeviceId ) { XCan_Config * CfgPtr = NULL ; int Index ; for ( Index = 0 ; Index < XPAR_XCAN_NUM_INSTANCES ; Index ++ ) { if ( XCan_ConfigTable [ Index ] . DeviceId == DeviceId ) { CfgPtr = & XCan_ConfigTable [ Index ] ; break ; } } return CfgPtr ; }
This function looks for the device configuration based on the unique device
ID.
This function looks for the device configuration based on the unique device ID .