XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/xhdcp22_tx.c
XHdcp22_Tx_LogItem* XHdcp22Tx_LogRd(XHdcp22_Tx *InstancePtr)
{
	XHdcp22_Tx_LogItem* LogPtr;
	u16 Tail = 0;
	u16 Head = 0;

	/* Verify argument. */
	Xil_AssertNonvoid(InstancePtr != NULL);

	Tail = InstancePtr->Log.Tail;
	Head = InstancePtr->Log.Head;

	/* Check if there is any data in the log and return a NONE defined log item */
	if (Tail == Head) {
		LogPtr = &InstancePtr->Log.LogItems[Tail];
		LogPtr->Data = 0;
		LogPtr->LogEvent = XHDCP22_TX_LOG_EVT_NONE;
		LogPtr->TimeStamp = 0;
		return LogPtr;
	}

	LogPtr = &InstancePtr->Log.LogItems[Tail];

	/* Increment tail pointer */
	if (Tail == XHDCP22_TX_LOG_BUFFER_SIZE - 1) {
		InstancePtr->Log.Tail = 0;
	}
	else {
		InstancePtr->Log.Tail++;
	}
	return LogPtr;
}
/*****************************************************************************/
/**
*
* This function provides the log information from the log buffer.
*
* @param  InstancePtr is a pointer to the XHdcp22_Tx core instance.
*
* @return
*         - Content of log buffer if log pointers are not equal.
*         - Otherwise Zero.
*
* @note   None.
*
******************************************************************************/
This function provides the log information from the log buffer.
This function provides the log information from the log buffer .
XHdcp22_Tx_LogItem* XHdcp22Tx_LogRd(XHdcp22_Tx *InstancePtr)
{
	XHdcp22_Tx_LogItem* LogPtr;
	u16 Tail = 0;
	u16 Head = 0;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Tail = InstancePtr->Log.Tail;
	Head = InstancePtr->Log.Head;
	if (Tail == Head) {
		LogPtr = &InstancePtr->Log.LogItems[Tail];
		LogPtr->Data = 0;
		LogPtr->LogEvent = XHDCP22_TX_LOG_EVT_NONE;
		LogPtr->TimeStamp = 0;
		return LogPtr;
	}
	LogPtr = &InstancePtr->Log.LogItems[Tail];
	if (Tail == XHDCP22_TX_LOG_BUFFER_SIZE - 1) {
		InstancePtr->Log.Tail = 0;
	}
	else {
		InstancePtr->Log.Tail++;
	}
	return LogPtr;
}
XHdcp22_Tx_LogItem * XHdcp22Tx_LogRd ( XHdcp22_Tx * InstancePtr ) { XHdcp22_Tx_LogItem * LogPtr ; u16 Tail = 0 ; u16 Head = 0 ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Tail = InstancePtr -> Log . Tail ; Head = InstancePtr -> Log . Head ; if ( Tail == Head ) { LogPtr = & InstancePtr -> Log . LogItems [ Tail ] ; LogPtr -> Data = 0 ; LogPtr -> LogEvent = XHDCP22_TX_LOG_EVT_NONE ; LogPtr -> TimeStamp = 0 ; return LogPtr ; } LogPtr = & InstancePtr -> Log . LogItems [ Tail ] ; if ( Tail == XHDCP22_TX_LOG_BUFFER_SIZE - 1 ) { InstancePtr -> Log . Tail = 0 ; } else { InstancePtr -> Log . Tail ++ ; } return LogPtr ; }
This function provides the log information from the log buffer.
This function provides the log information from the log buffer .
/* Verify argument. */ /* Check if there is any data in the log and return a NONE defined log item */ /* Increment tail pointer */