XilinxProcessorIPLib/drivers/v_hdmirxss/src/xv_hdmirxss.c
static void XV_HdmiRxSs_ConnectCallback(void *CallbackRef)
{
  XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;

  // Is the cable connected?
  if (XV_HdmiRx_IsStreamConnected(HdmiRxSsPtr->HdmiRxPtr)) {
#ifdef XV_HDMIRXSS_LOG_ENABLE
    XV_HdmiRxSs_LogWrite(HdmiRxSsPtr, XV_HDMIRXSS_LOG_EVT_CONNECT, 0);
#endif
    // Set RX hot plug detect
    XV_HdmiRx_SetHpd(HdmiRxSsPtr->HdmiRxPtr, TRUE);

    // Set stream connected flag
    HdmiRxSsPtr->IsStreamConnected = (TRUE);

#ifdef USE_HDCP_RX
    // Push connect event to HDCP event queue
    XV_HdmiRxSs_HdcpPushEvent(HdmiRxSsPtr, XV_HDMIRXSS_HDCP_CONNECT_EVT);
#endif
  }

  // RX cable is disconnected
  else {
#ifdef XV_HDMIRXSS_LOG_ENABLE
    XV_HdmiRxSs_LogWrite(HdmiRxSsPtr, XV_HDMIRXSS_LOG_EVT_DISCONNECT, 0);
#endif
    // Clear RX hot plug detect
    XV_HdmiRx_SetHpd(HdmiRxSsPtr->HdmiRxPtr, FALSE);

    // Set stream connected flag
    HdmiRxSsPtr->IsStreamConnected = (FALSE);

#ifdef USE_HDCP_RX
    // Push disconnect event to HDCP event queue
    XV_HdmiRxSs_HdcpPushEvent(HdmiRxSsPtr, XV_HDMIRXSS_HDCP_DISCONNECT_EVT);
#endif

    XV_HdmiRx_SetScrambler(HdmiRxSsPtr->HdmiRxPtr, (FALSE)); //Disable scrambler
  }


  // Check if user callback has been registered
  if (HdmiRxSsPtr->ConnectCallback) {
    HdmiRxSsPtr->ConnectCallback(HdmiRxSsPtr->ConnectRef);
  }

}
/*****************************************************************************/
/**
*
* This function is called when a RX connect event has occurred.
*
* @param  None.
*
* @return None.
*
* @note   None.
*
******************************************************************************/
This function is called when a RX connect event has occurred.
This function is called when a RX connect event has occurred .
static void XV_HdmiRxSs_ConnectCallback(void *CallbackRef)
{
  XV_HdmiRxSs *HdmiRxSsPtr = (XV_HdmiRxSs *)CallbackRef;
  if (XV_HdmiRx_IsStreamConnected(HdmiRxSsPtr->HdmiRxPtr)) {
#ifdef XV_HDMIRXSS_LOG_ENABLE
    XV_HdmiRxSs_LogWrite(HdmiRxSsPtr, XV_HDMIRXSS_LOG_EVT_CONNECT, 0);
#endif
    XV_HdmiRx_SetHpd(HdmiRxSsPtr->HdmiRxPtr, TRUE);
    HdmiRxSsPtr->IsStreamConnected = (TRUE);
#ifdef USE_HDCP_RX
    XV_HdmiRxSs_HdcpPushEvent(HdmiRxSsPtr, XV_HDMIRXSS_HDCP_CONNECT_EVT);
#endif
  }
  else {
#ifdef XV_HDMIRXSS_LOG_ENABLE
    XV_HdmiRxSs_LogWrite(HdmiRxSsPtr, XV_HDMIRXSS_LOG_EVT_DISCONNECT, 0);
#endif
    XV_HdmiRx_SetHpd(HdmiRxSsPtr->HdmiRxPtr, FALSE);
    HdmiRxSsPtr->IsStreamConnected = (FALSE);
#ifdef USE_HDCP_RX
    XV_HdmiRxSs_HdcpPushEvent(HdmiRxSsPtr, XV_HDMIRXSS_HDCP_DISCONNECT_EVT);
#endif
    XV_HdmiRx_SetScrambler(HdmiRxSsPtr->HdmiRxPtr, (FALSE)); 
  }
  if (HdmiRxSsPtr->ConnectCallback) {
    HdmiRxSsPtr->ConnectCallback(HdmiRxSsPtr->ConnectRef);
  }
}
static void XV_HdmiRxSs_ConnectCallback ( void * CallbackRef ) { XV_HdmiRxSs * HdmiRxSsPtr = ( XV_HdmiRxSs * ) CallbackRef ; if ( XV_HdmiRx_IsStreamConnected ( HdmiRxSsPtr -> HdmiRxPtr ) ) { #ifdef XV_HDMIRXSS_LOG_ENABLE XV_HdmiRxSs_LogWrite ( HdmiRxSsPtr , XV_HDMIRXSS_LOG_EVT_CONNECT , 0 ) ; #endif XV_HdmiRx_SetHpd ( HdmiRxSsPtr -> HdmiRxPtr , TRUE ) ; HdmiRxSsPtr -> IsStreamConnected = ( TRUE ) ; #ifdef USE_HDCP_RX XV_HdmiRxSs_HdcpPushEvent ( HdmiRxSsPtr , XV_HDMIRXSS_HDCP_CONNECT_EVT ) ; #endif } else { #ifdef XV_HDMIRXSS_LOG_ENABLE XV_HdmiRxSs_LogWrite ( HdmiRxSsPtr , XV_HDMIRXSS_LOG_EVT_DISCONNECT , 0 ) ; #endif XV_HdmiRx_SetHpd ( HdmiRxSsPtr -> HdmiRxPtr , FALSE ) ; HdmiRxSsPtr -> IsStreamConnected = ( FALSE ) ; #ifdef USE_HDCP_RX XV_HdmiRxSs_HdcpPushEvent ( HdmiRxSsPtr , XV_HDMIRXSS_HDCP_DISCONNECT_EVT ) ; #endif XV_HdmiRx_SetScrambler ( HdmiRxSsPtr -> HdmiRxPtr , ( FALSE ) ) ; } if ( HdmiRxSsPtr -> ConnectCallback ) { HdmiRxSsPtr -> ConnectCallback ( HdmiRxSsPtr -> ConnectRef ) ; } }
This function is called when a RX connect event has occurred.
This function is called when a RX connect event has occurred .
// Is the cable connected? // Set RX hot plug detect // Set stream connected flag // Push connect event to HDCP event queue // RX cable is disconnected // Clear RX hot plug detect // Set stream connected flag // Push disconnect event to HDCP event queue //Disable scrambler // Check if user callback has been registered