49 static bool adc_initialized;
50 static bool adc_conversion_started;
71 ADCSRA = (1<<ADEN)|prescale;
72 ADMUX = (uint8_t)ref|(uint8_t)chan;
75 adc_initialized =
true;
76 adc_conversion_started =
false;
93 adc_initialized =
false;
94 adc_conversion_started =
false;
107 if (adc_initialized ==
false){
110 adc_conversion_started =
true;
128 if (adc_conversion_started ==
false){
131 if (ADCSRA & (1<<ADSC)){
134 adc_conversion_started =
false;
135 ADMUX |= (adjust<<ADLAR);