XilinxProcessorIPLib/drivers/nandps/src/xnandps_sinit.c
XNandPs_Config *XNandPs_LookupConfig(u16 DeviceId)
{
	XNandPs_Config *CfgPtr = NULL;
	u32 Index;

	for (Index=0; Index < XPAR_XNANDPS_NUM_INSTANCES; Index++) {
		if (XNandPs_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XNandPs_ConfigTable[Index];
			break;
		}
	}
	return CfgPtr;
}
/*****************************************************************************/
/**
*
* This function looks up the device configuration based on the unique device ID.
* The table XNandPs_ConfigTable contains the configuration info for each device
* in the system.
*
* @param	DeviceId contains the ID of the device for which the
*		device configuration pointer is to be returned.
*
* @return
*		- A pointer to the configuration found.
*		- NULL if the specified device ID was not found.
*
* @note		None.
*
******************************************************************************/
This function looks up the device configuration based on the unique device ID.
The table XNandPs_ConfigTable contains the configuration info for each device
in the system.
This function looks up the device configuration based on the unique device ID . The table XNandPs_ConfigTable contains the configuration info for each device in the system .
XNandPs_Config *XNandPs_LookupConfig(u16 DeviceId)
{
	XNandPs_Config *CfgPtr = NULL;
	u32 Index;
	for (Index=0; Index < XPAR_XNANDPS_NUM_INSTANCES; Index++) {
		if (XNandPs_ConfigTable[Index].DeviceId == DeviceId) {
			CfgPtr = &XNandPs_ConfigTable[Index];
			break;
		}
	}
	return CfgPtr;
}
XNandPs_Config * XNandPs_LookupConfig ( u16 DeviceId ) { XNandPs_Config * CfgPtr = NULL ; u32 Index ; for ( Index = 0 ; Index < XPAR_XNANDPS_NUM_INSTANCES ; Index ++ ) { if ( XNandPs_ConfigTable [ Index ] . DeviceId == DeviceId ) { CfgPtr = & XNandPs_ConfigTable [ Index ] ; break ; } } return CfgPtr ; }
This function looks up the device configuration based on the unique device ID.
This function looks up the device configuration based on the unique device ID .