XilinxProcessorIPLib/drivers/hdcp22_tx/src/xhdcp22_tx_test.c
u8 XHdcp22Tx_TestSimulateTimeout(XHdcp22_Tx* InstancePtr)
{
	u8 SimTimeout = FALSE;

	/* Simulate a timeout if in testmode without RX (unit test) */
	if ((InstancePtr->Test.TestMode == XHDCP22_TX_TESTMODE_NO_RX ||
	     InstancePtr->Test.TestMode == XHDCP22_TX_TESTMODE_UNIT)&&
	     InstancePtr->Test.TestFlags&XHDCP22_TX_TEST_RCV_TIMEOUT)
	{
		switch(InstancePtr->Timer.ReasonId)
		{
			case XHDCP22_TX_AKE_SEND_CERT:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_CERT_RX, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_AKE_SEND_H_PRIME:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_H1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_AKE_SEND_PAIRING_INFO:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_EKH_KM, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_LC_SEND_L_PRIME:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_L1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_V1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_REPEATAUTH_STREAM_READY:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_M1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			default:
				SimTimeout = FALSE;
				break;
		}
	}
	return SimTimeout;
}
/*****************************************************************************/
/**
*
* Determine if a timeout should be simulated in uni test mode (NO_RX).
*
* @param  InstancePtr is a pointer to the HDcp22_Tx core instance.
*
* @return TRUE if a timeout must be simulated, FALSE if not.
*
* @note   None.
*
******************************************************************************/
Determine if a timeout should be simulated in uni test mode (NO_RX).
Determine if a timeout should be simulated in uni test mode ( NO_RX ) .
u8 XHdcp22Tx_TestSimulateTimeout(XHdcp22_Tx* InstancePtr)
{
	u8 SimTimeout = FALSE;
	if ((InstancePtr->Test.TestMode == XHDCP22_TX_TESTMODE_NO_RX ||
	     InstancePtr->Test.TestMode == XHDCP22_TX_TESTMODE_UNIT)&&
	     InstancePtr->Test.TestFlags&XHDCP22_TX_TEST_RCV_TIMEOUT)
	{
		switch(InstancePtr->Timer.ReasonId)
		{
			case XHDCP22_TX_AKE_SEND_CERT:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_CERT_RX, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_AKE_SEND_H_PRIME:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_H1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_AKE_SEND_PAIRING_INFO:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_EKH_KM, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_LC_SEND_L_PRIME:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_L1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_V1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			case XHDCP22_TX_REPEATAUTH_STREAM_READY:
				if (TEST_FLAG_SET(XHDCP22_TX_TEST_M1, InstancePtr->Test.TestFlags)) {
					SimTimeout = TRUE;
				}
				break;
			default:
				SimTimeout = FALSE;
				break;
		}
	}
	return SimTimeout;
}
u8 XHdcp22Tx_TestSimulateTimeout ( XHdcp22_Tx * InstancePtr ) { u8 SimTimeout = FALSE ; if ( ( InstancePtr -> Test . TestMode == XHDCP22_TX_TESTMODE_NO_RX || InstancePtr -> Test . TestMode == XHDCP22_TX_TESTMODE_UNIT ) && InstancePtr -> Test . TestFlags & XHDCP22_TX_TEST_RCV_TIMEOUT ) { switch ( InstancePtr -> Timer . ReasonId ) { case XHDCP22_TX_AKE_SEND_CERT : if ( TEST_FLAG_SET ( XHDCP22_TX_TEST_CERT_RX , InstancePtr -> Test . TestFlags ) ) { SimTimeout = TRUE ; } break ; case XHDCP22_TX_AKE_SEND_H_PRIME : if ( TEST_FLAG_SET ( XHDCP22_TX_TEST_H1 , InstancePtr -> Test . TestFlags ) ) { SimTimeout = TRUE ; } break ; case XHDCP22_TX_AKE_SEND_PAIRING_INFO : if ( TEST_FLAG_SET ( XHDCP22_TX_TEST_EKH_KM , InstancePtr -> Test . TestFlags ) ) { SimTimeout = TRUE ; } break ; case XHDCP22_TX_LC_SEND_L_PRIME : if ( TEST_FLAG_SET ( XHDCP22_TX_TEST_L1 , InstancePtr -> Test . TestFlags ) ) { SimTimeout = TRUE ; } break ; case XHDCP22_TX_REPEATAUTH_SEND_RECVID_LIST : if ( TEST_FLAG_SET ( XHDCP22_TX_TEST_V1 , InstancePtr -> Test . TestFlags ) ) { SimTimeout = TRUE ; } break ; case XHDCP22_TX_REPEATAUTH_STREAM_READY : if ( TEST_FLAG_SET ( XHDCP22_TX_TEST_M1 , InstancePtr -> Test . TestFlags ) ) { SimTimeout = TRUE ; } break ; default : SimTimeout = FALSE ; break ; } } return SimTimeout ; }
Determine if a timeout should be simulated in uni test mode (NO_RX).
Determine if a timeout should be simulated in uni test mode ( NO_RX ) .
/* Simulate a timeout if in testmode without RX (unit test) */