XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/xhdcp22_tx.c
static int XHdcp22Tx_StartTimer(XHdcp22_Tx *InstancePtr, u32 TimeOut_mSec,
                                u8 ReasonId)
{
	u32 Ticks = (u32)(InstancePtr->Timer.TmrCtr.Config.SysClockFreqHz / 1000000) * TimeOut_mSec * 1000;

	Xil_AssertNonvoid(InstancePtr != NULL);

	InstancePtr->Timer.TimerExpired = (FALSE);
	InstancePtr->Timer.ReasonId = ReasonId;
	InstancePtr->Timer.InitialTicks = Ticks;

	/* If the timer was started for receiving a message,
	 * the message available flag must be reset */
	if (ReasonId != XHDCP22_TX_TS_UNDEFINED &&
	    ReasonId != XHDCP22_TX_TS_RX_REAUTH_CHECK &&
	    ReasonId != XHDCP22_TX_TS_WAIT_FOR_CIPHER) {
		InstancePtr->Info.MsgAvailable = (FALSE);
	}

#ifndef _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_
	if (InstancePtr->Timer.TmrCtr.IsReady == (FALSE)) {
		return XST_FAILURE;
	}

	XTmrCtr_SetResetValue(&InstancePtr->Timer.TmrCtr, XHDCP22_TX_TIMER_CNTR_0, Ticks);
	XTmrCtr_Start(&InstancePtr->Timer.TmrCtr, XHDCP22_TX_TIMER_CNTR_0);

	XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_DBG,
	                XHDCP22_TX_LOG_DBG_STARTIMER);
#endif /* _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_ */

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function starts the timer needed for checking the HDCP22 Receive status
* register. In case the timer is started to receive a message,
* the MsgAvailable flag is reset.
*
* @param  InstancePtr is a pointer to the XHdcp22Tx core instance.
* @param  TimeOut_mSec is the timeout for the next status update.
*
* @return XST_SUCCESS or XST_FAILURE.
*
* @note   None.
*
******************************************************************************/
This function starts the timer needed for checking the HDCP22 Receive status
register. In case the timer is started to receive a message,
the MsgAvailable flag is reset.
This function starts the timer needed for checking the HDCP22 Receive status register . In case the timer is started to receive a message the MsgAvailable flag is reset .
static int XHdcp22Tx_StartTimer(XHdcp22_Tx *InstancePtr, u32 TimeOut_mSec,
                                u8 ReasonId)
{
	u32 Ticks = (u32)(InstancePtr->Timer.TmrCtr.Config.SysClockFreqHz / 1000000) * TimeOut_mSec * 1000;
	Xil_AssertNonvoid(InstancePtr != NULL);
	InstancePtr->Timer.TimerExpired = (FALSE);
	InstancePtr->Timer.ReasonId = ReasonId;
	InstancePtr->Timer.InitialTicks = Ticks;
	if (ReasonId != XHDCP22_TX_TS_UNDEFINED &&
	    ReasonId != XHDCP22_TX_TS_RX_REAUTH_CHECK &&
	    ReasonId != XHDCP22_TX_TS_WAIT_FOR_CIPHER) {
		InstancePtr->Info.MsgAvailable = (FALSE);
	}
#ifndef _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_
	if (InstancePtr->Timer.TmrCtr.IsReady == (FALSE)) {
		return XST_FAILURE;
	}
	XTmrCtr_SetResetValue(&InstancePtr->Timer.TmrCtr, XHDCP22_TX_TIMER_CNTR_0, Ticks);
	XTmrCtr_Start(&InstancePtr->Timer.TmrCtr, XHDCP22_TX_TIMER_CNTR_0);
	XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_DBG,
	                XHDCP22_TX_LOG_DBG_STARTIMER);
#endif 
	return XST_SUCCESS;
}
static int XHdcp22Tx_StartTimer ( XHdcp22_Tx * InstancePtr , u32 TimeOut_mSec , u8 ReasonId ) { u32 Ticks = ( u32 ) ( InstancePtr -> Timer . TmrCtr . Config . SysClockFreqHz / 1000000 ) * TimeOut_mSec * 1000 ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; InstancePtr -> Timer . TimerExpired = ( FALSE ) ; InstancePtr -> Timer . ReasonId = ReasonId ; InstancePtr -> Timer . InitialTicks = Ticks ; if ( ReasonId != XHDCP22_TX_TS_UNDEFINED && ReasonId != XHDCP22_TX_TS_RX_REAUTH_CHECK && ReasonId != XHDCP22_TX_TS_WAIT_FOR_CIPHER ) { InstancePtr -> Info . MsgAvailable = ( FALSE ) ; } #ifndef _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_ if ( InstancePtr -> Timer . TmrCtr . IsReady == ( FALSE ) ) { return XST_FAILURE ; } XTmrCtr_SetResetValue ( & InstancePtr -> Timer . TmrCtr , XHDCP22_TX_TIMER_CNTR_0 , Ticks ) ; XTmrCtr_Start ( & InstancePtr -> Timer . TmrCtr , XHDCP22_TX_TIMER_CNTR_0 ) ; XHdcp22Tx_LogWr ( InstancePtr , XHDCP22_TX_LOG_EVT_DBG , XHDCP22_TX_LOG_DBG_STARTIMER ) ; #endif return XST_SUCCESS ; }
This function starts the timer needed for checking the HDCP22 Receive status
register.
This function starts the timer needed for checking the HDCP22 Receive status register .
/* If the timer was started for receiving a message,
	 * the message available flag must be reset */ /* _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_ */