Subversion Repositories NaviCtrl

Rev

Rev 119 | Rev 134 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 120
Line 80... Line 80...
80
//----------------------------------------------------------------------------------------------------
80
//----------------------------------------------------------------------------------------------------
81
void TIMER1_Init(void)
81
void TIMER1_Init(void)
82
{
82
{
83
        TIM_InitTypeDef   TIM_InitStructure;
83
        TIM_InitTypeDef   TIM_InitStructure;
Line 84... Line 84...
84
 
84
 
Line 85... Line 85...
85
        UART1_PutString("Timer1 init...");
85
        UART1_PutString("\r\n Timer1 init...");
86
 
86
 
Line 87... Line 87...
87
        #define TIM1_FREQ 200000 // 200kHz
87
        #define TIM1_FREQ 200000 // 200kHz
Line -... Line 88...
-
 
88
        // TimerOCR set in IntHandler
88
        // TimerOCR set in IntHandler
89
 
89
 
90
        SCU_APBPeriphClockConfig(__TIM01, ENABLE);
90
        SCU_APBPeriphClockConfig(__TIM01, ENABLE);
91
 
91
 
92
        TIM_DeInit(TIM1);
92
        TIM_StructInit(&TIM_InitStructure);
93
        TIM_StructInit(&TIM_InitStructure);
Line 111... Line 112...
111
        SystemTime.mSec = 0;
112
        SystemTime.mSec = 0;
112
        SystemTime.Valid = 0;
113
        SystemTime.Valid = 0;
Line 113... Line 114...
113
 
114
 
Line 114... Line 115...
114
        CountMilliseconds = 0;
115
        CountMilliseconds = 0;
Line 115... Line 116...
115
 
116
 
Line 116... Line 117...
116
        UART1_PutString("ok\n\r");
117
        UART1_PutString("ok");
117
 
118