XilinxProcessorIPLib/drivers/axis_switch/src/xaxis_switch_sinit.c
XAxis_Switch_Config *XAxisScr_LookupConfig(u16 DeviceId)
{
	extern XAxis_Switch_Config
		XAxis_Switch_ConfigTable[XPAR_XAXIS_SWITCH_NUM_INSTANCES];
	XAxis_Switch_Config *CfgPtr = NULL;
	int Index;

	/* Checking for device id for which instance it is matching */
	for (Index = 0x0; Index < XPAR_XAXIS_SWITCH_NUM_INSTANCES;
								Index++) {

		/* Assigning address of config table if both device ids
		 * are matched
		 */
		if (XAxis_Switch_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XAxis_Switch_ConfigTable[Index];
			break;
		}
	}

	return (XAxis_Switch_Config *)CfgPtr;
}
/*****************************************************************************/
/**
*
* This function returns a reference to an XAxis_Switch_Config structure based
* on the core id, <i>DeviceId</i>. The return value will refer to an entry in
* the device configuration table defined in the xaxis_switch_g.c file.
*
* @param	DeviceId is the unique core ID of the XAxis_Switch core for
*		the lookup operation.
*
* @return	XAxisScr_LookupConfig returns a reference to a config record
*		in the configuration table (in xaxis_switch_g.c)
*		corresponding to <i>DeviceId</i>, or NULL if no match is found.
*
* @note		None.
*
******************************************************************************/
This function returns a reference to an XAxis_Switch_Config structure based
on the core id, DeviceId. The return value will refer to an entry in
the device configuration table defined in the xaxis_switch_g.c file.
This function returns a reference to an XAxis_Switch_Config structure based on the core id DeviceId . The return value will refer to an entry in the device configuration table defined in the xaxis_switch_g . c file .
XAxis_Switch_Config *XAxisScr_LookupConfig(u16 DeviceId)
{
	extern XAxis_Switch_Config
		XAxis_Switch_ConfigTable[XPAR_XAXIS_SWITCH_NUM_INSTANCES];
	XAxis_Switch_Config *CfgPtr = NULL;
	int Index;
	for (Index = 0x0; Index < XPAR_XAXIS_SWITCH_NUM_INSTANCES;
								Index++) {
		if (XAxis_Switch_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XAxis_Switch_ConfigTable[Index];
			break;
		}
	}
	return (XAxis_Switch_Config *)CfgPtr;
}
XAxis_Switch_Config * XAxisScr_LookupConfig ( u16 DeviceId ) { extern XAxis_Switch_Config XAxis_Switch_ConfigTable [ XPAR_XAXIS_SWITCH_NUM_INSTANCES ] ; XAxis_Switch_Config * CfgPtr = NULL ; int Index ; for ( Index = 0x0 ; Index < XPAR_XAXIS_SWITCH_NUM_INSTANCES ; Index ++ ) { if ( XAxis_Switch_ConfigTable [ Index ] . DeviceId == DeviceId ) { CfgPtr = & XAxis_Switch_ConfigTable [ Index ] ; break ; } } return ( XAxis_Switch_Config * ) CfgPtr ; }
This function returns a reference to an XAxis_Switch_Config structure based
on the core id, <i>DeviceId</i>.
This function returns a reference to an XAxis_Switch_Config structure based on the core id <i > DeviceId< / i > .
/* Checking for device id for which instance it is matching */ /* Assigning address of config table if both device ids
		 * are matched
		 */