XilinxProcessorIPLib/drivers/hdcp22_rx_dp/src/xhdcp22_rx.c
static void XHdcp22Rx_SetRxStatus(XHdcp22_Rx *InstancePtr, u16 MessageSize, u8 ReauthReq, u8 TopologyReady)
{
	/* Verify arguments */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(MessageSize <= 0x03FF);

	u8 RxStatus[2] = {0, 0};

	/* Update RxStatus[11:0] */
	RxStatus[1] &= (0x0C00 >> 8);                  // Clear fields except for RxStatus[11:10], REAUTH_REQ and READY
	RxStatus[0] = (MessageSize & 0x00FF);          // Update RxStatus[7:0], Message_Size
	RxStatus[1] |= ((MessageSize & 0x0300) >> 8);  // Update RxStatus[9:8], Message_Size
	if(TopologyReady)
		RxStatus[1] |= (0x0400 >> 8);                // Set RxStatus[10], READY bit
	if(ReauthReq)
		RxStatus[1] |= (0x0800 >> 8);                // Set RxStatus[11], REAUTH_REQ bit

	/* Set RxStatus */
	InstancePtr->Handles.DdcSetAddressCallback(InstancePtr->Handles.DdcSetAddressCallbackRef, XHDCP22_RX_DDC_RXSTATUS0_REG);
	InstancePtr->Handles.DdcSetDataCallback(InstancePtr->Handles.DdcSetDataCallbackRef, RxStatus[0]);
	InstancePtr->Handles.DdcSetAddressCallback(InstancePtr->Handles.DdcSetAddressCallbackRef, XHDCP22_RX_DDC_RXSTATUS1_REG);
	InstancePtr->Handles.DdcSetDataCallback(InstancePtr->Handles.DdcSetDataCallbackRef, RxStatus[1]);

	/* Clear DDC read message buffer ready */
	if (MessageSize > 0)
		InstancePtr->Info.DdcFlag &= ~XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY;
}
/*****************************************************************************/
/**
* This function sets the DDC RxStatus registers (0x70-0x71) MessageSize bits.
* The HDCP22-RX state machine calls this function immediately after writing
* a complete message into the read message buffer. The repeater READY bit
* can also be updated in conjunction to the message size.
*
* @param  InstancePtr is a pointer to the XHdcp22_Rx core instance.
* @param  MessageSize indicates the size in bytes of the message
*         available in the read message buffer.
* @param  ReauthReq is set to TRUE to assert the REAUTH_REQ bit.
* @param  TopologyReady is set to TRUE to assert the READY bit.
*
* @return None.
*
* @note	  None.
******************************************************************************/
This function sets the DDC RxStatus registers (0x70-0x71) MessageSize bits.
The HDCP22-RX state machine calls this function immediately after writing
a complete message into the read message buffer. The repeater READY bit
can also be updated in conjunction to the message size.
This function sets the DDC RxStatus registers ( 0x70 - 0x71 ) MessageSize bits . The HDCP22 - RX state machine calls this function immediately after writing a complete message into the read message buffer . The repeater READY bit can also be updated in conjunction to the message size .
static void XHdcp22Rx_SetRxStatus(XHdcp22_Rx *InstancePtr, u16 MessageSize, u8 ReauthReq, u8 TopologyReady)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(MessageSize <= 0x03FF);
	u8 RxStatus[2] = {0, 0};
	RxStatus[1] &= (0x0C00 >> 8);                  
	RxStatus[0] = (MessageSize & 0x00FF);          
	RxStatus[1] |= ((MessageSize & 0x0300) >> 8);  
	if(TopologyReady)
		RxStatus[1] |= (0x0400 >> 8);                
	if(ReauthReq)
		RxStatus[1] |= (0x0800 >> 8);                
	InstancePtr->Handles.DdcSetAddressCallback(InstancePtr->Handles.DdcSetAddressCallbackRef, XHDCP22_RX_DDC_RXSTATUS0_REG);
	InstancePtr->Handles.DdcSetDataCallback(InstancePtr->Handles.DdcSetDataCallbackRef, RxStatus[0]);
	InstancePtr->Handles.DdcSetAddressCallback(InstancePtr->Handles.DdcSetAddressCallbackRef, XHDCP22_RX_DDC_RXSTATUS1_REG);
	InstancePtr->Handles.DdcSetDataCallback(InstancePtr->Handles.DdcSetDataCallbackRef, RxStatus[1]);
	if (MessageSize > 0)
		InstancePtr->Info.DdcFlag &= ~XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY;
}
static void XHdcp22Rx_SetRxStatus ( XHdcp22_Rx * InstancePtr , u16 MessageSize , u8 ReauthReq , u8 TopologyReady ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( MessageSize <= 0x03FF ) ; u8 RxStatus [ 2 ] = { 0 , 0 } ; RxStatus [ 1 ] &= ( 0x0C00 >> 8 ) ; RxStatus [ 0 ] = ( MessageSize & 0x00FF ) ; RxStatus [ 1 ] |= ( ( MessageSize & 0x0300 ) >> 8 ) ; if ( TopologyReady ) RxStatus [ 1 ] |= ( 0x0400 >> 8 ) ; if ( ReauthReq ) RxStatus [ 1 ] |= ( 0x0800 >> 8 ) ; InstancePtr -> Handles . DdcSetAddressCallback ( InstancePtr -> Handles . DdcSetAddressCallbackRef , XHDCP22_RX_DDC_RXSTATUS0_REG ) ; InstancePtr -> Handles . DdcSetDataCallback ( InstancePtr -> Handles . DdcSetDataCallbackRef , RxStatus [ 0 ] ) ; InstancePtr -> Handles . DdcSetAddressCallback ( InstancePtr -> Handles . DdcSetAddressCallbackRef , XHDCP22_RX_DDC_RXSTATUS1_REG ) ; InstancePtr -> Handles . DdcSetDataCallback ( InstancePtr -> Handles . DdcSetDataCallbackRef , RxStatus [ 1 ] ) ; if ( MessageSize > 0 ) InstancePtr -> Info . DdcFlag &= ~ XHDCP22_RX_DDC_FLAG_READ_MESSAGE_READY ; }
This function sets the DDC RxStatus registers (0x70-0x71) MessageSize bits.
This function sets the DDC RxStatus registers ( 0x70 - 0x71 ) MessageSize bits .
/* Verify arguments */ /* Update RxStatus[11:0] */ // Clear fields except for RxStatus[11:10], REAUTH_REQ and READY // Update RxStatus[7:0], Message_Size // Update RxStatus[9:8], Message_Size // Set RxStatus[10], READY bit // Set RxStatus[11], REAUTH_REQ bit /* Set RxStatus */ /* Clear DDC read message buffer ready */