XilinxProcessorIPLib/drivers/v_sdirx/src/xv_sdirx.c
void XV_SdiRx_Start(XV_SdiRx *InstancePtr, XV_SdiRx_SearchMode Mode)
{
	u32 Data;

	/* Verify argument. */
	Xil_AssertVoid(InstancePtr != NULL);

	Data = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
				(XV_SDIRX_MDL_CTRL_OFFSET));

	if (Mode == XV_SDIRX_MULTISEARCHMODE) {
		/* Operating in auto RX modes detection */
		Data &= ~XV_SDIRX_MDL_CTRL_MODE_EN_MASK;
		Data |= (InstancePtr->SupportedModes << XV_SDIRX_MDL_CTRL_MODE_EN_SHIFT)
				| XV_SDIRX_MDL_CTRL_MODE_DET_EN_MASK;
	} else {
		/* Operating in single RX mode detection */
		Data &= ~(XV_SDIRX_MDL_CTRL_FORCED_MODE_MASK
				| XV_SDIRX_MDL_CTRL_MODE_DET_EN_MASK);
		Data |= (Mode << XV_SDIRX_MDL_CTRL_FORCED_MODE_SHIFT);
	}

	XV_SdiRx_WriteReg((InstancePtr)->Config.BaseAddress,
				(XV_SDIRX_MDL_CTRL_OFFSET), (Data));

	Data = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
				(XV_SDIRX_RST_CTRL_OFFSET));

	Data |= XV_SDIRX_RST_CTRL_SDIRX_SS_EN_MASK;

	XV_SdiRx_WriteReg((InstancePtr)->Config.BaseAddress,
				(XV_SDIRX_RST_CTRL_OFFSET), (Data));
}
/*****************************************************************************/
/**
*
* This function enables SDI RX core's modes detection function.
*
* @param	InstancePtr is a pointer to the XV_SdiRx core instance.
* @param	Mode specifies the mode of SDI modes searching operation.
*		- 0 = XV_SDIRX_SINGLESEARCHMODE_HD
*		- 1 = XV_SDIRX_SINGLESEARCHMODE_SD
*		- 2 = XV_SDIRX_SINGLESEARCHMODE_3G
*		- 4 = XV_SDIRX_SINGLESEARCHMODE_6G
*		- 5 = XV_SDIRX_SINGLESEARCHMODE_12GI
*		- 6 = XV_SDIRX_SINGLESEARCHMODE_12GF
*		- 10 = XV_SDIRX_MULTISEARCHMODE where the supported modes will be
*				enabled by XV_SdiRx_EnableMode function
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function enables SDI RX core's modes detection function.
This function enables SDI RX core ' s modes detection function .
void XV_SdiRx_Start(XV_SdiRx *InstancePtr, XV_SdiRx_SearchMode Mode)
{
	u32 Data;
	Xil_AssertVoid(InstancePtr != NULL);
	Data = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
				(XV_SDIRX_MDL_CTRL_OFFSET));
	if (Mode == XV_SDIRX_MULTISEARCHMODE) {
		Data &= ~XV_SDIRX_MDL_CTRL_MODE_EN_MASK;
		Data |= (InstancePtr->SupportedModes << XV_SDIRX_MDL_CTRL_MODE_EN_SHIFT)
				| XV_SDIRX_MDL_CTRL_MODE_DET_EN_MASK;
	} else {
		Data &= ~(XV_SDIRX_MDL_CTRL_FORCED_MODE_MASK
				| XV_SDIRX_MDL_CTRL_MODE_DET_EN_MASK);
		Data |= (Mode << XV_SDIRX_MDL_CTRL_FORCED_MODE_SHIFT);
	}
	XV_SdiRx_WriteReg((InstancePtr)->Config.BaseAddress,
				(XV_SDIRX_MDL_CTRL_OFFSET), (Data));
	Data = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
				(XV_SDIRX_RST_CTRL_OFFSET));
	Data |= XV_SDIRX_RST_CTRL_SDIRX_SS_EN_MASK;
	XV_SdiRx_WriteReg((InstancePtr)->Config.BaseAddress,
				(XV_SDIRX_RST_CTRL_OFFSET), (Data));
}
void XV_SdiRx_Start ( XV_SdiRx * InstancePtr , XV_SdiRx_SearchMode Mode ) { u32 Data ; Xil_AssertVoid ( InstancePtr != NULL ) ; Data = XV_SdiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_SDIRX_MDL_CTRL_OFFSET ) ) ; if ( Mode == XV_SDIRX_MULTISEARCHMODE ) { Data &= ~ XV_SDIRX_MDL_CTRL_MODE_EN_MASK ; Data |= ( InstancePtr -> SupportedModes << XV_SDIRX_MDL_CTRL_MODE_EN_SHIFT ) | XV_SDIRX_MDL_CTRL_MODE_DET_EN_MASK ; } else { Data &= ~ ( XV_SDIRX_MDL_CTRL_FORCED_MODE_MASK | XV_SDIRX_MDL_CTRL_MODE_DET_EN_MASK ) ; Data |= ( Mode << XV_SDIRX_MDL_CTRL_FORCED_MODE_SHIFT ) ; } XV_SdiRx_WriteReg ( ( InstancePtr ) -> Config . BaseAddress , ( XV_SDIRX_MDL_CTRL_OFFSET ) , ( Data ) ) ; Data = XV_SdiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_SDIRX_RST_CTRL_OFFSET ) ) ; Data |= XV_SDIRX_RST_CTRL_SDIRX_SS_EN_MASK ; XV_SdiRx_WriteReg ( ( InstancePtr ) -> Config . BaseAddress , ( XV_SDIRX_RST_CTRL_OFFSET ) , ( Data ) ) ; }
This function enables SDI RX core's modes detection function.
This function enables SDI RX core ' s modes detection function .
/* Verify argument. */ /* Operating in auto RX modes detection */ /* Operating in single RX mode detection */