XilinxProcessorIPLib/drivers/v_sdirx/src/xv_sdirx_selftest.c
u32 XV_SdiRx_SelfTest(XV_SdiRx *InstancePtr)
{
	u32 Result, RegValue;

	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	Result = XV_SdiRx_Stop(InstancePtr);

	if (Result == XST_FAILURE)
		return XST_FAILURE;

	RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
					XV_SDIRX_RST_CTRL_OFFSET);
	if (RegValue != SDIRX_RST_CTRL_DEFAULT)
		return XST_FAILURE;

	RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
					XV_SDIRX_MDL_CTRL_OFFSET);
	if (RegValue != SDIRX_MDL_CTRL_DEFAULT)
		return XST_FAILURE;

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* Runs a self-test on the driver/device. This test checks if the LaneCount
* present in register matches the one from the generated file.
*
* @param	InstancePtr is a pointer to the XV_SdiRx instance.
*
* @return
*		- XST_SUCCESS if self-test was successful
*		- XST_FAILURE if the read value was not equal to _g.c file
*
* @note		None
*
******************************************************************************/
Runs a self-test on the driver/device. This test checks if the LaneCount
present in register matches the one from the generated file.
Runs a self - test on the driver / device . This test checks if the LaneCount present in register matches the one from the generated file .
u32 XV_SdiRx_SelfTest(XV_SdiRx *InstancePtr)
{
	u32 Result, RegValue;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Result = XV_SdiRx_Stop(InstancePtr);
	if (Result == XST_FAILURE)
		return XST_FAILURE;
	RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
					XV_SDIRX_RST_CTRL_OFFSET);
	if (RegValue != SDIRX_RST_CTRL_DEFAULT)
		return XST_FAILURE;
	RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
					XV_SDIRX_MDL_CTRL_OFFSET);
	if (RegValue != SDIRX_MDL_CTRL_DEFAULT)
		return XST_FAILURE;
	return XST_SUCCESS;
}
u32 XV_SdiRx_SelfTest ( XV_SdiRx * InstancePtr ) { u32 Result , RegValue ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Result = XV_SdiRx_Stop ( InstancePtr ) ; if ( Result == XST_FAILURE ) return XST_FAILURE ; RegValue = XV_SdiRx_ReadReg ( InstancePtr -> Config . BaseAddress , XV_SDIRX_RST_CTRL_OFFSET ) ; if ( RegValue != SDIRX_RST_CTRL_DEFAULT ) return XST_FAILURE ; RegValue = XV_SdiRx_ReadReg ( InstancePtr -> Config . BaseAddress , XV_SDIRX_MDL_CTRL_OFFSET ) ; if ( RegValue != SDIRX_MDL_CTRL_DEFAULT ) return XST_FAILURE ; return XST_SUCCESS ; }
Runs a self-test on the driver/device.
Runs a self - test on the driver / device .
/* Verify arguments */