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

	int i;
	int j;
	xil_printf(" Transmitting Data ... \r\n");

	/* Fill the transmit buffer with incremental pattern */
	for (i=0;i<MAX_DATA_BUFFER_SIZE;i++)
		*(SourceAddr + i) = i;

	for(i=0 ; i < NO_OF_PACKETS ; i++){

		/* Writing into the FIFO Transmit Port Buffer */
		for (j=0 ; j < MAX_PACKET_LEN ; j++){
			if( XLlFifo_iTxVacancy(InstancePtr) ){
				XLlFifo_TxPutWord(InstancePtr,
					*(SourceAddr+(i*MAX_PACKET_LEN)+j));
			}
		}

	}

	/* Start Transmission by writing transmission length into the TLR */
	XLlFifo_iTxSetLen(InstancePtr, (MAX_DATA_BUFFER_SIZE * WORD_SIZE));

	/* Check for Transmission completion */
	while( !(XLlFifo_IsTxDone(InstancePtr)) ){

	}

	/* Transmission Complete */
	return XST_SUCCESS;
}
/*****************************************************************************/
/**
*
* TxSend routine, It will send the requested amount of data at the
* specified addr.
*
* @param	InstancePtr is a pointer to the instance of the
*		XLlFifo component.
*
* @param	SourceAddr is the address where the FIFO stars writing
*
* @return
*		-XST_SUCCESS to indicate success
*		-XST_FAILURE to indicate failure
*
* @note		None
*
******************************************************************************/
TxSend routine, It will send the requested amount of data at the
specified addr.
TxSend routine It will send the requested amount of data at the specified addr .
int TxSend(XLlFifo *InstancePtr, u32  *SourceAddr)
{
	int i;
	int j;
	xil_printf(" Transmitting Data ... \r\n");
	for (i=0;i<MAX_DATA_BUFFER_SIZE;i++)
		*(SourceAddr + i) = i;
	for(i=0 ; i < NO_OF_PACKETS ; i++){
		for (j=0 ; j < MAX_PACKET_LEN ; j++){
			if( XLlFifo_iTxVacancy(InstancePtr) ){
				XLlFifo_TxPutWord(InstancePtr,
					*(SourceAddr+(i*MAX_PACKET_LEN)+j));
			}
		}
	}
	XLlFifo_iTxSetLen(InstancePtr, (MAX_DATA_BUFFER_SIZE * WORD_SIZE));
	while( !(XLlFifo_IsTxDone(InstancePtr)) ){
	}
	return XST_SUCCESS;
}
int TxSend ( XLlFifo * InstancePtr , u32 * SourceAddr ) { int i ; int j ; xil_printf ( " \r \n " ) ; for ( i = 0 ; i < MAX_DATA_BUFFER_SIZE ; i ++ ) * ( SourceAddr + i ) = i ; for ( i = 0 ; i < NO_OF_PACKETS ; i ++ ) { for ( j = 0 ; j < MAX_PACKET_LEN ; j ++ ) { if ( XLlFifo_iTxVacancy ( InstancePtr ) ) { XLlFifo_TxPutWord ( InstancePtr , * ( SourceAddr + ( i * MAX_PACKET_LEN ) + j ) ) ; } } } XLlFifo_iTxSetLen ( InstancePtr , ( MAX_DATA_BUFFER_SIZE * WORD_SIZE ) ) ; while ( ! ( XLlFifo_IsTxDone ( InstancePtr ) ) ) { } return XST_SUCCESS ; }
TxSend routine, It will send the requested amount of data at the
specified addr.
TxSend routine It will send the requested amount of data at the specified addr .
/* Fill the transmit buffer with incremental pattern */ /* Writing into the FIFO Transmit Port Buffer */ /* Start Transmission by writing transmission length into the TLR */ /* Check for Transmission completion */ /* Transmission Complete */