Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 2108 → Rev 2109

/branches/dongfang_FC_fixedwing/arduino_atmega328/timer0.c
32,9 → 32,9
// disable all interrupts before reconfiguration
cli();
 
// Configure speaker port as output.
DDRD |= (1 << DDD5);
PORTD &= ~(1 << PORTD5);
// Configure speaker port as output and also the diags pin D2
DDRD |= ((1 << DDD5) | (1 << DDD2));
PORTD &= ~((1 << PORTD5) | (1 << DDD2));
 
// Timer/Counter 0 Control Register A
 
142,6 → 142,7
uint16_t t_stop;
t_stop = setDelay(w);
while (!checkDelay(t_stop)) {
debugOut.analog[30]++;
if (sensorDataReady == ALL_DATA_READY) {
analog_update();
startAnalogConversionCycle();
150,6 → 151,6
if (stop) {
// Wait for new samples to get prepared but do not restart AD conversion after that!
// Caller MUST to that.
while (!sensorDataReady != ALL_DATA_READY);
// while (!sensorDataReady != ALL_DATA_READY);
}
}