pub trait AdcOps<H> {
    type Channel: PartialEq<Self::Channel> + Copy;
    type Settings: PartialEq<Self::Settings> + Copy;

    fn raw_init(&mut self, settings: Self::Settings);
    fn raw_read_adc(&self) -> u16;
    fn raw_is_converting(&self) -> bool;
    fn raw_start_conversion(&mut self);
    fn raw_set_channel(&mut self, channel: Self::Channel);
    fn raw_enable_channel(&mut self, channel: Self::Channel);
}
Expand description

Internal trait for the low-level ADC peripheral.

Prefer using the Adc API instead of this trait.

Required Associated Types

Channel ID type for this ADC.

Settings type for this ADC.

Required Methods

Initialize the ADC peripheral with the specified settings.

Warning: This is a low-level method and should not be called directly from user code.

Read out the ADC data register.

This method must only be called after a conversion completed.

Warning: This is a low-level method and should not be called directly from user code.

Check whether the ADC is currently converting a signal.

Warning: This is a low-level method and should not be called directly from user code.

Start a conversion on the currently selected channel.

Warning: This is a low-level method and should not be called directly from user code.

Set the multiplexer to a certain channel.

Warning: This is a low-level method and should not be called directly from user code.

Set the DIDR (Digital Input Disable) for a certain channel.

This disabled digital logic on the corresponding pin and allows measuring analog signals.

Warning: This is a low-level method and should not be called directly from user code.

Implementors