0% found this document useful (0 votes)
1 views1 page

TimerSetup PDF

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

TimerSetup PDF

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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