XilinxProcessorIPLib/drivers/v_sdirx/src/xv_sdirx.c
u32 XV_SdiRx_GetPayloadId(XV_SdiRx *InstancePtr, u8 DataStream)
{
	u32 RegValue;

	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(DataStream <= 7);

	RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
					(XV_SDIRX_RX_ST352_VLD_OFFSET));
	if (InstancePtr->Transport.TMode == XSDIVID_MODE_6G ||
		InstancePtr->Transport.TMode == XSDIVID_MODE_12G) {
		RegValue = (RegValue >> DataStream) & 0x00000101;
	} else {
		RegValue = (RegValue >> DataStream) & 0x00000001;
	}

	if (RegValue) {
		RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
						(XV_SDIRX_RX_ST352_0_OFFSET
						+ (DataStream * 4)));
	} else {
		/* Invalid st352 data */
		return 0;
	}

	return RegValue;
}
/*****************************************************************************/
/**
*
* This function returns incoming stream's incoming SDI payload ID.
*
* @param	InstancePtr is a pointer to the XV_SdiRx core instance.
* @param	DataStream specifies which payload ID is to be returned.
*
* @return	SDI payload ID
*
* @note		None.
*
******************************************************************************/
This function returns incoming stream's incoming SDI payload ID.
This function returns incoming stream ' s incoming SDI payload ID .
u32 XV_SdiRx_GetPayloadId(XV_SdiRx *InstancePtr, u8 DataStream)
{
	u32 RegValue;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(DataStream <= 7);
	RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
					(XV_SDIRX_RX_ST352_VLD_OFFSET));
	if (InstancePtr->Transport.TMode == XSDIVID_MODE_6G ||
		InstancePtr->Transport.TMode == XSDIVID_MODE_12G) {
		RegValue = (RegValue >> DataStream) & 0x00000101;
	} else {
		RegValue = (RegValue >> DataStream) & 0x00000001;
	}
	if (RegValue) {
		RegValue = XV_SdiRx_ReadReg(InstancePtr->Config.BaseAddress,
						(XV_SDIRX_RX_ST352_0_OFFSET
						+ (DataStream * 4)));
	} else {
		return 0;
	}
	return RegValue;
}
u32 XV_SdiRx_GetPayloadId ( XV_SdiRx * InstancePtr , u8 DataStream ) { u32 RegValue ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( DataStream <= 7 ) ; RegValue = XV_SdiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_SDIRX_RX_ST352_VLD_OFFSET ) ) ; if ( InstancePtr -> Transport . TMode == XSDIVID_MODE_6G || InstancePtr -> Transport . TMode == XSDIVID_MODE_12G ) { RegValue = ( RegValue >> DataStream ) & 0x00000101 ; } else { RegValue = ( RegValue >> DataStream ) & 0x00000001 ; } if ( RegValue ) { RegValue = XV_SdiRx_ReadReg ( InstancePtr -> Config . BaseAddress , ( XV_SDIRX_RX_ST352_0_OFFSET + ( DataStream * 4 ) ) ) ; } else { return 0 ; } return RegValue ; }
This function returns incoming stream's incoming SDI payload ID.
This function returns incoming stream ' s incoming SDI payload ID .
/* Verify arguments. */ /* Invalid st352 data */