XilinxProcessorIPLib/drivers/hdcp1x/src/xhdcp1x_cipher_intr.c
int XHdcp1x_CipherSetLinkStateCheck(XHdcp1x *InstancePtr, int IsEnabled)
{
	int Status = XST_SUCCESS;

	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/* Check DP receive */
	if (XHdcp1x_IsDP(InstancePtr) && XHdcp1x_IsRX(InstancePtr)) {
		u32 Val = 0;

		/* Clear any pending link state failure interrupt */
		XHdcp1x_WriteReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_INTERRUPT_STATUS,
			XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL);

		/* Update it */
		Val = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_INTERRUPT_MASK);
		if (IsEnabled) {
			Val &= ~XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL;
		}
		else {
			Val |= XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL;
		}
		XHdcp1x_WriteReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_INTERRUPT_MASK, Val);
	}
	else {
		Status = XST_FAILURE;
	}

	return (Status);
}
/*****************************************************************************/
/**
* This function enables/disables the reporting of link check state changes.
*
* @param	InstancePtr is the cipher core instance.
* @param	IsEnabled enables/disables link state change notifications.
*
* @return
*		- XST_SUCCESS if successful.
*		- XST_FAILURE otherwise.
*
* @note		None.
*
******************************************************************************/
This function enables/disables the reporting of link check state changes.
This function enables / disables the reporting of link check state changes .
int XHdcp1x_CipherSetLinkStateCheck(XHdcp1x *InstancePtr, int IsEnabled)
{
	int Status = XST_SUCCESS;
	Xil_AssertNonvoid(InstancePtr != NULL);
	if (XHdcp1x_IsDP(InstancePtr) && XHdcp1x_IsRX(InstancePtr)) {
		u32 Val = 0;
		XHdcp1x_WriteReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_INTERRUPT_STATUS,
			XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL);
		Val = XHdcp1x_ReadReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_INTERRUPT_MASK);
		if (IsEnabled) {
			Val &= ~XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL;
		}
		else {
			Val |= XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL;
		}
		XHdcp1x_WriteReg(InstancePtr->Config.BaseAddress,
			XHDCP1X_CIPHER_REG_INTERRUPT_MASK, Val);
	}
	else {
		Status = XST_FAILURE;
	}
	return (Status);
}
int XHdcp1x_CipherSetLinkStateCheck ( XHdcp1x * InstancePtr , int IsEnabled ) { int Status = XST_SUCCESS ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; if ( XHdcp1x_IsDP ( InstancePtr ) && XHdcp1x_IsRX ( InstancePtr ) ) { u32 Val = 0 ; XHdcp1x_WriteReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_INTERRUPT_STATUS , XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL ) ; Val = XHdcp1x_ReadReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_INTERRUPT_MASK ) ; if ( IsEnabled ) { Val &= ~ XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL ; } else { Val |= XHDCP1X_CIPHER_BITMASK_INTERRUPT_LINK_FAIL ; } XHdcp1x_WriteReg ( InstancePtr -> Config . BaseAddress , XHDCP1X_CIPHER_REG_INTERRUPT_MASK , Val ) ; } else { Status = XST_FAILURE ; } return ( Status ) ; }
This function enables/disables the reporting of link check state changes.
This function enables / disables the reporting of link check state changes .
/* Verify arguments */ /* Check DP receive */ /* Clear any pending link state failure interrupt */ /* Update it */