50 #define adc_conversion_ongoing (ADCSRA |= (1<<ADSC))
51 #define adc_conversion_done (!(ADCSRA |= (1<<ADSC)))
55 ADC_TRIG_FREE_RUN = ((0<<ADTS2)|(0<<ADTS1)|(0<<ADTS0)),
56 ADC_TRIG_ANACOMP = ((0<<ADTS2)|(0<<ADTS1)|(1<<ADTS0)),
57 ADC_TRIG_EXTINT0 = ((0<<ADTS2)|(1<<ADTS1)|(0<<ADTS0)),
58 ADC_TRIG_TIM0_COMPA = ((0<<ADTS2)|(1<<ADTS1)|(1<<ADTS0)),
59 ADC_TRIG_TIM0_OVF = ((1<<ADTS2)|(0<<ADTS1)|(0<<ADTS0)),
60 ADC_TRIG_TIM1_COMPB = ((1<<ADTS2)|(0<<ADTS1)|(1<<ADTS0)),
61 ADC_TRIG_TIM1_OVF = ((1<<ADTS2)|(1<<ADTS1)|(0<<ADTS0)),
62 ADC_TRIG_TIM1_CAPT = ((1<<ADTS2)|(1<<ADTS1)|(1<<ADTS0))
67 ADC_PS_2 = ((0<<ADPS2)|(0<<ADPS1)|(1<<ADPS0)),
68 ADC_PS_4 = ((0<<ADPS2)|(1<<ADPS1)|(0<<ADPS0)),
69 ADC_PS_8 = ((0<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)),
70 ADC_PS_16 = ((1<<ADPS2)|(0<<ADPS1)|(0<<ADPS0)),
71 ADC_PS_32 = ((1<<ADPS2)|(0<<ADPS1)|(1<<ADPS0)),
72 ADC_PS_64 = ((1<<ADPS2)|(1<<ADPS1)|(0<<ADPS0)),
73 ADC_PS_128 = ((1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0))
83 ADC_REF_INT = ((1<<REFS1)|(1<<REFS0))
88 ADC_CHAN_ADC0 = ((0<<MUX4)|(0<<MUX3)|(0<<MUX2)|(0<<MUX1)|(0<<MUX0)),
89 ADC_CHAN_ADC1 = ((0<<MUX4)|(0<<MUX3)|(0<<MUX2)|(0<<MUX1)|(1<<MUX0)),
90 ADC_CHAN_ADC2 = ((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