Subversion Repositories FlightCtrl

Rev

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

Rev 683 Rev 685
Line -... Line 1...
-
 
1
#include <inttypes.h>
-
 
2
#include <avr/io.h>
-
 
3
#include <avr/interrupt.h>
-
 
4
#include "fc.h"
-
 
5
#include "analog.h"
1
#include "main.h"
6
#include "main.h"
Line 2... Line 7...
2
 
7
 
3
volatile uint16_t CountMilliseconds = 0;
8
volatile uint16_t CountMilliseconds = 0;
4
volatile uint8_t UpdateMotor = 0;
9
volatile uint8_t UpdateMotor = 0;
5
volatile uint16_t cntKompass = 0;
10
volatile uint16_t cntKompass = 0;
6
volatile uint16_t BeepTime = 0;
11
volatile uint16_t BeepTime = 0;
Line 7... Line 12...
7
uint16_t BeepModulation = 0xFFFF;
12
volatile uint16_t BeepModulation = 0xFFFF;
8
 
13
 
Line 92... Line 97...
92
 
97
 
93
        // if beeper is on
98
        // if beeper is on
94
        if(Beeper_On)
99
        if(Beeper_On)
95
        {
100
        {
96
                // set speaker port to high
101
                // set speaker port to high
97
                if(PlatinenVersion == 10) PORTD |= (1<<2); // Speaker at PD2
102
                if(BoardRelease == 10) PORTD |= (1<<2); // Speaker at PD2
98
                else                      PORTC |= (1<<7); // Speaker at PC7
103
                else                      PORTC |= (1<<7); // Speaker at PC7
99
        }
104
        }
100
        else // beeper is off
105
        else // beeper is off
101
        {
106
        {
102
                // set speaker port to low
107
                // set speaker port to low
103
                if(PlatinenVersion == 10) PORTD &= ~(1<<2);// Speaker at PD2
108
                if(BoardRelease == 10) PORTD &= ~(1<<2);// Speaker at PD2
104
                else                      PORTC &= ~(1<<7);// Speaker at PC7
109
                else                      PORTC &= ~(1<<7);// Speaker at PC7
Line 105... Line 110...
105
        }
110
        }
106
 
111