XilinxProcessorIPLib/drivers/hdcp22_rx/src/xhdcp22_rx.c
static int XHdcp22Rx_InitializeTimer(XHdcp22_Rx *InstancePtr)
{
	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);

	int Status = XST_SUCCESS;
	UINTPTR SubcoreBaseAddr;
	XTmrCtr_Config *TimerConfigPtr;

	TimerConfigPtr = XTmrCtr_LookupConfig(InstancePtr->Config.TimerDeviceId);
	if(TimerConfigPtr == NULL)
	{
		return XST_FAILURE;
	}

	Status = XHdcp22Rx_ComputeBaseAddress(InstancePtr->Config.BaseAddress, TimerConfigPtr->BaseAddress, &SubcoreBaseAddr);
	XTmrCtr_CfgInitialize(&InstancePtr->TimerInst, TimerConfigPtr, SubcoreBaseAddr);
	if (Status != XST_SUCCESS) {
		return Status;
	}

	XTmrCtr_SetOptions(&InstancePtr->TimerInst, XHDCP22_RX_TMR_CTR_0,
	                   XTC_AUTO_RELOAD_OPTION);
	XTmrCtr_SetOptions(&InstancePtr->TimerInst, XHDCP22_RX_TMR_CTR_1,
	                   XTC_INT_MODE_OPTION | XTC_DOWN_COUNT_OPTION);
	XTmrCtr_SetHandler(&InstancePtr->TimerInst, XHdcp22Rx_TimerHandler,
	                   InstancePtr);

	return Status;
}
/*****************************************************************************/
/**
* This function is called to initialize the timer.
*
* @param	InstancePtr is a pointer to the XHdcp22_Rx core instance.
*
* @return	XST_SUCCESS or XST_FAILURE.
*
* @note		None.
******************************************************************************/
This function is called to initialize the timer.
This function is called to initialize the timer .
static int XHdcp22Rx_InitializeTimer(XHdcp22_Rx *InstancePtr)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	int Status = XST_SUCCESS;
	UINTPTR SubcoreBaseAddr;
	XTmrCtr_Config *TimerConfigPtr;
	TimerConfigPtr = XTmrCtr_LookupConfig(InstancePtr->Config.TimerDeviceId);
	if(TimerConfigPtr == NULL)
	{
		return XST_FAILURE;
	}
	Status = XHdcp22Rx_ComputeBaseAddress(InstancePtr->Config.BaseAddress, TimerConfigPtr->BaseAddress, &SubcoreBaseAddr);
	XTmrCtr_CfgInitialize(&InstancePtr->TimerInst, TimerConfigPtr, SubcoreBaseAddr);
	if (Status != XST_SUCCESS) {
		return Status;
	}
	XTmrCtr_SetOptions(&InstancePtr->TimerInst, XHDCP22_RX_TMR_CTR_0,
	                   XTC_AUTO_RELOAD_OPTION);
	XTmrCtr_SetOptions(&InstancePtr->TimerInst, XHDCP22_RX_TMR_CTR_1,
	                   XTC_INT_MODE_OPTION | XTC_DOWN_COUNT_OPTION);
	XTmrCtr_SetHandler(&InstancePtr->TimerInst, XHdcp22Rx_TimerHandler,
	                   InstancePtr);
	return Status;
}
static int XHdcp22Rx_InitializeTimer ( XHdcp22_Rx * InstancePtr ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; int Status = XST_SUCCESS ; UINTPTR SubcoreBaseAddr ; XTmrCtr_Config * TimerConfigPtr ; TimerConfigPtr = XTmrCtr_LookupConfig ( InstancePtr -> Config . TimerDeviceId ) ; if ( TimerConfigPtr == NULL ) { return XST_FAILURE ; } Status = XHdcp22Rx_ComputeBaseAddress ( InstancePtr -> Config . BaseAddress , TimerConfigPtr -> BaseAddress , & SubcoreBaseAddr ) ; XTmrCtr_CfgInitialize ( & InstancePtr -> TimerInst , TimerConfigPtr , SubcoreBaseAddr ) ; if ( Status != XST_SUCCESS ) { return Status ; } XTmrCtr_SetOptions ( & InstancePtr -> TimerInst , XHDCP22_RX_TMR_CTR_0 , XTC_AUTO_RELOAD_OPTION ) ; XTmrCtr_SetOptions ( & InstancePtr -> TimerInst , XHDCP22_RX_TMR_CTR_1 , XTC_INT_MODE_OPTION | XTC_DOWN_COUNT_OPTION ) ; XTmrCtr_SetHandler ( & InstancePtr -> TimerInst , XHdcp22Rx_TimerHandler , InstancePtr ) ; return Status ; }
This function is called to initialize the timer.
This function is called to initialize the timer .
/* Verify arguments */