XilinxProcessorIPLib/drivers/hdcp22_cipher/src/xhdcp22_cipher_selftest.c
int XHdcp22Cipher_SelfTest(XHdcp22_Cipher *InstancePtr)
{
	int Status = (XST_SUCCESS);
	u32 RegValue;

	/* Verify argument. */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/* Read PIO ID */
	RegValue = XHdcp22Cipher_ReadReg(InstancePtr->Config.BaseAddress,
					(XHDCP22_CIPHER_VER_ID_OFFSET));

	RegValue = ((RegValue) >> (XHDCP22_CIPHER_SHIFT_16)) & (XHDCP22_CIPHER_MASK_16);

	if (RegValue != (XHDCP22_CIPHER_VER_ID)) {
		Status = (XST_FAILURE);
	}

	return Status;
}
/*****************************************************************************/
/**
*
* This function reads ID of the peripheral.
*
* @param  InstancePtr is a pointer to the HDCP22 Cipher core instance.
*
* @return
*     - XST_SUCCESS if ID was matched.
*     - XST_FAILURE if ID was mismatched.
*
* @note None.
*
******************************************************************************/
This function reads ID of the peripheral.
This function reads ID of the peripheral .
int XHdcp22Cipher_SelfTest(XHdcp22_Cipher *InstancePtr)
{
	int Status = (XST_SUCCESS);
	u32 RegValue;
	Xil_AssertNonvoid(InstancePtr != NULL);
	RegValue = XHdcp22Cipher_ReadReg(InstancePtr->Config.BaseAddress,
					(XHDCP22_CIPHER_VER_ID_OFFSET));
	RegValue = ((RegValue) >> (XHDCP22_CIPHER_SHIFT_16)) & (XHDCP22_CIPHER_MASK_16);
	if (RegValue != (XHDCP22_CIPHER_VER_ID)) {
		Status = (XST_FAILURE);
	}
	return Status;
}
int XHdcp22Cipher_SelfTest ( XHdcp22_Cipher * InstancePtr ) { int Status = ( XST_SUCCESS ) ; u32 RegValue ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; RegValue = XHdcp22Cipher_ReadReg ( InstancePtr -> Config . BaseAddress , ( XHDCP22_CIPHER_VER_ID_OFFSET ) ) ; RegValue = ( ( RegValue ) >> ( XHDCP22_CIPHER_SHIFT_16 ) ) & ( XHDCP22_CIPHER_MASK_16 ) ; if ( RegValue != ( XHDCP22_CIPHER_VER_ID ) ) { Status = ( XST_FAILURE ) ; } return Status ; }
This function reads ID of the peripheral.
This function reads ID of the peripheral .
/* Verify argument. */ /* Read PIO ID */