XilinxProcessorIPLib/drivers/emaclite/examples/xemaclite_selftest_example.c
int EMACLiteSelfTestExample(u16 DeviceId)
{
	int Status;
	XEmacLite_Config *ConfigPtr;
	XEmacLite *InstancePtr = &EmacLite;

	/*
	 * Initialize the EmacLite device.
	 */
	ConfigPtr = XEmacLite_LookupConfig(DeviceId);
	if (ConfigPtr == NULL) {
		return XST_FAILURE;
	}
	Status = XEmacLite_CfgInitialize(InstancePtr,
					ConfigPtr,
					ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Run the Self Test
	 */
	Status = XEmacLite_SelfTest(InstancePtr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* The main entry point for the EmacLite driver selftest example.
*
* @param	DeviceId is the XPAR_<xemaclite_instance>_DEVICE_ID value from
*		xparameters.h
*
* @return	XST_SUCCESS to indicate success, else XST_FAILURE.
*
* @note		None.
*
******************************************************************************/
The main entry point for the EmacLite driver selftest example.
The main entry point for the EmacLite driver selftest example .
int EMACLiteSelfTestExample(u16 DeviceId)
{
	int Status;
	XEmacLite_Config *ConfigPtr;
	XEmacLite *InstancePtr = &EmacLite;
	ConfigPtr = XEmacLite_LookupConfig(DeviceId);
	if (ConfigPtr == NULL) {
		return XST_FAILURE;
	}
	Status = XEmacLite_CfgInitialize(InstancePtr,
					ConfigPtr,
					ConfigPtr->BaseAddress);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	Status = XEmacLite_SelfTest(InstancePtr);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int EMACLiteSelfTestExample ( u16 DeviceId ) { int Status ; XEmacLite_Config * ConfigPtr ; XEmacLite * InstancePtr = & EmacLite ; ConfigPtr = XEmacLite_LookupConfig ( DeviceId ) ; if ( ConfigPtr == NULL ) { return XST_FAILURE ; } Status = XEmacLite_CfgInitialize ( InstancePtr , ConfigPtr , ConfigPtr -> BaseAddress ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } Status = XEmacLite_SelfTest ( InstancePtr ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } return XST_SUCCESS ; }
The main entry point for the EmacLite driver selftest example.
The main entry point for the EmacLite driver selftest example .
/*
	 * Initialize the EmacLite device.
	 */ /*
	 * Run the Self Test
	 */