XilinxProcessorIPLib/drivers/ttcps/src/xttcps_sinit.c
XTtcPs_Config *XTtcPs_LookupConfig(u16 DeviceId)
{
	XTtcPs_Config *CfgPtr = NULL;
	u32 Index;

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

	return (XTtcPs_Config *)CfgPtr;
}
/*****************************************************************************/
/**
*
* Looks up the device configuration based on the unique device ID. A table
* contains the configuration info for each device in the system.
*
* @param	DeviceId contains the unique ID of the device
*
* @return
*
* A pointer to the configuration found or NULL if the specified device ID was
* not found. See xttcps.h for the definition of XTtcPs_Config.
*
* @note		None.
*
******************************************************************************/
Looks up the device configuration based on the unique device ID. A table
contains the configuration info for each device in the system.
Looks up the device configuration based on the unique device ID . A table contains the configuration info for each device in the system .
XTtcPs_Config *XTtcPs_LookupConfig(u16 DeviceId)
{
	XTtcPs_Config *CfgPtr = NULL;
	u32 Index;
	for (Index = 0U; Index < (u32)XPAR_XTTCPS_NUM_INSTANCES; Index++) {
		if (XTtcPs_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XTtcPs_ConfigTable[Index];
			break;
		}
	}
	return (XTtcPs_Config *)CfgPtr;
}
XTtcPs_Config * XTtcPs_LookupConfig ( u16 DeviceId ) { XTtcPs_Config * CfgPtr = NULL ; u32 Index ; for ( Index = 0U ; Index < ( u32 ) XPAR_XTTCPS_NUM_INSTANCES ; Index ++ ) { if ( XTtcPs_ConfigTable [ Index ] . DeviceId == DeviceId ) { CfgPtr = & XTtcPs_ConfigTable [ Index ] ; break ; } } return ( XTtcPs_Config * ) CfgPtr ; }
Looks up the device configuration based on the unique device ID.
Looks up the device configuration based on the unique device ID .