XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_cipher.c
int XHdcp1x_CipherGetB(const XHdcp1x *InstancePtr, u32 *X, u32 *Y, u32 *Z)
{
	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/* Check that it is not disabled */
	if (!XHdcp1x_CipherIsEnabled(InstancePtr)) {
		return (XST_NOT_ENABLED);
	}

	/* Get X if requested */
	if (X != NULL) {
		*X = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_CIPHER_Bx);
		*X &= 0x0FFFFFFFul;
	}

	/* Get Y if requested */
	if (Y != NULL) {
		*Y = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_CIPHER_By);
		*Y &= 0x0FFFFFFFul;
	}

	/* Get Z if requested */
	if (Z != NULL) {
		*Z = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_CIPHER_Bz);
		*Z &= 0x0FFFFFFFul;
	}

	return (XST_SUCCESS);
}
/*****************************************************************************/
/**
* This function reads the contents of the B register in BM0.
*
* @param	InstancePtr is the device to query.
* @param	X is to be loaded with the contents of Bx.
* @param	Y is to be loaded with the contents of By.
* @param	Z is to be loaded with the contents of Bz.
*
* @return
*		- XST_SUCCESS if successful.
*		- XST_NOT_ENABLED otherwise.
*
* @note		A NULL pointer can be passed in any of X, Y and Z.  If so, then
*		this portion of the B register is not returned to the caller.
*
******************************************************************************/
This function reads the contents of the B register in BM0.
This function reads the contents of the B register in BM0 .
int XHdcp1x_CipherGetB(const XHdcp1x *InstancePtr, u32 *X, u32 *Y, u32 *Z)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	if (!XHdcp1x_CipherIsEnabled(InstancePtr)) {
		return (XST_NOT_ENABLED);
	}
	if (X != NULL) {
		*X = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_CIPHER_Bx);
		*X &= 0x0FFFFFFFul;
	}
	if (Y != NULL) {
		*Y = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_CIPHER_By);
		*Y &= 0x0FFFFFFFul;
	}
	if (Z != NULL) {
		*Z = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_CIPHER_Bz);
		*Z &= 0x0FFFFFFFul;
	}
	return (XST_SUCCESS);
}
int XHdcp1x_CipherGetB ( const XHdcp1x * InstancePtr , u32 * X , u32 * Y , u32 * Z ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; if ( ! XHdcp1x_CipherIsEnabled ( InstancePtr ) ) { return ( XST_NOT_ENABLED ) ; } if ( X != NULL ) { * X = XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_CIPHER_Bx ) ; * X &= 0x0FFFFFFFul ; } if ( Y != NULL ) { * Y = XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_CIPHER_By ) ; * Y &= 0x0FFFFFFFul ; } if ( Z != NULL ) { * Z = XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_CIPHER_Bz ) ; * Z &= 0x0FFFFFFFul ; } return ( XST_SUCCESS ) ; }
This function reads the contents of the B register in BM0.
This function reads the contents of the B register in BM0 .
/* Verify arguments. */ /* Check that it is not disabled */ /* Get X if requested */ /* Get Y if requested */ /* Get Z if requested */