27,7 → 27,19 |
// disable all interrupts before reconfiguration |
cli(); |
|
// set PB3 and PB4 as output for the PWM |
// configure speaker port as output |
if(BoardRelease == 10) |
{ // Speaker at PD2 |
DDRD |= (1<<DDD2); |
PORTD &= ~(1<<PORTD2); |
} |
else |
{ // Speaker at PC7 |
DDRC |= (1<<DDC7); |
PORTC &= ~(1<<PORTC7); |
} |
|
// set PB3 and PB4 as output for the PWM used as aoffset for the pressure sensor |
DDRB |= (1<<DDB4)|(1<<DDB3); |
PORTB &= ~((1<<PORTB4)|(1<<PORTB3)); |
|
113,8 → 125,8 |
if(Beeper_On) |
{ |
// set speaker port to high |
if(BoardRelease == 10) PORTD |= (1<<2); // Speaker at PD2 |
else PORTC |= (1<<7); // Speaker at PC7 |
if(BoardRelease == 10) PORTD |= (1<<PORTD2); // Speaker at PD2 |
else PORTC |= (1<<PORTC7); // Speaker at PC7 |
} |
else // beeper is off |
{ |
126,7 → 138,7 |
// update compass value if this option is enabled in the settings |
if(ParamSet.GlobalConfig & CFG_COMPASS_ACTIVE) |
{ |
MM3_timer0(); |
MM3_timer0(); // read out mm3 board |
} |
} |
|