lib/bsp/standalone/examples/xil_nested_interrupts_example.c
int SetupTicker(XTtcPs *TtcPsInst,u16 DeviceID,u16 TtcTickIntrID,
			void *TickHandler, XScuGic *InterruptController,
			TmrCntrSetup SettingsTable)
{
	int Status;
	TmrCntrSetup *TimerSetup;
	XTtcPs *TtcPsTick;

	TimerSetup = &SettingsTable;

	/*
	 * Set up appropriate options for Ticker: interval mode without
	 * waveform output.
	 */
	TimerSetup->Options |= (XTTCPS_OPTION_INTERVAL_MODE |
					      XTTCPS_OPTION_WAVE_DISABLE);

	/*
	 * Calling the timer setup routine
	 *  . initialize device
	 *  . set options
	 */
	Status = SetupTimer(DeviceID,TtcPsInst,SettingsTable);
	if(Status != XST_SUCCESS) {
		return Status;
	}

	TtcPsTick = TtcPsInst;

	/*
	 * Connect to the interrupt controller
	 */
	Status = XScuGic_Connect(InterruptController, TtcTickIntrID,
		(Xil_InterruptHandler)TickHandler, (void *)TtcPsTick);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}

	/*
	 * Enable the interrupt for the Timer counter
	 */
	XScuGic_Enable(InterruptController, TtcTickIntrID);

	/*
	 * Enable the interrupts for the tick timer/counter
	 */
	XTtcPs_EnableInterrupts(TtcPsTick, XTTCPS_IXR_INTERVAL_MASK);

	return Status;
}
/****************************************************************************/
/**
*
* This function sets up the Ticker timer.
*
* @param	TtcPsInst is a pointer to the ttc instance.
* @param	DeviceID is the unique ID for the device.
* @param	TtcTickIntrID is the unique interrupt ID for the timer.
* @param	InterruptController is a pointer to the interrupt controller
*			instance..
* @param	TickHandler is a interrupt handler to be registered with
			the ttc instance
* @param	SettingsTable is ticker timer counter initial setup.
*
* @return	XST_SUCCESS if everything sets up well, XST_FAILURE otherwise.
*
*****************************************************************************/
This function sets up the Ticker timer.
This function sets up the Ticker timer .
int SetupTicker(XTtcPs *TtcPsInst,u16 DeviceID,u16 TtcTickIntrID,
			void *TickHandler, XScuGic *InterruptController,
			TmrCntrSetup SettingsTable)
{
	int Status;
	TmrCntrSetup *TimerSetup;
	XTtcPs *TtcPsTick;
	TimerSetup = &SettingsTable;
	TimerSetup->Options |= (XTTCPS_OPTION_INTERVAL_MODE |
					      XTTCPS_OPTION_WAVE_DISABLE);
	Status = SetupTimer(DeviceID,TtcPsInst,SettingsTable);
	if(Status != XST_SUCCESS) {
		return Status;
	}
	TtcPsTick = TtcPsInst;
	Status = XScuGic_Connect(InterruptController, TtcTickIntrID,
		(Xil_InterruptHandler)TickHandler, (void *)TtcPsTick);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	XScuGic_Enable(InterruptController, TtcTickIntrID);
	XTtcPs_EnableInterrupts(TtcPsTick, XTTCPS_IXR_INTERVAL_MASK);
	return Status;
}
int SetupTicker ( XTtcPs * TtcPsInst , u16 DeviceID , u16 TtcTickIntrID , void * TickHandler , XScuGic * InterruptController , TmrCntrSetup SettingsTable ) { int Status ; TmrCntrSetup * TimerSetup ; XTtcPs * TtcPsTick ; TimerSetup = & SettingsTable ; TimerSetup -> Options |= ( XTTCPS_OPTION_INTERVAL_MODE | XTTCPS_OPTION_WAVE_DISABLE ) ; Status = SetupTimer ( DeviceID , TtcPsInst , SettingsTable ) ; if ( Status != XST_SUCCESS ) { return Status ; } TtcPsTick = TtcPsInst ; Status = XScuGic_Connect ( InterruptController , TtcTickIntrID , ( Xil_InterruptHandler ) TickHandler , ( void * ) TtcPsTick ) ; if ( Status != XST_SUCCESS ) { return XST_FAILURE ; } XScuGic_Enable ( InterruptController , TtcTickIntrID ) ; XTtcPs_EnableInterrupts ( TtcPsTick , XTTCPS_IXR_INTERVAL_MASK ) ; return Status ; }
This function sets up the Ticker timer.
This function sets up the Ticker timer .
/*
	 * Set up appropriate options for Ticker: interval mode without
	 * waveform output.
	 */ /*
	 * Calling the timer setup routine
	 *  . initialize device
	 *  . set options
	 */ /*
	 * Connect to the interrupt controller
	 */ /*
	 * Enable the interrupt for the Timer counter
	 */ /*
	 * Enable the interrupts for the tick timer/counter
	 */