XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/xhdcp22_tx.c
static XHdcp22_Tx_StateType XHdcp22Tx_StateA1(XHdcp22_Tx *InstancePtr)
{
	int Result = XST_SUCCESS;

#ifndef _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_
     /* Wait for 100ms timer to expire
        This timeout ensures that encryption is disabled
        before authentication is requested */
	if (InstancePtr->Timer.TimerExpired == (FALSE)) {
		return XHDCP22_TX_STATE_A1;
	}
#endif

	XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_STATE, (u16)XHDCP22_TX_STATE_A1);

	/* Write AKE_Init message */
	Result = XHdcp22Tx_WriteAKEInit(InstancePtr);

	if (Result != XST_SUCCESS) {
		XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_DBG, XHDCP22_TX_LOG_DBG_MSG_WRITE_FAIL);
		return XHDCP22_TX_STATE_A0;
	}

	/* Start the timer for receiving XHDCP22_TX_AKE_SEND_CERT */
	XHdcp22Tx_StartTimer(InstancePtr, 100, XHDCP22_TX_AKE_SEND_CERT);

	/* Reset some variables */
	InstancePtr->Topology.DeviceCnt = 0;
	InstancePtr->Topology.Depth = 0;
	InstancePtr->Topology.MaxDevsExceeded = FALSE;
	InstancePtr->Topology.MaxCascadeExceeded = FALSE;
	InstancePtr->Topology.Hdcp2LegacyDeviceDownstream = FALSE;
	InstancePtr->Topology.Hdcp1DeviceDownstream = FALSE;
	InstancePtr->Info.ReceivedFirstSeqNum_V = FALSE;
	InstancePtr->Info.SentFirstSeqNum_M = FALSE;
	InstancePtr->Info.IsContentStreamTypeSent = FALSE;
	InstancePtr->Info.SeqNum_M = 0;
	InstancePtr->Info.ContentStreamManageCheckCounter = 0;

	/* Goto the waiting state for AKE_SEND_CERT */
	return XHDCP22_TX_STATE_A1_1;
}
/*****************************************************************************/
/**
*
* This function executes the first part of the A1 state of the
* HDCP2.2 TX protocol.
*
* @param  InstancePtr is a pointer to the XHdcp22Tx core instance.
*
* @return XHDCP22_TX_STATE_A1_1
*
* @note   None.
*
******************************************************************************/
This function executes the first part of the A1 state of the
HDCP2.2 TX protocol.
This function executes the first part of the A1 state of the HDCP2 . 2 TX protocol .
static XHdcp22_Tx_StateType XHdcp22Tx_StateA1(XHdcp22_Tx *InstancePtr)
{
	int Result = XST_SUCCESS;
#ifndef _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_
	if (InstancePtr->Timer.TimerExpired == (FALSE)) {
		return XHDCP22_TX_STATE_A1;
	}
#endif
	XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_STATE, (u16)XHDCP22_TX_STATE_A1);
	Result = XHdcp22Tx_WriteAKEInit(InstancePtr);
	if (Result != XST_SUCCESS) {
		XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_DBG, XHDCP22_TX_LOG_DBG_MSG_WRITE_FAIL);
		return XHDCP22_TX_STATE_A0;
	}
	XHdcp22Tx_StartTimer(InstancePtr, 100, XHDCP22_TX_AKE_SEND_CERT);
	InstancePtr->Topology.DeviceCnt = 0;
	InstancePtr->Topology.Depth = 0;
	InstancePtr->Topology.MaxDevsExceeded = FALSE;
	InstancePtr->Topology.MaxCascadeExceeded = FALSE;
	InstancePtr->Topology.Hdcp2LegacyDeviceDownstream = FALSE;
	InstancePtr->Topology.Hdcp1DeviceDownstream = FALSE;
	InstancePtr->Info.ReceivedFirstSeqNum_V = FALSE;
	InstancePtr->Info.SentFirstSeqNum_M = FALSE;
	InstancePtr->Info.IsContentStreamTypeSent = FALSE;
	InstancePtr->Info.SeqNum_M = 0;
	InstancePtr->Info.ContentStreamManageCheckCounter = 0;
	return XHDCP22_TX_STATE_A1_1;
}
static XHdcp22_Tx_StateType XHdcp22Tx_StateA1 ( XHdcp22_Tx * InstancePtr ) { int Result = XST_SUCCESS ; #ifndef _XHDCP22_TX_DISABLE_TIMEOUT_CHECKING_ if ( InstancePtr -> Timer . TimerExpired == ( FALSE ) ) { return XHDCP22_TX_STATE_A1 ; } #endif XHdcp22Tx_LogWr ( InstancePtr , XHDCP22_TX_LOG_EVT_STATE , ( u16 ) XHDCP22_TX_STATE_A1 ) ; Result = XHdcp22Tx_WriteAKEInit ( InstancePtr ) ; if ( Result != XST_SUCCESS ) { XHdcp22Tx_LogWr ( InstancePtr , XHDCP22_TX_LOG_EVT_DBG , XHDCP22_TX_LOG_DBG_MSG_WRITE_FAIL ) ; return XHDCP22_TX_STATE_A0 ; } XHdcp22Tx_StartTimer ( InstancePtr , 100 , XHDCP22_TX_AKE_SEND_CERT ) ; InstancePtr -> Topology . DeviceCnt = 0 ; InstancePtr -> Topology . Depth = 0 ; InstancePtr -> Topology . MaxDevsExceeded = FALSE ; InstancePtr -> Topology . MaxCascadeExceeded = FALSE ; InstancePtr -> Topology . Hdcp2LegacyDeviceDownstream = FALSE ; InstancePtr -> Topology . Hdcp1DeviceDownstream = FALSE ; InstancePtr -> Info . ReceivedFirstSeqNum_V = FALSE ; InstancePtr -> Info . SentFirstSeqNum_M = FALSE ; InstancePtr -> Info . IsContentStreamTypeSent = FALSE ; InstancePtr -> Info . SeqNum_M = 0 ; InstancePtr -> Info . ContentStreamManageCheckCounter = 0 ; return XHDCP22_TX_STATE_A1_1 ; }
This function executes the first part of the A1 state of the
HDCP2.2 TX protocol.
This function executes the first part of the A1 state of the HDCP2 . 2 TX protocol .
/* Wait for 100ms timer to expire
        This timeout ensures that encryption is disabled
        before authentication is requested */ /* Write AKE_Init message */ /* Start the timer for receiving XHDCP22_TX_AKE_SEND_CERT */ /* Reset some variables */ /* Goto the waiting state for AKE_SEND_CERT */