XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_cipher.c
int XHdcp1x_CipherSetKeySelect(XHdcp1x *InstancePtr, u8 KeySelect)
{
	int Status = XST_SUCCESS;
	u32 Value = 0;

	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(KeySelect < 8);

	/* Update the device */
	Value = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_KEYMGMT_CONTROL);
	Value &= ~XHDCP1X_CIPHER_BITMASK_KEYMGMT_CONTROL_SET_SELECT;
	Value |= (KeySelect << 16);
	XHdcp1x_WriteReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_KEYMGMT_CONTROL, Value);

	return (Status);
}
/*****************************************************************************/
/**
* This function configures the key selection value.
*
* @param	InstancePtr is the device to configure.
* @param	KeySelect is the desired key select value.
*
* @return
*		- XST_SUCCESS if successful.
*
* @note		None.
*
******************************************************************************/
This function configures the key selection value.
This function configures the key selection value .
int XHdcp1x_CipherSetKeySelect(XHdcp1x *InstancePtr, u8 KeySelect)
{
	int Status = XST_SUCCESS;
	u32 Value = 0;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(KeySelect < 8);
	Value = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_KEYMGMT_CONTROL);
	Value &= ~XHDCP1X_CIPHER_BITMASK_KEYMGMT_CONTROL_SET_SELECT;
	Value |= (KeySelect << 16);
	XHdcp1x_WriteReg(InstancePtr->Config.BaseAddress,
		XHDCP1X_CIPHER_REG_KEYMGMT_CONTROL, Value);
	return (Status);
}
int XHdcp1x_CipherSetKeySelect ( XHdcp1x * InstancePtr , u8 KeySelect ) { int Status = XST_SUCCESS ; u32 Value = 0 ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( KeySelect < 8 ) ; Value = XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_KEYMGMT_CONTROL ) ; Value &= ~ XHDCP1X_CIPHER_BITMASK_KEYMGMT_CONTROL_SET_SELECT ; Value |= ( KeySelect << 16 ) ; XHdcp1x_WriteReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_KEYMGMT_CONTROL , Value ) ; return ( Status ) ; }
This function configures the key selection value.
This function configures the key selection value .
/* Verify arguments. */ /* Update the device */