ADCW -> ADC as required by newer avr-gcc versions

This commit is contained in:
bernet.andre@gmail.com
2012-11-07 22:04:31 +00:00
parent 0d6b19e350
commit eb4bfffc33
+6 -6
View File
@@ -1562,7 +1562,7 @@ void getADC_filt()
while ((ADCSRA & 0x10)==0); while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10; ADCSRA|=0x10;
t_ana[0][adc_input] = (t_ana[0][adc_input] + ADCW) >> 1; t_ana[0][adc_input] = (t_ana[0][adc_input] + ADC) >> 1;
} }
} }
@@ -1579,7 +1579,7 @@ void getADC_osmp()
// Wait for the AD conversion to complete // Wait for the AD conversion to complete
while ((ADCSRA & 0x10)==0); while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10; ADCSRA|=0x10;
temp_ana += ADCW; temp_ana += ADC;
} }
s_anaFilt[adc_input] = temp_ana / 2; // divide by 2^n to normalize result. s_anaFilt[adc_input] = temp_ana / 2; // divide by 2^n to normalize result.
} }
@@ -1594,7 +1594,7 @@ void getADC_single()
// Wait for the AD conversion to complete // Wait for the AD conversion to complete
while ((ADCSRA & 0x10)==0); while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10; ADCSRA|=0x10;
s_anaFilt[adc_input]= ADCW * 2; // use 11 bit numbers s_anaFilt[adc_input]= ADC * 2; // use 11 bit numbers
} }
} }
#endif #endif
@@ -1609,11 +1609,11 @@ void getADC_bandgap()
s_bgCheck += 32; s_bgCheck += 32;
while ((ADCSRA & 0x10)==0); ADCSRA|=0x10; // wait for sample while ((ADCSRA & 0x10)==0); ADCSRA|=0x10; // wait for sample
if (s_bgCheck == 0) { // 8x over-sample (256/32=8) if (s_bgCheck == 0) { // 8x over-sample (256/32=8)
BandGap = s_bgSum+ADCW; BandGap = s_bgSum+ADC;
s_bgSum = 0; s_bgSum = 0;
} }
else { else {
s_bgSum += ADCW; s_bgSum += ADC;
} }
ADCSRB |= (1<<MUX5); ADCSRB |= (1<<MUX5);
#else #else
@@ -1622,7 +1622,7 @@ void getADC_bandgap()
ADCSRA|=0x40; ADCSRA|=0x40;
while ((ADCSRA & 0x10)==0); while ((ADCSRA & 0x10)==0);
ADCSRA|=0x10; // take sample ADCSRA|=0x10; // take sample
BandGap=ADCW; BandGap=ADC;
#endif #endif
} }
#endif #endif