comparison gsm-fw/nucleus/demo/tmcal.c @ 143:afceeeb2cba1

Our nuc-fw is destined to become gsm-fw, so I went ahead and did the big hg mv
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Tue, 12 Nov 2013 05:35:48 +0000
parents nuc-fw/nucleus/demo/tmcal.c@85994b210f6a
children
comparison
equal deleted inserted replaced
142:15d5977390c2 143:afceeeb2cba1
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 }