Subversion Repositories FlightCtrl

Rev

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

Rev 703 Rev 712
Line 8... Line 8...
8
 
8
 
9
/*****************************************************/
9
/*****************************************************/
10
/*              Initialize Timer 2                   */
10
/*              Initialize Timer 2                   */
11
/*****************************************************/
11
/*****************************************************/
12
// The timer 2 is used to generate the PWM at PD7 (J7)
12
// The timer 2 is used to generate the PWM at PD7 (J7)
13
// to control a camera servo for nick compensation.
13
// to control a camera servo for pitch compensation.
14
void TIMER2_Init(void)
14
void TIMER2_Init(void)
15
{
15
{
Line 16... Line 16...
16
        uint8_t sreg = SREG;
16
        uint8_t sreg = SREG;
17
 
17
 
Line 18... Line 18...
18
        // disable all interrupts before reconfiguration
18
        // disable all interrupts before reconfiguration
19
        cli();
19
        cli();
20
 
20
 
Line 21... Line 21...
21
        // set PD7 as output for the PWM
21
        // set PD7 as output pf the PWM for pitch servo