XilinxProcessorIPLib/drivers/tpg/examples/tpg_selftest_example.c
int XTpgSelfTestExample(u16 DeviceId)
{
	int Status;
	XTpg_Config *Config;
	/*
	 * Initialize the TPG driver so that it's ready to use
	 * Look up the configuration in the config table,
	 * then initialize it.
	 */
	Config = XTpg_LookupConfig(DeviceId);
	if (NULL == Config) {
		return XST_FAILURE;
	}

	Status = XTpg_CfgInitialize(&Tpg, Config, Config->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Perform a self-test to check hardware build.
	 */

	Status = XTpg_SelfTest(&Tpg);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function does a minimal test on the XTpg driver.
*
*
* @param	DeviceId is the XPAR_<TPG_instance>_DEVICE_ID value from
*           	xparameters.h.
*
* @return
*		- XST_SUCCESS if successful
* 		- XST_FAILURE if failed.
*
* @note		None
*
******************************************************************************/
This function does a minimal test on the XTpg driver.
This function does a minimal test on the XTpg driver .
int XTpgSelfTestExample(u16 DeviceId)
{
	int Status;
	XTpg_Config *Config;
	Config = XTpg_LookupConfig(DeviceId);
	if (NULL == Config) {
		return XST_FAILURE;
	}
	Status = XTpg_CfgInitialize(&Tpg, Config, Config->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XTpg_SelfTest(&Tpg);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int XTpgSelfTestExample ( u16 DeviceId ) { int Status ; XTpg_Config * Config ; Config = XTpg_LookupConfig ( DeviceId ) ; if ( NULL == Config ) { return XST_FAILURE ; } Status = XTpg_CfgInitialize ( & Tpg , Config , Config -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XTpg_SelfTest ( & Tpg ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
This function does a minimal test on the XTpg driver.
This function does a minimal test on the XTpg driver .
/*
	 * Initialize the TPG driver so that it's ready to use
	 * Look up the configuration in the config table,
	 * then initialize it.
	 */ /*
	 * Perform a self-test to check hardware build.
	 */