XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/xhdcp22_tx.c
int XHdcp22Tx_Poll(XHdcp22_Tx *InstancePtr)
{
	XHdcp22_Tx_StateType NewState;
	XHdcp22_Tx_TransitionFuncType *Transition;
	XHdcp22_Tx_AuthenticationType PrvAuthenticationStatus;

	Xil_AssertNonvoid(InstancePtr != NULL);

	/* return immediately if not enabled */
	if (InstancePtr->Info.IsEnabled == (FALSE))
		return (int)(InstancePtr->Info.AuthenticationStatus);

	/* Store the authentication status before executing the next state */
	PrvAuthenticationStatus = InstancePtr->Info.AuthenticationStatus;

	/* continue executing the statemachine */
	NewState = XHdcp22_Tx_StateTable[InstancePtr->Info.CurrentState](InstancePtr);
	Transition = transition_table[InstancePtr->Info.CurrentState][NewState];

	if (Transition != NULL)
		Transition(InstancePtr);

	InstancePtr->Info.PrvState = InstancePtr->Info.CurrentState;
	InstancePtr->Info.CurrentState = NewState;

	/* Log only if the AuthenticationStatus status changes and do not log
	 * XHDCP22_TX_AUTHENTICATION_BUSY to avoid polluting the log buffer
	 */
	if(PrvAuthenticationStatus != InstancePtr->Info.AuthenticationStatus &&
	   InstancePtr->Info.AuthenticationStatus != XHDCP22_TX_AUTHENTICATION_BUSY) {
		XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_POLL_RESULT,
		                (u8)InstancePtr->Info.AuthenticationStatus);
	}

	return (int)(InstancePtr->Info.AuthenticationStatus);
}
/*****************************************************************************/
/**
*
* This function is a executed every time to trigger the state machine.
* The user of HDCP22 TX is responsible to call this function on a regular base.
*
* @param   InstancePtr is a pointer to the XHdcp22Tx core instance.
*
* @return  Enumerated authentication status defined in
*          #XHdcp22_Tx_AuthenticationType.
*
* @note    None.
*
******************************************************************************/
This function is a executed every time to trigger the state machine.
The user of HDCP22 TX is responsible to call this function on a regular base.
This function is a executed every time to trigger the state machine . The user of HDCP22 TX is responsible to call this function on a regular base .
int XHdcp22Tx_Poll(XHdcp22_Tx *InstancePtr)
{
	XHdcp22_Tx_StateType NewState;
	XHdcp22_Tx_TransitionFuncType *Transition;
	XHdcp22_Tx_AuthenticationType PrvAuthenticationStatus;
	Xil_AssertNonvoid(InstancePtr != NULL);
	if (InstancePtr->Info.IsEnabled == (FALSE))
		return (int)(InstancePtr->Info.AuthenticationStatus);
	PrvAuthenticationStatus = InstancePtr->Info.AuthenticationStatus;
	NewState = XHdcp22_Tx_StateTable[InstancePtr->Info.CurrentState](InstancePtr);
	Transition = transition_table[InstancePtr->Info.CurrentState][NewState];
	if (Transition != NULL)
		Transition(InstancePtr);
	InstancePtr->Info.PrvState = InstancePtr->Info.CurrentState;
	InstancePtr->Info.CurrentState = NewState;
	if(PrvAuthenticationStatus != InstancePtr->Info.AuthenticationStatus &&
	   InstancePtr->Info.AuthenticationStatus != XHDCP22_TX_AUTHENTICATION_BUSY) {
		XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_POLL_RESULT,
		                (u8)InstancePtr->Info.AuthenticationStatus);
	}
	return (int)(InstancePtr->Info.AuthenticationStatus);
}
int XHdcp22Tx_Poll ( XHdcp22_Tx * InstancePtr ) { XHdcp22_Tx_StateType NewState ; XHdcp22_Tx_TransitionFuncType * Transition ; XHdcp22_Tx_AuthenticationType PrvAuthenticationStatus ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; if ( InstancePtr -> Info . IsEnabled == ( FALSE ) ) return ( int ) ( InstancePtr -> Info . AuthenticationStatus ) ; PrvAuthenticationStatus = InstancePtr -> Info . AuthenticationStatus ; NewState = XHdcp22_Tx_StateTable [ InstancePtr -> Info . CurrentState ] ( InstancePtr ) ; Transition = transition_table [ InstancePtr -> Info . CurrentState ] [ NewState ] ; if ( Transition != NULL ) Transition ( InstancePtr ) ; InstancePtr -> Info . PrvState = InstancePtr -> Info . CurrentState ; InstancePtr -> Info . CurrentState = NewState ; if ( PrvAuthenticationStatus != InstancePtr -> Info . AuthenticationStatus && InstancePtr -> Info . AuthenticationStatus != XHDCP22_TX_AUTHENTICATION_BUSY ) { XHdcp22Tx_LogWr ( InstancePtr , XHDCP22_TX_LOG_EVT_POLL_RESULT , ( u8 ) InstancePtr -> Info . AuthenticationStatus ) ; } return ( int ) ( InstancePtr -> Info . AuthenticationStatus ) ; }
This function is a executed every time to trigger the state machine.
This function is a executed every time to trigger the state machine .
/* return immediately if not enabled */ /* Store the authentication status before executing the next state */ /* continue executing the statemachine */ /* Log only if the AuthenticationStatus status changes and do not log
	 * XHDCP22_TX_AUTHENTICATION_BUSY to avoid polluting the log buffer
	 */