XilinxProcessorIPLib/drivers/spdif/examples/xspdif_selftest_example.c
int SpdifSelfTestExample(u16 DeviceId)
{
	int Status;
	XSpdif_Config *Config;
	/*
	 * Initialize the Spdif driver so that it's ready to use
	 * Look up the configuration in the config table, then initialize it.
	 */
	Config = XSpdif_LookupConfig(DeviceId);

	if (Config == NULL)
		return XST_FAILURE;

	Status = XSpdif_CfgInitialize(&Spdif, Config, Config->BaseAddress);
	if (Status != XST_SUCCESS)
		return XST_FAILURE;

	return Status;
}
/*****************************************************************************/
/**
 *
 * This function does a minimal test on the Spdif device and
 * driver as a design example.
 *
 * @param	DeviceId is the Device ID of the Spdif Device and is the
 *		XPAR_<spdif_instance>_DEVICE_ID value from xparameters.h
 *
 * @return	XST_SUCCESS if successful, otherwise XST_FAILURE.
 *
 * @note		None.
 *
 *
 *****************************************************************************/
This function does a minimal test on the Spdif device and
driver as a design example.

@param       DeviceId is the Device ID of the Spdif Device and is the
XPAR__DEVICE_ID value from xparameters.h



@note                None.
This function does a minimal test on the Spdif device and driver as a design example . @param DeviceId is the Device ID of the Spdif Device and is the XPAR__DEVICE_ID value from xparameters . h @note None .
int SpdifSelfTestExample(u16 DeviceId)
{
	int Status;
	XSpdif_Config *Config;
	Config = XSpdif_LookupConfig(DeviceId);
	if (Config == NULL)
		return XST_FAILURE;
	Status = XSpdif_CfgInitialize(&Spdif, Config, Config->BaseAddress);
	if (Status != XST_SUCCESS)
		return XST_FAILURE;
	return Status;
}
int SpdifSelfTestExample ( u16 DeviceId ) { int Status ; XSpdif_Config * Config ; Config = XSpdif_LookupConfig ( DeviceId ) ; if ( Config == NULL ) return XST_FAILURE ; Status = XSpdif_CfgInitialize ( & Spdif , Config , Config -> BaseAddress ) ; if ( Status != XST_SUCCESS ) return XST_FAILURE ; return Status ; }
This function does a minimal test on the Spdif device and
 driver as a design example.
This function does a minimal test on the Spdif device and driver as a design example .
/*
	 * Initialize the Spdif driver so that it's ready to use
	 * Look up the configuration in the config table, then initialize it.
	 */