comparison nuc-fw/nucleus/demo/tmcal.c @ 138:85994b210f6a

nuc-fw cleanup: old Nucleus demo (w/o TI fw framework) moved out of the way
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 11 Nov 2013 10:17:08 +0000
parents nuc-fw/nucleus/tmcal.c@947b1f473960
children
comparison
equal deleted inserted replaced
137:5fe5559003b7 138:85994b210f6a
1 /*
2 * FreeNucleus port by Spacefalcon the Outlaw
3 *
4 * This module implements the INT_Timer_Initialize() function
5 * for the proof-of-concept Calypso port.
6 *
7 * TIMER2 configuration is based on that used by OsmocomBB.
8 */
9
10 #include "calirq.h"
11 #include "caltimer.h"
12
13 void
14 INT_Timer_Initialize()
15 {
16 /* program the timer */
17 TIMER2_REGS.cntl = CNTL_CLOCK_ENABLE;
18 TIMER2_REGS.load = 4062;
19 TIMER2_REGS.cntl = CNTL_CLOCK_ENABLE | CNTL_AUTO_RELOAD | CNTL_START;
20 /* now let it interrupt */
21 INTH_REGS.ilr_irq[IRQ_TIMER2] = 0x7E;
22 INTH_REGS.mask_it_reg1 &= ~(1 << IRQ_TIMER2);
23 }