XilinxProcessorIPLib/drivers/scutimer/examples/xscutimer_intr_example.c
static void TimerIntrHandler(void *CallBackRef)
{
	XScuTimer *TimerInstancePtr = (XScuTimer *) CallBackRef;

	/*
	 * Check if the timer counter has expired, checking is not necessary
	 * since that's the reason this function is executed, this just shows
	 * how the callback reference can be used as a pointer to the instance
	 * of the timer counter that expired, increment a shared variable so
	 * the main thread of execution can see the timer expired.
	 */
	if (XScuTimer_IsExpired(TimerInstancePtr)) {
		XScuTimer_ClearInterruptStatus(TimerInstancePtr);
		TimerExpired++;
		if (TimerExpired == 3) {
			XScuTimer_DisableAutoReload(TimerInstancePtr);
		}
	}
}
/*****************************************************************************/
/**
*
* This function is the Interrupt handler for the Timer interrupt of the
* Timer device. It is called on the expiration of the timer counter in
* interrupt context.
*
* @param	CallBackRef is a pointer to the callback function.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function is the Interrupt handler for the Timer interrupt of the
Timer device. It is called on the expiration of the timer counter in
interrupt context.
This function is the Interrupt handler for the Timer interrupt of the Timer device . It is called on the expiration of the timer counter in interrupt context .
static void TimerIntrHandler(void *CallBackRef)
{
	XScuTimer *TimerInstancePtr = (XScuTimer *) CallBackRef;
	if (XScuTimer_IsExpired(TimerInstancePtr)) {
		XScuTimer_ClearInterruptStatus(TimerInstancePtr);
		TimerExpired++;
		if (TimerExpired == 3) {
			XScuTimer_DisableAutoReload(TimerInstancePtr);
		}
	}
}
static void TimerIntrHandler ( void * CallBackRef ) { XScuTimer * TimerInstancePtr = ( XScuTimer * ) CallBackRef ; if ( XScuTimer_IsExpired ( TimerInstancePtr ) ) { XScuTimer_ClearInterruptStatus ( TimerInstancePtr ) ; TimerExpired ++ ; if ( TimerExpired == 3 ) { XScuTimer_DisableAutoReload ( TimerInstancePtr ) ; } } }
This function is the Interrupt handler for the Timer interrupt of the
Timer device.
This function is the Interrupt handler for the Timer interrupt of the Timer device .
/*
	 * Check if the timer counter has expired, checking is not necessary
	 * since that's the reason this function is executed, this just shows
	 * how the callback reference can be used as a pointer to the instance
	 * of the timer counter that expired, increment a shared variable so
	 * the main thread of execution can see the timer expired.
	 */