XilinxProcessorIPLib/drivers/trafgen/src/xtrafgen_sinit.c
XTrafGen_Config *XTrafGen_LookupConfig(u32 DeviceId)
{
	extern XTrafGen_Config XTrafGen_ConfigTable[];
	XTrafGen_Config *CfgPtr;
	u32 Index;

	CfgPtr = NULL;

	for (Index = 0; Index < XPAR_XTRAFGEN_NUM_INSTANCES; Index++) {
		if (XTrafGen_ConfigTable[Index].DeviceId == DeviceId) {

			CfgPtr = &XTrafGen_ConfigTable[Index];
			break;
		}
	}

	return CfgPtr;
}
/*****************************************************************************/
/**
 * Look up the hardware configuration for a device instance
 *
 * @param	DeviceId is the unique device ID of the device to lookup for
 *
 * @return
 *		The configuration structure for the device. If the device ID is
 *		not found,a NULL pointer is returned.
 *
 * @note	None
 *
 ******************************************************************************/
Look up the hardware configuration for a device instance
@param       DeviceId is the unique device ID of the device to lookup for

@return
The configuration structure for the device. If the device ID is
not found,a NULL pointer is returned.

@note        None
Look up the hardware configuration for a device instance @param DeviceId is the unique device ID of the device to lookup for @return The configuration structure for the device . If the device ID is not found a NULL pointer is returned . @note None
XTrafGen_Config *XTrafGen_LookupConfig(u32 DeviceId)
{
	extern XTrafGen_Config XTrafGen_ConfigTable[];
	XTrafGen_Config *CfgPtr;
	u32 Index;
	CfgPtr = NULL;
	for (Index = 0; Index < XPAR_XTRAFGEN_NUM_INSTANCES; Index++) {
		if (XTrafGen_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XTrafGen_ConfigTable[Index];
			break;
		}
	}
	return CfgPtr;
}
XTrafGen_Config * XTrafGen_LookupConfig ( u32 DeviceId ) { extern XTrafGen_Config XTrafGen_ConfigTable [ ] ; XTrafGen_Config * CfgPtr ; u32 Index ; CfgPtr = NULL ; for ( Index = 0 ; Index < XPAR_XTRAFGEN_NUM_INSTANCES ; Index ++ ) { if ( XTrafGen_ConfigTable [ Index ] . DeviceId == DeviceId ) { CfgPtr = & XTrafGen_ConfigTable [ Index ] ; break ; } } return CfgPtr ; }
Look up the hardware configuration for a device instance
 @param       DeviceId is the unique device ID of the device to lookup for
Look up the hardware configuration for a device instance @param DeviceId is the unique device ID of the device to lookup for