XilinxProcessorIPLib/drivers/hdcp22_rx/src/xhdcp22_rx.c
static int XHdcp22Rx_PollMessage(XHdcp22_Rx *InstancePtr)
{
	/* Verify arguments */
	Xil_AssertNonvoid(InstancePtr != NULL);

	u32 Size = 0;
	u32 Offset = 0;

	/* Get message */
	if(XHdcp22Rx_IsWriteMessageAvailable(InstancePtr) == TRUE)
	{
		Size = InstancePtr->Handles.DdcGetWriteBufferSizeCallback(InstancePtr->Handles.DdcGetWriteBufferSizeCallbackRef);

		InstancePtr->Handles.DdcSetAddressCallback(InstancePtr->Handles.DdcSetAddressCallbackRef, XHDCP22_RX_DDC_WRITE_REG);

		for(Offset = 0; Offset < Size; Offset++)
		{
			InstancePtr->MessageBuffer[Offset] = InstancePtr->Handles.DdcGetDataCallback(InstancePtr->Handles.DdcGetDataCallbackRef);
		}
	}

	return Size;
}
/*****************************************************************************/
/**
* This function uses polling to read a complete message out of the read
* message buffer.
*
* @param	InstancePtr is a pointer to the XHdcp22_Rx core instance.
*
* @return	Size of message read out of read message buffer.
*
* @note		None.
******************************************************************************/
This function uses polling to read a complete message out of the read
message buffer.
This function uses polling to read a complete message out of the read message buffer .
static int XHdcp22Rx_PollMessage(XHdcp22_Rx *InstancePtr)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	u32 Size = 0;
	u32 Offset = 0;
	if(XHdcp22Rx_IsWriteMessageAvailable(InstancePtr) == TRUE)
	{
		Size = InstancePtr->Handles.DdcGetWriteBufferSizeCallback(InstancePtr->Handles.DdcGetWriteBufferSizeCallbackRef);
		InstancePtr->Handles.DdcSetAddressCallback(InstancePtr->Handles.DdcSetAddressCallbackRef, XHDCP22_RX_DDC_WRITE_REG);
		for(Offset = 0; Offset < Size; Offset++)
		{
			InstancePtr->MessageBuffer[Offset] = InstancePtr->Handles.DdcGetDataCallback(InstancePtr->Handles.DdcGetDataCallbackRef);
		}
	}
	return Size;
}
static int XHdcp22Rx_PollMessage ( XHdcp22_Rx * InstancePtr ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; u32 Size = 0 ; u32 Offset = 0 ; if ( XHdcp22Rx_IsWriteMessageAvailable ( InstancePtr ) == TRUE ) { Size = InstancePtr -> Handles . DdcGetWriteBufferSizeCallback ( InstancePtr -> Handles . DdcGetWriteBufferSizeCallbackRef ) ; InstancePtr -> Handles . DdcSetAddressCallback ( InstancePtr -> Handles . DdcSetAddressCallbackRef , XHDCP22_RX_DDC_WRITE_REG ) ; for ( Offset = 0 ; Offset < Size ; Offset ++ ) { InstancePtr -> MessageBuffer [ Offset ] = InstancePtr -> Handles . DdcGetDataCallback ( InstancePtr -> Handles . DdcGetDataCallbackRef ) ; } } return Size ; }
This function uses polling to read a complete message out of the read
message buffer.
This function uses polling to read a complete message out of the read message buffer .
/* Verify arguments */ /* Get message */