26 loop_until_bit_is_clear(ADCSRA, ADSC);
29 ADMUX = (ref | (pin & 0x1f));
45 loop_until_bit_is_clear(ADCSRA, ADSC);
uint8_t m_event
Event to push on completion.
friend void ADC_vect(void)
virtual void on_change(uint16_t value)
virtual void on_interrupt(uint16_t arg)
#define bit_write(c, p, b)
#define bit_mask_set(p, m)
virtual void on_event(uint8_t type, uint16_t value)
static AnalogPin * sampling_pin
Current sampling pin if any.
static bool push(uint8_t type, Handler *target, uint16_t value=0)
bool sample_request(uint8_t event=Event::NULL_TYPE)
uint16_t m_value
Latest sample value.