XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_rx.c
static void XHdcp1x_RxDoTheState(XHdcp1x *InstancePtr, XHdcp1x_EventType Event)
{
	XHdcp1x_StateType NextState = InstancePtr->Rx.CurrentState;

	/* Case-wise process the kind of state called */
	switch (InstancePtr->Rx.CurrentState) {
		/* For the disabled state */
		case XHDCP1X_STATE_DISABLED:
			XHdcp1x_RxRunDisabledState(InstancePtr,
					Event, &NextState);
			break;

		/* For the unauthenticated state */
		case XHDCP1X_STATE_UNAUTHENTICATED:
			XHdcp1x_RxRunUnauthenticatedState(InstancePtr,
					Event, &NextState);
			break;

		/* For the computations state */
		case XHDCP1X_STATE_COMPUTATIONS:
			XHdcp1x_RxRunComputationsState(InstancePtr,
					Event, &NextState);
			break;

		/* For the Wait For Downstream state */
		case XHDCP1X_STATE_WAITFORDOWNSTREAM:
			XHdcp1x_RxRunWaitForDownstreamState(InstancePtr,
					Event, &NextState);
			break;

		/* For the assemble ksv list state */
		case XHDCP1X_STATE_ASSEMBLEKSVLIST:
			XHdcp1x_RxRunAssembleKsvListState(InstancePtr,
					Event, &NextState);
			break;

		/* For the authenticated state */
		case XHDCP1X_STATE_AUTHENTICATED:
			XHdcp1x_RxRunAuthenticatedState(InstancePtr,
					Event, &NextState);
			break;

		/* For the link integrity failed state */
		case XHDCP1X_STATE_LINKINTEGRITYFAILED:
			XHdcp1x_RxRunLinkIntegrityFailedState(InstancePtr,
					Event, &NextState);
			break;

		/* For the physical layer down state */
		case XHDCP1X_STATE_PHYDOWN:
			XHdcp1x_RxRunPhysicalLayerDownState(InstancePtr,
					Event, &NextState);
			break;

		/* Otherwise */
		default:
			break;
	}

	/* Check for state change */
	while (InstancePtr->Rx.CurrentState != NextState) {
		/* Perform the state transition */
		XHdcp1x_RxExitState(InstancePtr,
				InstancePtr->Rx.CurrentState);
		InstancePtr->Rx.PreviousState = InstancePtr->Rx.CurrentState;
		InstancePtr->Rx.CurrentState = NextState;
		XHdcp1x_RxEnterState(InstancePtr,
				InstancePtr->Rx.CurrentState,
				&NextState);
	}
}
/*****************************************************************************/
/**
* This function drives a HDCP receiver state machine.
*
* @param	InstancePtr is the receiver instance.
* @param	Event is the event to process.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function drives a HDCP receiver state machine.
This function drives a HDCP receiver state machine .
static void XHdcp1x_RxDoTheState(XHdcp1x *InstancePtr, XHdcp1x_EventType Event)
{
	XHdcp1x_StateType NextState = InstancePtr->Rx.CurrentState;
	switch (InstancePtr->Rx.CurrentState) {
		case XHDCP1X_STATE_DISABLED:
			XHdcp1x_RxRunDisabledState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_UNAUTHENTICATED:
			XHdcp1x_RxRunUnauthenticatedState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_COMPUTATIONS:
			XHdcp1x_RxRunComputationsState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_WAITFORDOWNSTREAM:
			XHdcp1x_RxRunWaitForDownstreamState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_ASSEMBLEKSVLIST:
			XHdcp1x_RxRunAssembleKsvListState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_AUTHENTICATED:
			XHdcp1x_RxRunAuthenticatedState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_LINKINTEGRITYFAILED:
			XHdcp1x_RxRunLinkIntegrityFailedState(InstancePtr,
					Event, &NextState);
			break;
		case XHDCP1X_STATE_PHYDOWN:
			XHdcp1x_RxRunPhysicalLayerDownState(InstancePtr,
					Event, &NextState);
			break;
		default:
			break;
	}
	while (InstancePtr->Rx.CurrentState != NextState) {
		XHdcp1x_RxExitState(InstancePtr,
				InstancePtr->Rx.CurrentState);
		InstancePtr->Rx.PreviousState = InstancePtr->Rx.CurrentState;
		InstancePtr->Rx.CurrentState = NextState;
		XHdcp1x_RxEnterState(InstancePtr,
				InstancePtr->Rx.CurrentState,
				&NextState);
	}
}
static void XHdcp1x_RxDoTheState ( XHdcp1x * InstancePtr , XHdcp1x_EventType Event ) { XHdcp1x_StateType NextState = InstancePtr -> Rx . CurrentState ; switch ( InstancePtr -> Rx . CurrentState ) { case XHDCP1X_STATE_DISABLED : XHdcp1x_RxRunDisabledState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_UNAUTHENTICATED : XHdcp1x_RxRunUnauthenticatedState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_COMPUTATIONS : XHdcp1x_RxRunComputationsState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_WAITFORDOWNSTREAM : XHdcp1x_RxRunWaitForDownstreamState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_ASSEMBLEKSVLIST : XHdcp1x_RxRunAssembleKsvListState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_AUTHENTICATED : XHdcp1x_RxRunAuthenticatedState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_LINKINTEGRITYFAILED : XHdcp1x_RxRunLinkIntegrityFailedState ( InstancePtr , Event , & NextState ) ; break ; case XHDCP1X_STATE_PHYDOWN : XHdcp1x_RxRunPhysicalLayerDownState ( InstancePtr , Event , & NextState ) ; break ; default : break ; } while ( InstancePtr -> Rx . CurrentState != NextState ) { XHdcp1x_RxExitState ( InstancePtr , InstancePtr -> Rx . CurrentState ) ; InstancePtr -> Rx . PreviousState = InstancePtr -> Rx . CurrentState ; InstancePtr -> Rx . CurrentState = NextState ; XHdcp1x_RxEnterState ( InstancePtr , InstancePtr -> Rx . CurrentState , & NextState ) ; } }
This function drives a HDCP receiver state machine.
This function drives a HDCP receiver state machine .
/* Case-wise process the kind of state called */ /* For the disabled state */ /* For the unauthenticated state */ /* For the computations state */ /* For the Wait For Downstream state */ /* For the assemble ksv list state */ /* For the authenticated state */ /* For the link integrity failed state */ /* For the physical layer down state */ /* Otherwise */ /* Check for state change */ /* Perform the state transition */