FreeCalypso > hg > freecalypso-citrine
comparison nucleus/demo/tmcal.c @ 0:75a11d740a02
initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 09 Jun 2016 00:02:41 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:75a11d740a02 |
---|---|
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 } |