XilinxProcessorIPLib/drivers/v_hdmirxss/src/xv_hdmirxss_log.c
u16 XV_HdmiRxSs_LogRead(XV_HdmiRxSs *InstancePtr)
{
	u16 Log;

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

    /* Check if there is any data in the log */
    if (InstancePtr->Log.TailIndex == InstancePtr->Log.HeadIndex) {
        Log = 0;
    }
    else {
        Log = InstancePtr->Log.DataBuffer[InstancePtr->Log.TailIndex];

        /* Increment tail pointer */
        if (InstancePtr->Log.TailIndex ==
            (u8)((sizeof(InstancePtr->Log.DataBuffer) /
					sizeof(InstancePtr->Log.DataBuffer[0])) - 1)) {
            InstancePtr->Log.TailIndex = 0;
        }
        else {
            InstancePtr->Log.TailIndex++;
        }
    }

    return Log;
}
/*****************************************************************************/
/**
* This function will read the last event from the log.
*
* @param    InstancePtr is a pointer to the XV_HdmiRxSs core instance.
*
* @return   The log data.
*
* @note     None.
*
******************************************************************************/
This function will read the last event from the log.
This function will read the last event from the log .
u16 XV_HdmiRxSs_LogRead(XV_HdmiRxSs *InstancePtr)
{
	u16 Log;
    Xil_AssertNonvoid(InstancePtr != NULL);
    if (InstancePtr->Log.TailIndex == InstancePtr->Log.HeadIndex) {
        Log = 0;
    }
    else {
        Log = InstancePtr->Log.DataBuffer[InstancePtr->Log.TailIndex];
        if (InstancePtr->Log.TailIndex ==
            (u8)((sizeof(InstancePtr->Log.DataBuffer) /
					sizeof(InstancePtr->Log.DataBuffer[0])) - 1)) {
            InstancePtr->Log.TailIndex = 0;
        }
        else {
            InstancePtr->Log.TailIndex++;
        }
    }
    return Log;
}
u16 XV_HdmiRxSs_LogRead ( XV_HdmiRxSs * InstancePtr ) { u16 Log ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; if ( InstancePtr -> Log . TailIndex == InstancePtr -> Log . HeadIndex ) { Log = 0 ; } else { Log = InstancePtr -> Log . DataBuffer [ InstancePtr -> Log . TailIndex ] ; if ( InstancePtr -> Log . TailIndex == ( u8 ) ( ( sizeof ( InstancePtr -> Log . DataBuffer ) / sizeof ( InstancePtr -> Log . DataBuffer [ 0 ] ) ) - 1 ) ) { InstancePtr -> Log . TailIndex = 0 ; } else { InstancePtr -> Log . TailIndex ++ ; } } return Log ; }
This function will read the last event from the log.
This function will read the last event from the log .
/* Verify argument. */ /* Check if there is any data in the log */ /* Increment tail pointer */