XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/xhdcp22_tx.c
static int XHdcp22Tx_WriteLcInit(XHdcp22_Tx *InstancePtr, const u8* RnPtr)
{
	XHdcp22_Tx_DDCMessage* MsgPtr =
	                      (XHdcp22_Tx_DDCMessage*)InstancePtr->MessageBuffer;

	XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_DBG,
	                XHDCP22_TX_LOG_DBG_TX_LCINIT);

	MsgPtr->DdcAddress = XHDCP22_TX_HDCPPORT_WRITE_MSG_OFFSET;
	MsgPtr->Message.MsgId = XHDCP22_TX_LC_INIT;

	memcpy(MsgPtr->Message.LCInit.Rn, RnPtr, sizeof(MsgPtr->Message.LCInit.Rn));

	if (InstancePtr->Config.Protocol == XHDCP22_TX_DP) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"HDCP22TX: Writing LC_INIT\n\r");
		return XHdcp22Tx_Dp_Write_Dpcd_Msg(InstancePtr);
	} else {
		/* Execute write */
		return InstancePtr->DdcWrite(XHDCP22_TX_DDC_BASE_ADDRESS,
				sizeof(XHdcp22_Tx_LCInit)+1, (u8 *)MsgPtr,
				(TRUE), InstancePtr->DdcHandlerRef);
	}
}
/*****************************************************************************/
/**
*
* This function write a locality check has value.
*
* @param  InstancePtr is a pointer to the XHdcp22Tx core instance.
* @param  RnPtr is a pointer to the XHdcp22Tx core instance.
*
* @return
*         - XST_SUCCESS if writing succeeded
*         - XST_FAILURE if failed to write
*
* @note   None.
*
******************************************************************************/
This function write a locality check has value.
This function write a locality check has value .
static int XHdcp22Tx_WriteLcInit(XHdcp22_Tx *InstancePtr, const u8* RnPtr)
{
	XHdcp22_Tx_DDCMessage* MsgPtr =
	                      (XHdcp22_Tx_DDCMessage*)InstancePtr->MessageBuffer;
	XHdcp22Tx_LogWr(InstancePtr, XHDCP22_TX_LOG_EVT_DBG,
	                XHDCP22_TX_LOG_DBG_TX_LCINIT);
	MsgPtr->DdcAddress = XHDCP22_TX_HDCPPORT_WRITE_MSG_OFFSET;
	MsgPtr->Message.MsgId = XHDCP22_TX_LC_INIT;
	memcpy(MsgPtr->Message.LCInit.Rn, RnPtr, sizeof(MsgPtr->Message.LCInit.Rn));
	if (InstancePtr->Config.Protocol == XHDCP22_TX_DP) {
		xdbg_printf(XDBG_DEBUG_GENERAL,"HDCP22TX: Writing LC_INIT\n\r");
		return XHdcp22Tx_Dp_Write_Dpcd_Msg(InstancePtr);
	} else {
		return InstancePtr->DdcWrite(XHDCP22_TX_DDC_BASE_ADDRESS,
				sizeof(XHdcp22_Tx_LCInit)+1, (u8 *)MsgPtr,
				(TRUE), InstancePtr->DdcHandlerRef);
	}
}
static int XHdcp22Tx_WriteLcInit ( XHdcp22_Tx * InstancePtr , const u8 * RnPtr ) { XHdcp22_Tx_DDCMessage * MsgPtr = ( XHdcp22_Tx_DDCMessage * ) InstancePtr -> MessageBuffer ; XHdcp22Tx_LogWr ( InstancePtr , XHDCP22_TX_LOG_EVT_DBG , XHDCP22_TX_LOG_DBG_TX_LCINIT ) ; MsgPtr -> DdcAddress = XHDCP22_TX_HDCPPORT_WRITE_MSG_OFFSET ; MsgPtr -> Message . MsgId = XHDCP22_TX_LC_INIT ; memcpy ( MsgPtr -> Message . LCInit . Rn , RnPtr , sizeof ( MsgPtr -> Message . LCInit . Rn ) ) ; if ( InstancePtr -> Config . Protocol == XHDCP22_TX_DP ) { xdbg_printf ( XDBG_DEBUG_GENERAL , " \n \r " ) ; return XHdcp22Tx_Dp_Write_Dpcd_Msg ( InstancePtr ) ; } else { return InstancePtr -> DdcWrite ( XHDCP22_TX_DDC_BASE_ADDRESS , sizeof ( XHdcp22_Tx_LCInit ) + 1 , ( u8 * ) MsgPtr , ( TRUE ) , InstancePtr -> DdcHandlerRef ) ; } }
This function write a locality check has value.
This function write a locality check has value .
/* Execute write */