lib/bsp/standalone/examples/xil_nested_interrupts_example.c
static void TtcInst0TickHandler(void *CallBackRef1)
{
	u32 StatusEvent;

	/* stop the counter first to avoid any further interrupt generation */
	XTtcPs_Stop((XTtcPs *)CallBackRef1);

	/* update the flag to indicate the interrupt */
	LowPriorityIntrFlag++;

	/*
	 * Read the interrupt status, then write it back to clear the interrupt.
	 */
	StatusEvent = XTtcPs_GetInterruptStatus((XTtcPs *)CallBackRef1);
	XTtcPs_ClearInterruptStatus((XTtcPs *)CallBackRef1, StatusEvent);

	/* Enable the nested interrupts to allow preemption */
	Xil_EnableNestedInterrupts();

	/* wait till interrupts from counter configured with high priority interrupt */
	while(HighPriorityIntrFlag == 0);

	/* Disable the nested interrupt before exiting IRQ mode */
	Xil_DisableNestedInterrupts();
}
/***************************************************************************/
/**
*
* This function is the handler, which updates the flag when
* interrupts for TTC counter configured with lower interrupt priority
* are triggered. It enables the nested interrupts and does not exit till
* other counter with higher priority interrupt is not triggered.
*
* @param	CallBackRef contains a callback reference from the driver, in
*		this case it is the instance pointer for the TTC driver.
*
* @return	None.
*
*****************************************************************************/
This function is the handler, which updates the flag when
interrupts for TTC counter configured with lower interrupt priority
are triggered. It enables the nested interrupts and does not exit till
other counter with higher priority interrupt is not triggered.
This function is the handler which updates the flag when interrupts for TTC counter configured with lower interrupt priority are triggered . It enables the nested interrupts and does not exit till other counter with higher priority interrupt is not triggered .
static void TtcInst0TickHandler(void *CallBackRef1)
{
	u32 StatusEvent;
	XTtcPs_Stop((XTtcPs *)CallBackRef1);
	LowPriorityIntrFlag++;
	StatusEvent = XTtcPs_GetInterruptStatus((XTtcPs *)CallBackRef1);
	XTtcPs_ClearInterruptStatus((XTtcPs *)CallBackRef1, StatusEvent);
	Xil_EnableNestedInterrupts();
	while(HighPriorityIntrFlag == 0);
	Xil_DisableNestedInterrupts();
}
static void TtcInst0TickHandler ( void * CallBackRef1 ) { u32 StatusEvent ; XTtcPs_Stop ( ( XTtcPs * ) CallBackRef1 ) ; LowPriorityIntrFlag ++ ; StatusEvent = XTtcPs_GetInterruptStatus ( ( XTtcPs * ) CallBackRef1 ) ; XTtcPs_ClearInterruptStatus ( ( XTtcPs * ) CallBackRef1 , StatusEvent ) ; Xil_EnableNestedInterrupts ( ) ; while ( HighPriorityIntrFlag == 0 ) ; Xil_DisableNestedInterrupts ( ) ; }
This function is the handler, which updates the flag when
interrupts for TTC counter configured with lower interrupt priority
are triggered.
This function is the handler which updates the flag when interrupts for TTC counter configured with lower interrupt priority are triggered .
/* stop the counter first to avoid any further interrupt generation */ /* update the flag to indicate the interrupt */ /*
	 * Read the interrupt status, then write it back to clear the interrupt.
	 */ /* Enable the nested interrupts to allow preemption */ /* wait till interrupts from counter configured with high priority interrupt */ /* Disable the nested interrupt before exiting IRQ mode */