XilinxProcessorIPLib/drivers/v_hdmirxss/examples/xhdmi_example/RxOnly/xhdcp.c
int XHdcp_SetUpstream(XHdcp_Repeater *InstancePtr,
      XV_HdmiRxSs *UpstreamInstancePtr)
{
  int Status;

  /* Verify arguments */
  Xil_AssertNonvoid(InstancePtr != NULL);
  Xil_AssertNonvoid(UpstreamInstancePtr != NULL);

  /* Bind upstream interface */
  InstancePtr->UpstreamInstancePtr = UpstreamInstancePtr;


  Status = XV_HdmiRxSs_SetCallback(UpstreamInstancePtr,
    XV_HDMIRXSS_HANDLER_HDCP_AUTHENTICATED,
	(void *)XHdcp_UpstreamAuthenticatedCallback,
    (void *)InstancePtr);

  if (Status != XST_SUCCESS) {
    return (XST_FAILURE);
  }

  Status = XV_HdmiRxSs_SetCallback(UpstreamInstancePtr,
    XV_HDMIRXSS_HANDLER_HDCP_UNAUTHENTICATED,
	(void *)XHdcp_UpstreamUnauthenticatedCallback,
    (void *)InstancePtr);

  if (Status != XST_SUCCESS) {
    return (XST_FAILURE);
  }

  Status = XV_HdmiRxSs_SetCallback(UpstreamInstancePtr,
    XV_HDMIRXSS_HANDLER_HDCP_ENCRYPTION_UPDATE,
	(void *)XHdcp_UpstreamEncryptionUpdateCallback,
    (void *)InstancePtr);

  if (Status != XST_SUCCESS) {
    return (XST_FAILURE);
  }

  /* Indicate upstream interface has been binded */
  InstancePtr->UpstreamInstanceBinded = (TRUE);

  /* RX Only */
  InstancePtr->IsReady = (TRUE);

  return (XST_SUCCESS);
}
/*****************************************************************************/
/**
*
* This function is used to bind an HDMI Receiver instance as
* the repeater upstream interface. This function should be called
* once per repeater topology to set the upstream interface.
*
* @param    InstancePtr is a pointer to the XHdcp_Repeater instance.
* @param    UpstreamInstancePtr is a pointer to the HDMI receiver instance.
*
* @return   - XST_SUCCESS if upstream interface registered successfully.
*           - XST_FAILURE if upstream interface could not be registered.
*
* @note	    None.
*
******************************************************************************/
This function is used to bind an HDMI Receiver instance as
the repeater upstream interface. This function should be called
once per repeater topology to set the upstream interface.
This function is used to bind an HDMI Receiver instance as the repeater upstream interface . This function should be called once per repeater topology to set the upstream interface .
int XHdcp_SetUpstream(XHdcp_Repeater *InstancePtr,
      XV_HdmiRxSs *UpstreamInstancePtr)
{
  int Status;
  Xil_AssertNonvoid(InstancePtr != NULL);
  Xil_AssertNonvoid(UpstreamInstancePtr != NULL);
  InstancePtr->UpstreamInstancePtr = UpstreamInstancePtr;
  Status = XV_HdmiRxSs_SetCallback(UpstreamInstancePtr,
    XV_HDMIRXSS_HANDLER_HDCP_AUTHENTICATED,
	(void *)XHdcp_UpstreamAuthenticatedCallback,
    (void *)InstancePtr);
  if (Status != XST_SUCCESS) {
    return (XST_FAILURE);
  }
  Status = XV_HdmiRxSs_SetCallback(UpstreamInstancePtr,
    XV_HDMIRXSS_HANDLER_HDCP_UNAUTHENTICATED,
	(void *)XHdcp_UpstreamUnauthenticatedCallback,
    (void *)InstancePtr);
  if (Status != XST_SUCCESS) {
    return (XST_FAILURE);
  }
  Status = XV_HdmiRxSs_SetCallback(UpstreamInstancePtr,
    XV_HDMIRXSS_HANDLER_HDCP_ENCRYPTION_UPDATE,
	(void *)XHdcp_UpstreamEncryptionUpdateCallback,
    (void *)InstancePtr);
  if (Status != XST_SUCCESS) {
    return (XST_FAILURE);
  }
  InstancePtr->UpstreamInstanceBinded = (TRUE);
  InstancePtr->IsReady = (TRUE);
  return (XST_SUCCESS);
}
int XHdcp_SetUpstream ( XHdcp_Repeater * InstancePtr , XV_HdmiRxSs * UpstreamInstancePtr ) { int Status ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( UpstreamInstancePtr != NULL ) ; InstancePtr -> UpstreamInstancePtr = UpstreamInstancePtr ; Status = XV_HdmiRxSs_SetCallback ( UpstreamInstancePtr , XV_HDMIRXSS_HANDLER_HDCP_AUTHENTICATED , ( void * ) XHdcp_UpstreamAuthenticatedCallback , ( void * ) InstancePtr ) ; if ( Status != XST_SUCCESS ) { return ( XST_FAILURE ) ; } Status = XV_HdmiRxSs_SetCallback ( UpstreamInstancePtr , XV_HDMIRXSS_HANDLER_HDCP_UNAUTHENTICATED , ( void * ) XHdcp_UpstreamUnauthenticatedCallback , ( void * ) InstancePtr ) ; if ( Status != XST_SUCCESS ) { return ( XST_FAILURE ) ; } Status = XV_HdmiRxSs_SetCallback ( UpstreamInstancePtr , XV_HDMIRXSS_HANDLER_HDCP_ENCRYPTION_UPDATE , ( void * ) XHdcp_UpstreamEncryptionUpdateCallback , ( void * ) InstancePtr ) ; if ( Status != XST_SUCCESS ) { return ( XST_FAILURE ) ; } InstancePtr -> UpstreamInstanceBinded = ( TRUE ) ; InstancePtr -> IsReady = ( TRUE ) ; return ( XST_SUCCESS ) ; }
This function is used to bind an HDMI Receiver instance as
the repeater upstream interface.
This function is used to bind an HDMI Receiver instance as the repeater upstream interface .
/* Verify arguments */ /* Bind upstream interface */ /* Indicate upstream interface has been binded */ /* RX Only */