XilinxProcessorIPLib/drivers/llfifo/examples/xllfifo_polling_example.c
int RxReceive (XLlFifo *InstancePtr, u32* DestinationAddr)
{

	int i;
	int Status;
	u32 RxWord;
	static u32 ReceiveLength;

	xil_printf(" Receiving data ....\n\r");

	while(XLlFifo_iRxOccupancy(InstancePtr)) {
		/* Read Receive Length */
		ReceiveLength = (XLlFifo_iRxGetLen(InstancePtr))/WORD_SIZE;
		for (i=0; i < ReceiveLength; i++) {
			RxWord = XLlFifo_RxGetWord(InstancePtr);
			*(DestinationBuffer+i) = RxWord;
		}
	}

	Status = XLlFifo_IsRxDone(InstancePtr);
	if(Status != TRUE){
		xil_printf("Failing in receive complete ... \r\n");
		return XST_FAILURE;
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* RxReceive routine.It will receive the data from the FIFO.
*
* @param	InstancePtr is a pointer to the instance of the
*		XLlFifo instance.
*
* @param	DestinationAddr is the address where to copy the received data.
*
* @return
*		-XST_SUCCESS to indicate success
*		-XST_FAILURE to indicate failure
*
* @note		None
*
******************************************************************************/
RxReceive routine.It will receive the data from the FIFO.
RxReceive routine . It will receive the data from the FIFO .
int RxReceive (XLlFifo *InstancePtr, u32* DestinationAddr)
{
	int i;
	int Status;
	u32 RxWord;
	static u32 ReceiveLength;
	xil_printf(" Receiving data ....\n\r");
	while(XLlFifo_iRxOccupancy(InstancePtr)) {
		ReceiveLength = (XLlFifo_iRxGetLen(InstancePtr))/WORD_SIZE;
		for (i=0; i < ReceiveLength; i++) {
			RxWord = XLlFifo_RxGetWord(InstancePtr);
			*(DestinationBuffer+i) = RxWord;
		}
	}
	Status = XLlFifo_IsRxDone(InstancePtr);
	if(Status != TRUE){
		xil_printf("Failing in receive complete ... \r\n");
		return XST_FAILURE;
	}
	return XST_SUCCESS;
}
int RxReceive ( XLlFifo * InstancePtr , u32 * DestinationAddr ) { int i ; int Status ; u32 RxWord ; static u32 ReceiveLength ; xil_printf ( " \n \r " ) ; while ( XLlFifo_iRxOccupancy ( InstancePtr ) ) { ReceiveLength = ( XLlFifo_iRxGetLen ( InstancePtr ) ) / WORD_SIZE ; for ( i = 0 ; i < ReceiveLength ; i ++ ) { RxWord = XLlFifo_RxGetWord ( InstancePtr ) ; * ( DestinationBuffer + i ) = RxWord ; } } Status = XLlFifo_IsRxDone ( InstancePtr ) ; if ( Status != TRUE ) { xil_printf ( " \r \n " ) ; return XST_FAILURE ; } return XST_SUCCESS ; }
RxReceive routine.It will receive the data from the FIFO.
RxReceive routine . It will receive the data from the FIFO .
/* Read Receive Length */