CLEON
Version 1
Cloud-Offloaded GPS Receiver
Main Page
Related Pages
Data Structures
Files
File List
Globals
hal_timer.c
Go to the documentation of this file.
1
7
#include "
cleon_conf.h
"
8
#include "
app_define.h
"
9
#include "
sys_define.h
"
10
#include "
hal_define.h
"
11
#include "
fs_define.h
"
12
13
// Second and millisecond time tick
14
extern
milliseoncd_time_tick_u
uniMillisecondTimeTick
;
15
extern
seoncd_time_tick_u
uniSecondTimeTick
;
16
17
/*----------------------------------------------------------------------------*/
25
void
HAL_TIMER_Init
()
26
{
27
HAL_TIMER_TimerA1Init
();
28
}
29
30
/*----------------------------------------------------------------------------*/
38
void
HAL_TIMER_TimerA1Init
()
39
{
40
TA1CCTL0 = CCIE;
// CCR0 toggle mode
41
TA1CCR0 = 12000;
// Set it to 12000 to generate 1ms tick with 12MHz clock source
42
TA1CTL = TASSEL_2 + MC_1 + TACLR;
// SMCLK, up mode, clear TAR
43
}
44
45
//------------------------------------------------------------------------------
46
// TIMER1_A0 Interrupt Service Routine
47
//------------------------------------------------------------------------------
48
#pragma vector=TIMER1_A0_VECTOR
49
__interrupt
void
TIMER1_A0_VECTOR_ISR
(
void
)
50
{
51
uniMillisecondTimeTick.
ullMillisecondTimeTick
+= 10000;
52
}
hal
hal_timer.c
Generated on Tue May 28 2013 15:17:19 for CLEON by
1.8.2