Subversion Repositories FlightCtrl

Rev

Rev 463 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 463 Rev 477
Line 1... Line 1...
1
#include "main.h"
1
#include "main.h"
Line 2... Line 2...
2
 
2
 
3
volatile unsigned int CountMilliseconds = 0;
-
 
4
volatile static unsigned int tim_main;
3
volatile unsigned int CountMilliseconds = 0;
5
volatile unsigned char UpdateMotor = 0;
4
volatile unsigned char UpdateMotor = 0;
6
volatile unsigned int beeptime = 0;
5
volatile unsigned int beeptime = 0;
Line 7... Line 6...
7
int ServoValue = 0;
6
int ServoValue = 0;
Line 45... Line 44...
45
}
44
}
Line 46... Line 45...
46
 
45
 
47
 
46
 
48
void Timer_Init(void)
-
 
49
{
47
void Timer_Init(void)
50
    tim_main = SetDelay(10);
48
{
51
    TCCR0B = CK8;
49
    TCCR0B = CK8;
52
    TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM
50
    TCCR0A = (1<<COM0A1)|(1<<COM0B1)|3;//fast PWM
53
    OCR0A =  0;
51
    OCR0A =  0;