XilinxProcessorIPLib/drivers/axiethernet/examples/xaxiethernet_example_intr_fifo.c
static void FifoHandler(XLlFifo *Fifo)
{
	u32 Pending = XLlFifo_IntPending(Fifo);

	while (Pending) {
		if (Pending & XLLF_INT_RC_MASK) {
			/*
			 * Receive the frame, unless we are deferring the
			 * receive.
			 */
			if (DeferRx) {
				FramesRxInts++;	/* We can count the interrupts,
						 * but in the handler we don't
						 * exactly know how many frames
						 * as we could get one int for
						 * multiple frames.
						 */
				/*
				 * use for example 3: Disable receive
				 * interrupts to defer frame reception
				 * to the example function.
				 */
				XLlFifo_IntDisable(Fifo, XLLF_INT_RC_MASK);
			}
			else {
				FifoRecvHandler(Fifo);
			}
			XLlFifo_IntClear(Fifo, XLLF_INT_RC_MASK);
		}
		else if (Pending & XLLF_INT_TC_MASK) {
			FramesTxInts++;	/* We can count the interrupts, but in
					 * the handler we don't exactly know
					 * how many frames as we could get one
					 * int for multiple frames.
					 */
			XLlFifo_IntClear(Fifo, XLLF_INT_TC_MASK);
		}
		else if (Pending & XLLF_INT_ERROR_MASK){
			FifoErrorHandler(Fifo, Pending);
			XLlFifo_IntClear(Fifo, XLLF_INT_ERROR_MASK);
		} else {
			XLlFifo_IntClear(Fifo, Pending);
		}
		Pending = XLlFifo_IntPending(Fifo);
	}
}
/*****************************************************************************/
/**
*
* This is the Fifo handler function and  will increment a shared
* counter that can be tested by the main thread of operation.
*
* @param	Fifo is a reference to the Fifo instance.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This is the Fifo handler function and  will increment a shared
counter that can be tested by the main thread of operation.
This is the Fifo handler function and will increment a shared counter that can be tested by the main thread of operation .
static void FifoHandler(XLlFifo *Fifo)
{
	u32 Pending = XLlFifo_IntPending(Fifo);
	while (Pending) {
		if (Pending & XLLF_INT_RC_MASK) {
			if (DeferRx) {
				FramesRxInts++;	
				XLlFifo_IntDisable(Fifo, XLLF_INT_RC_MASK);
			}
			else {
				FifoRecvHandler(Fifo);
			}
			XLlFifo_IntClear(Fifo, XLLF_INT_RC_MASK);
		}
		else if (Pending & XLLF_INT_TC_MASK) {
			FramesTxInts++;	
			XLlFifo_IntClear(Fifo, XLLF_INT_TC_MASK);
		}
		else if (Pending & XLLF_INT_ERROR_MASK){
			FifoErrorHandler(Fifo, Pending);
			XLlFifo_IntClear(Fifo, XLLF_INT_ERROR_MASK);
		} else {
			XLlFifo_IntClear(Fifo, Pending);
		}
		Pending = XLlFifo_IntPending(Fifo);
	}
}
static void FifoHandler ( XLlFifo * Fifo ) { u32 Pending = XLlFifo_IntPending ( Fifo ) ; while ( Pending ) { if ( Pending & XLLF_INT_RC_MASK ) { if ( DeferRx ) { FramesRxInts ++ ; XLlFifo_IntDisable ( Fifo , XLLF_INT_RC_MASK ) ; } else { FifoRecvHandler ( Fifo ) ; } XLlFifo_IntClear ( Fifo , XLLF_INT_RC_MASK ) ; } else if ( Pending & XLLF_INT_TC_MASK ) { FramesTxInts ++ ; XLlFifo_IntClear ( Fifo , XLLF_INT_TC_MASK ) ; } else if ( Pending & XLLF_INT_ERROR_MASK ) { FifoErrorHandler ( Fifo , Pending ) ; XLlFifo_IntClear ( Fifo , XLLF_INT_ERROR_MASK ) ; } else { XLlFifo_IntClear ( Fifo , Pending ) ; } Pending = XLlFifo_IntPending ( Fifo ) ; } }
This is the Fifo handler function and  will increment a shared
counter that can be tested by the main thread of operation.
This is the Fifo handler function and will increment a shared counter that can be tested by the main thread of operation .
/*
			 * Receive the frame, unless we are deferring the
			 * receive.
			 */ /* We can count the interrupts,
						 * but in the handler we don't
						 * exactly know how many frames
						 * as we could get one int for
						 * multiple frames.
						 */ /*
				 * use for example 3: Disable receive
				 * interrupts to defer frame reception
				 * to the example function.
				 */ /* We can count the interrupts, but in
					 * the handler we don't exactly know
					 * how many frames as we could get one
					 * int for multiple frames.
					 */