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

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

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

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

}
/***************************************************************************/
/**
*
* This function is the interrupt handler for TTC counter configured with high
* priority interrupt. It preempts the interrupt handler of TTC counter
* configured with low priority (TtcInst0TickHandler), and increments
* HighPriorityIntrFlag.
*
* @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 interrupt handler for TTC counter configured with high
priority interrupt. It preempts the interrupt handler of TTC counter
configured with low priority (TtcInst0TickHandler), and increments
HighPriorityIntrFlag.
This function is the interrupt handler for TTC counter configured with high priority interrupt . It preempts the interrupt handler of TTC counter configured with low priority ( TtcInst0TickHandler ) and increments HighPriorityIntrFlag .
static void TtcInst1TickHandler(void *CallBackRef1)
{
        u32 StatusEvent;
        XTtcPs_Stop((XTtcPs *)CallBackRef1);
        StatusEvent = XTtcPs_GetInterruptStatus((XTtcPs *)CallBackRef1);
        XTtcPs_ClearInterruptStatus((XTtcPs *)CallBackRef1, StatusEvent);
        HighPriorityIntrFlag++;
}
static void TtcInst1TickHandler ( void * CallBackRef1 ) { u32 StatusEvent ; XTtcPs_Stop ( ( XTtcPs * ) CallBackRef1 ) ; StatusEvent = XTtcPs_GetInterruptStatus ( ( XTtcPs * ) CallBackRef1 ) ; XTtcPs_ClearInterruptStatus ( ( XTtcPs * ) CallBackRef1 , StatusEvent ) ; HighPriorityIntrFlag ++ ; }
This function is the interrupt handler for TTC counter configured with high
priority interrupt.
This function is the interrupt handler for TTC counter configured with high priority interrupt .
/* stop the counter first to avoid any further interrupt generation */ /*
         * Read the interrupt status, then write it back to clear the interrupt.
         */ /* update the flag to indicate the interrupt */