You are on page 1of 1

void start_timer1()

{
/* Disable output of Timer 1 */
*(unsigned volatile int *)TIMER1_CTRL = 0x000;
/* Map TINT event to CPU interrupt 8 */
IRQ_map(IRQ_EVT_TINT1,8);
/* Open a handle to the Timer */
hTimer = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
/* Configure up the timer. */
TIMER_configArgs(hTimer,
TIMER_CTL_OF(0x000003c1),
TIMER_PRD_OF(TPRD),
TIMER_CNT_OF(0)
);
/* Finally, enable the timer which will drive everything. */
TIMER_start(hTimer);
}

You might also like