XilinxProcessorIPLib/drivers/v_hdmirxss/src/xv_hdmirxss_hdcp.c
int XV_HdmiRxSs_HdcpTimerBusyDelay(void *InstancePtr, u16 DelayInMs)
{

  XHdcp1x *HdcpPtr = (XHdcp1x *)InstancePtr;
  XTmrCtr *TimerPtr = (XTmrCtr *)HdcpPtr->Hdcp1xRef;

  u8 TimerChannel = 0;
  u32 TimerOptions = 0;
  u32 NumTicks = 0;

  /* Verify argument. */
	Xil_AssertNonvoid(TimerPtr != NULL);

  /* Determine NumTicks */
  NumTicks = XV_HdmiRxSs_HdcpTimerConvUsToTicks((DelayInMs*1000ul),
                TimerPtr->Config.SysClockFreqHz);

  /* Stop it */
  XTmrCtr_Stop(TimerPtr, TimerChannel);

  /* Configure the timer options */
  TimerOptions  = XTmrCtr_GetOptions(TimerPtr, TimerChannel);
  TimerOptions |=  XTC_DOWN_COUNT_OPTION;
  TimerOptions &= ~XTC_INT_MODE_OPTION;
  TimerOptions &= ~XTC_AUTO_RELOAD_OPTION;
  XTmrCtr_SetOptions(TimerPtr, TimerChannel, TimerOptions);

  /* Set the timeout and start */
  XTmrCtr_SetResetValue(TimerPtr, TimerChannel, NumTicks);
  XTmrCtr_Start(TimerPtr, TimerChannel);

  /* Wait until done */
  while (!XTmrCtr_IsExpired(TimerPtr, TimerChannel));

  return (XST_SUCCESS);
}
/******************************************************************************/
/**
*
* This function busy waits for an interval on behalf of an hdcp interface
*
* @param InstancePtr  the hdcp interface
* @param DelayInMs  the delay duration in milliseconds
*
* @return
*   XST_SUCCESS if successful
*
* @note
*   None.
*
******************************************************************************/
This function busy waits for an interval on behalf of an hdcp interface
This function busy waits for an interval on behalf of an hdcp interface
int XV_HdmiRxSs_HdcpTimerBusyDelay(void *InstancePtr, u16 DelayInMs)
{
  XHdcp1x *HdcpPtr = (XHdcp1x *)InstancePtr;
  XTmrCtr *TimerPtr = (XTmrCtr *)HdcpPtr->Hdcp1xRef;
  u8 TimerChannel = 0;
  u32 TimerOptions = 0;
  u32 NumTicks = 0;
	Xil_AssertNonvoid(TimerPtr != NULL);
  NumTicks = XV_HdmiRxSs_HdcpTimerConvUsToTicks((DelayInMs*1000ul),
                TimerPtr->Config.SysClockFreqHz);
  XTmrCtr_Stop(TimerPtr, TimerChannel);
  TimerOptions  = XTmrCtr_GetOptions(TimerPtr, TimerChannel);
  TimerOptions |=  XTC_DOWN_COUNT_OPTION;
  TimerOptions &= ~XTC_INT_MODE_OPTION;
  TimerOptions &= ~XTC_AUTO_RELOAD_OPTION;
  XTmrCtr_SetOptions(TimerPtr, TimerChannel, TimerOptions);
  XTmrCtr_SetResetValue(TimerPtr, TimerChannel, NumTicks);
  XTmrCtr_Start(TimerPtr, TimerChannel);
  while (!XTmrCtr_IsExpired(TimerPtr, TimerChannel));
  return (XST_SUCCESS);
}
int XV_HdmiRxSs_HdcpTimerBusyDelay ( void * InstancePtr , u16 DelayInMs ) { XHdcp1x * HdcpPtr = ( XHdcp1x * ) InstancePtr ; XTmrCtr * TimerPtr = ( XTmrCtr * ) HdcpPtr -> Hdcp1xRef ; u8 TimerChannel = 0 ; u32 TimerOptions = 0 ; u32 NumTicks = 0 ; Xil_AssertNonvoid ( TimerPtr != NULL ) ; NumTicks = XV_HdmiRxSs_HdcpTimerConvUsToTicks ( ( DelayInMs * 1000ul ) , TimerPtr -> Config . SysClockFreqHz ) ; XTmrCtr_Stop ( TimerPtr , TimerChannel ) ; TimerOptions = XTmrCtr_GetOptions ( TimerPtr , TimerChannel ) ; TimerOptions |= XTC_DOWN_COUNT_OPTION ; TimerOptions &= ~ XTC_INT_MODE_OPTION ; TimerOptions &= ~ XTC_AUTO_RELOAD_OPTION ; XTmrCtr_SetOptions ( TimerPtr , TimerChannel , TimerOptions ) ; XTmrCtr_SetResetValue ( TimerPtr , TimerChannel , NumTicks ) ; XTmrCtr_Start ( TimerPtr , TimerChannel ) ; while ( ! XTmrCtr_IsExpired ( TimerPtr , TimerChannel ) ) ; return ( XST_SUCCESS ) ; }
This function busy waits for an interval on behalf of an hdcp interface
This function busy waits for an interval on behalf of an hdcp interface
/* Verify argument. */ /* Determine NumTicks */ /* Stop it */ /* Configure the timer options */ /* Set the timeout and start */ /* Wait until done */