[][src]Trait avr_hal_generic::adc::AdcOps

pub trait AdcOps<H> {
    type Channel: PartialEq + Copy;
    type Settings: PartialEq + Copy;
    pub fn raw_init(&mut self, settings: Self::Settings);
pub fn raw_read_adc(&self) -> u16;
pub fn raw_is_converting(&self) -> bool;
pub fn raw_start_conversion(&mut self);
pub fn raw_set_channel(&mut self, channel: Self::Channel);
pub fn raw_enable_channel(&mut self, channel: Self::Channel); }

Internal trait for the low-level ADC peripheral.

Prefer using the Adc API instead of this trait.

Associated Types

type Channel: PartialEq + Copy[src]

Channel ID type for this ADC.

type Settings: PartialEq + Copy[src]

Settings type for this ADC.

Loading content...

Required methods

pub fn raw_init(&mut self, settings: Self::Settings)[src]

Initialize the ADC peripheral with the specified settings.

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

pub fn raw_read_adc(&self) -> u16[src]

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.

pub fn raw_is_converting(&self) -> bool[src]

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.

pub fn raw_start_conversion(&mut self)[src]

Start a conversion on the currently selected channel.

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

pub fn raw_set_channel(&mut self, channel: Self::Channel)[src]

Set the multiplexer to a certain channel.

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

pub fn raw_enable_channel(&mut self, channel: Self::Channel)[src]

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.

Loading content...

Implementors

Loading content...