XilinxProcessorIPLib/drivers/v_hdmirxss/src/xv_hdmirxss_hdcp.c
int XV_HdmiRxSs_HdcpPushEvent(XV_HdmiRxSs *InstancePtr, XV_HdmiRxSs_HdcpEvent Event)
{
  /* Verify argument. */
  Xil_AssertNonvoid(InstancePtr != NULL);
  Xil_AssertNonvoid(Event < XV_HDMIRXSS_HDCP_INVALID_EVT);

  /* Write event into the queue */
  InstancePtr->HdcpEventQueue.Queue[InstancePtr->HdcpEventQueue.Head] = Event;

  /* Update head pointer */
  if (InstancePtr->HdcpEventQueue.Head == (XV_HDMIRXSS_HDCP_MAX_QUEUE_SIZE - 1)) {
    InstancePtr->HdcpEventQueue.Head = 0;
  }
  else {
    InstancePtr->HdcpEventQueue.Head++;
  }

  /* Check tail pointer. When the two pointer are equal, then the buffer
   * is full. In this case then increment the tail pointer as well to
   * remove the oldest entry from the buffer.
   */
  if (InstancePtr->HdcpEventQueue.Tail == InstancePtr->HdcpEventQueue.Head) {
    if (InstancePtr->HdcpEventQueue.Tail == (XV_HDMIRXSS_HDCP_MAX_QUEUE_SIZE - 1)) {
      InstancePtr->HdcpEventQueue.Tail = 0;
    }
    else {
      InstancePtr->HdcpEventQueue.Tail++;
    }
  }

  return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* This function pushes an event into the HDCP event queue.
*
* @param InstancePtr is a pointer to the XV_HdmiRxSs instance.
* @param Event is the event to be pushed in the queue.
*
* @return
*  - XST_SUCCESS if action was successful
*  - XST_FAILURE if action was not successful
*
* @note   None.
*
******************************************************************************/
This function pushes an event into the HDCP event queue.
This function pushes an event into the HDCP event queue .
int XV_HdmiRxSs_HdcpPushEvent(XV_HdmiRxSs *InstancePtr, XV_HdmiRxSs_HdcpEvent Event)
{
  Xil_AssertNonvoid(InstancePtr != NULL);
  Xil_AssertNonvoid(Event < XV_HDMIRXSS_HDCP_INVALID_EVT);
  InstancePtr->HdcpEventQueue.Queue[InstancePtr->HdcpEventQueue.Head] = Event;
  if (InstancePtr->HdcpEventQueue.Head == (XV_HDMIRXSS_HDCP_MAX_QUEUE_SIZE - 1)) {
    InstancePtr->HdcpEventQueue.Head = 0;
  }
  else {
    InstancePtr->HdcpEventQueue.Head++;
  }
  if (InstancePtr->HdcpEventQueue.Tail == InstancePtr->HdcpEventQueue.Head) {
    if (InstancePtr->HdcpEventQueue.Tail == (XV_HDMIRXSS_HDCP_MAX_QUEUE_SIZE - 1)) {
      InstancePtr->HdcpEventQueue.Tail = 0;
    }
    else {
      InstancePtr->HdcpEventQueue.Tail++;
    }
  }
  return XST_SUCCESS;
}
int XV_HdmiRxSs_HdcpPushEvent ( XV_HdmiRxSs * InstancePtr , XV_HdmiRxSs_HdcpEvent Event ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( Event < XV_HDMIRXSS_HDCP_INVALID_EVT ) ; InstancePtr -> HdcpEventQueue . Queue [ InstancePtr -> HdcpEventQueue . Head ] = Event ; if ( InstancePtr -> HdcpEventQueue . Head == ( XV_HDMIRXSS_HDCP_MAX_QUEUE_SIZE - 1 ) ) { InstancePtr -> HdcpEventQueue . Head = 0 ; } else { InstancePtr -> HdcpEventQueue . Head ++ ; } if ( InstancePtr -> HdcpEventQueue . Tail == InstancePtr -> HdcpEventQueue . Head ) { if ( InstancePtr -> HdcpEventQueue . Tail == ( XV_HDMIRXSS_HDCP_MAX_QUEUE_SIZE - 1 ) ) { InstancePtr -> HdcpEventQueue . Tail = 0 ; } else { InstancePtr -> HdcpEventQueue . Tail ++ ; } } return XST_SUCCESS ; }
This function pushes an event into the HDCP event queue.
This function pushes an event into the HDCP event queue .
/* Verify argument. */ /* Write event into the queue */ /* Update head pointer */ /* Check tail pointer. When the two pointer are equal, then the buffer
   * is full. In this case then increment the tail pointer as well to
   * remove the oldest entry from the buffer.
   */