XilinxProcessorIPLib/drivers/prd/src/xprd_sinit.c
XPrd_Config *XPrd_LookupConfig(u16 DeviceId)
{
	XPrd_Config *CfgPtr = NULL;
	u32 Index;

	for (Index = 0; Index < (u32)XPAR_XPRD_NUM_INSTANCES;
		Index++) {
		if (XPrd_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XPrd_ConfigTable[Index];
			break;
		}
	}

	return CfgPtr;
}
/*****************************************************************************/
/**
*
* This function looks for the device configuration based on the unique device
* ID. The table XPrd_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 XPrd_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 XPrd_ConfigTable [] contains the configuration information for each device in the system .
XPrd_Config *XPrd_LookupConfig(u16 DeviceId)
{
	XPrd_Config *CfgPtr = NULL;
	u32 Index;
	for (Index = 0; Index < (u32)XPAR_XPRD_NUM_INSTANCES;
		Index++) {
		if (XPrd_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XPrd_ConfigTable[Index];
			break;
		}
	}
	return CfgPtr;
}
XPrd_Config * XPrd_LookupConfig ( u16 DeviceId ) { XPrd_Config * CfgPtr = NULL ; u32 Index ; for ( Index = 0 ; Index < ( u32 ) XPAR_XPRD_NUM_INSTANCES ; Index ++ ) { if ( XPrd_ConfigTable [ Index ] . DeviceId == DeviceId ) { CfgPtr = & XPrd_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 .