XilinxProcessorIPLib/drivers/v_sdirxss/examples/vck190_av_pt/xuhdsdi_example.c
void RxStreamUpCallback(void *CallbackRef)
{
	u32 Si5324_ClkIn;
	XSdiVid_TransMode RxTransMode;
	u8 IsFractional;

	IsFractional = XV_SdiRxSs_GetTransportBitRate(&SdiRxSs);
	RxTransMode =  XV_SdiRxSs_GetTransportMode(&SdiRxSs);
	xil_printf("INFO>> SDI Rx: Input Locked\r\n");

	if (RxTransMode == XSDIVID_MODE_12G) {
		/* Read the register
		 * clear/set some bits in it
		 * set to the previous value*/
		u32 data = Xil_In32((UINTPTR)XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR);

		data = data & (0xFFFFFEFF);
		Xil_Out32((UINTPTR)(XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR), data);
		data = data | 0x1;
		Xil_Out32((UINTPTR)(XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR), data);
	}
	StartTxAfterRxFlag = (TRUE);
        XV_SdiRxSs_StreamFlowEnable(&SdiRxSs);
        StartTxAfterRx();

	/* Waiting for SI5328 Lock */
	Xil_Out32((UINTPTR)(XPAR_GPIO_1_BASEADDR), (u32)(0x00000001));
	Xil_Out32((UINTPTR)(XPAR_GPIO_1_BASEADDR), (u32)(0x00000000));
        XV_SdiTxSs_StreamStart(&SdiTxSs);

        /* Print stream information */
        XV_SdiTxSs_ReportStreamInfo(&SdiTxSs);

	#ifdef XPAR_XSDIAUD_NUM_INSTANCES
	/* Enable SDI Audio Pass-Through or AES Audio Playback (from this ISR) */
	XSdiAud_IntrEnable(&SdiExtract, XSDIAUD_INT_EN_AUD_STAT_UPDATE_MASK);

	#endif
}
/*****************************************************************************/
/**
 *
 * This function is called when the RX Lock occurs, it calculates the frequency
 * wrt RxTransMode, programs SI5324 with the calculated frequency and then
 * enables Rx stream flow IPs.
 *
 * @param	CallbackRef is a callback function reference.
 *
 * @return	None.
 *
 * @note	None.
 *
 ******************************************************************************/
This function is called when the RX Lock occurs, it calculates the frequency
wrt RxTransMode, programs SI5324 with the calculated frequency and then
enables Rx stream flow IPs.

@param       CallbackRef is a callback function reference.

@return      None.

@note        None.
This function is called when the RX Lock occurs it calculates the frequency wrt RxTransMode programs SI5324 with the calculated frequency and then enables Rx stream flow IPs . @param CallbackRef is a callback function reference . @return None . @note None .
void RxStreamUpCallback(void *CallbackRef)
{
	u32 Si5324_ClkIn;
	XSdiVid_TransMode RxTransMode;
	u8 IsFractional;
	IsFractional = XV_SdiRxSs_GetTransportBitRate(&SdiRxSs);
	RxTransMode =  XV_SdiRxSs_GetTransportMode(&SdiRxSs);
	xil_printf("INFO>> SDI Rx: Input Locked\r\n");
	if (RxTransMode == XSDIVID_MODE_12G) {
		u32 data = Xil_In32((UINTPTR)XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR);
		data = data & (0xFFFFFEFF);
		Xil_Out32((UINTPTR)(XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR), data);
		data = data | 0x1;
		Xil_Out32((UINTPTR)(XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR), data);
	}
	StartTxAfterRxFlag = (TRUE);
        XV_SdiRxSs_StreamFlowEnable(&SdiRxSs);
        StartTxAfterRx();
	Xil_Out32((UINTPTR)(XPAR_GPIO_1_BASEADDR), (u32)(0x00000001));
	Xil_Out32((UINTPTR)(XPAR_GPIO_1_BASEADDR), (u32)(0x00000000));
        XV_SdiTxSs_StreamStart(&SdiTxSs);
        XV_SdiTxSs_ReportStreamInfo(&SdiTxSs);
	#ifdef XPAR_XSDIAUD_NUM_INSTANCES
	XSdiAud_IntrEnable(&SdiExtract, XSDIAUD_INT_EN_AUD_STAT_UPDATE_MASK);
	#endif
}
void RxStreamUpCallback ( void * CallbackRef ) { u32 Si5324_ClkIn ; XSdiVid_TransMode RxTransMode ; u8 IsFractional ; IsFractional = XV_SdiRxSs_GetTransportBitRate ( & SdiRxSs ) ; RxTransMode = XV_SdiRxSs_GetTransportMode ( & SdiRxSs ) ; xil_printf ( " \r \n " ) ; if ( RxTransMode == XSDIVID_MODE_12G ) { u32 data = Xil_In32 ( ( UINTPTR ) XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR ) ; data = data & ( 0xFFFFFEFF ) ; Xil_Out32 ( ( UINTPTR ) ( XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR ) , data ) ; data = data | 0x1 ; Xil_Out32 ( ( UINTPTR ) ( XPAR_TX_HEIR_V_SMPTE_UHDSDI_TX_SS_0_BASEADDR ) , data ) ; } StartTxAfterRxFlag = ( TRUE ) ; XV_SdiRxSs_StreamFlowEnable ( & SdiRxSs ) ; StartTxAfterRx ( ) ; Xil_Out32 ( ( UINTPTR ) ( XPAR_GPIO_1_BASEADDR ) , ( u32 ) ( 0x00000001 ) ) ; Xil_Out32 ( ( UINTPTR ) ( XPAR_GPIO_1_BASEADDR ) , ( u32 ) ( 0x00000000 ) ) ; XV_SdiTxSs_StreamStart ( & SdiTxSs ) ; XV_SdiTxSs_ReportStreamInfo ( & SdiTxSs ) ; #ifdef XPAR_XSDIAUD_NUM_INSTANCES XSdiAud_IntrEnable ( & SdiExtract , XSDIAUD_INT_EN_AUD_STAT_UPDATE_MASK ) ; #endif }
This function is called when the RX Lock occurs, it calculates the frequency
 wrt RxTransMode, programs SI5324 with the calculated frequency and then
 enables Rx stream flow IPs.
This function is called when the RX Lock occurs it calculates the frequency wrt RxTransMode programs SI5324 with the calculated frequency and then enables Rx stream flow IPs .
/* Read the register
		 * clear/set some bits in it
		 * set to the previous value*/ /* Waiting for SI5328 Lock */ /* Print stream information */ /* Enable SDI Audio Pass-Through or AES Audio Playback (from this ISR) */