XilinxProcessorIPLib/drivers/i2srx/src/xi2srx_debug.c
void XI2s_Rx_LogDisplay(XI2s_Rx *InstancePtr)
{
	XI2s_Rx_LogItem* LogPtr = NULL;

	/* Verify arguments */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid((InstancePtr)->Log.IsEnabled == TRUE);
	XI2s_Rx_LogEvt prevEvt = XI2S_RX_LOG_EVT_INVALID;
	int Count = 0;

	xil_printf("--------XI2S Receiver Log Start--------\n\r");
	while (1) {
		LogPtr = XI2s_Rx_LogRead(InstancePtr);
		/* if buffer is empty, NULL is returned */
		if (LogPtr == NULL) {
			if (Count != 0)
				xil_printf("..Repeats %d times..\n\r", Count);

			break;
		}
		if (prevEvt == LogPtr->Event) {
			Count++;
			continue;
		} else {
			if (Count != 0)
				xil_printf("..Repeats %d times..\n\r", Count);
			Count = 0;
		}
		xil_printf("XI2S Receiver %x: ", InstancePtr->Config.DeviceId);
		switch (LogPtr->Event) {
		case XI2S_RX_AES_BLKCMPLT_EVT:
			xil_printf("AES Block Complete Detected.\n\r");
			break;
		case XI2S_RX_AUD_OVERFLOW_EVT:
			xil_printf("Audio Overflow Detected.\n\r");
			break;
		default:
			xil_printf("Unknown Log Entry.\n\r");
			break;
		}
		prevEvt = LogPtr->Event;
	}
	xil_printf("--------XI2S Receiver Log End--------\n\r");
}
/*****************************************************************************/
/**
 * This function prints the contents of the logging buffer.
 * @param InstancePtr is a pointer to the XI2s_Rx instance.
 * @return None.
 * @note None.
 *
 *****************************************************************************/
This function prints the contents of the logging buffer.
@param InstancePtr is a pointer to the XI2s_Rx instance.
@return None.
@note None.
This function prints the contents of the logging buffer . @param InstancePtr is a pointer to the XI2s_Rx instance . @return None . @note None .
void XI2s_Rx_LogDisplay(XI2s_Rx *InstancePtr)
{
	XI2s_Rx_LogItem* LogPtr = NULL;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid((InstancePtr)->Log.IsEnabled == TRUE);
	XI2s_Rx_LogEvt prevEvt = XI2S_RX_LOG_EVT_INVALID;
	int Count = 0;
	xil_printf("--------XI2S Receiver Log Start--------\n\r");
	while (1) {
		LogPtr = XI2s_Rx_LogRead(InstancePtr);
		if (LogPtr == NULL) {
			if (Count != 0)
				xil_printf("..Repeats %d times..\n\r", Count);
			break;
		}
		if (prevEvt == LogPtr->Event) {
			Count++;
			continue;
		} else {
			if (Count != 0)
				xil_printf("..Repeats %d times..\n\r", Count);
			Count = 0;
		}
		xil_printf("XI2S Receiver %x: ", InstancePtr->Config.DeviceId);
		switch (LogPtr->Event) {
		case XI2S_RX_AES_BLKCMPLT_EVT:
			xil_printf("AES Block Complete Detected.\n\r");
			break;
		case XI2S_RX_AUD_OVERFLOW_EVT:
			xil_printf("Audio Overflow Detected.\n\r");
			break;
		default:
			xil_printf("Unknown Log Entry.\n\r");
			break;
		}
		prevEvt = LogPtr->Event;
	}
	xil_printf("--------XI2S Receiver Log End--------\n\r");
}
void XI2s_Rx_LogDisplay ( XI2s_Rx * InstancePtr ) { XI2s_Rx_LogItem * LogPtr = NULL ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( ( InstancePtr ) -> Log . IsEnabled == TRUE ) ; XI2s_Rx_LogEvt prevEvt = XI2S_RX_LOG_EVT_INVALID ; int Count = 0 ; xil_printf ( " \n \r " ) ; while ( 1 ) { LogPtr = XI2s_Rx_LogRead ( InstancePtr ) ; if ( LogPtr == NULL ) { if ( Count != 0 ) xil_printf ( " \n \r " , Count ) ; break ; } if ( prevEvt == LogPtr -> Event ) { Count ++ ; continue ; } else { if ( Count != 0 ) xil_printf ( " \n \r " , Count ) ; Count = 0 ; } xil_printf ( " " , InstancePtr -> Config . DeviceId ) ; switch ( LogPtr -> Event ) { case XI2S_RX_AES_BLKCMPLT_EVT : xil_printf ( " \n \r " ) ; break ; case XI2S_RX_AUD_OVERFLOW_EVT : xil_printf ( " \n \r " ) ; break ; default : xil_printf ( " \n \r " ) ; break ; } prevEvt = LogPtr -> Event ; } xil_printf ( " \n \r " ) ; }
This function prints the contents of the logging buffer.
This function prints the contents of the logging buffer .
/* Verify arguments */ /* if buffer is empty, NULL is returned */