pub struct AdcConfig { /* private fields */ }
Expand description

Configuration for the adc. There are some additional parameters on the adc peripheral that can be added here when needed but this covers several basic usecases.

Implementations§

source§

impl AdcConfig

source

pub fn clock(self, clock: Clock) -> Self

change the clock field

source

pub fn resolution(self, resolution: Resolution) -> Self

change the resolution field

source

pub fn align(self, align: Align) -> Self

change the align field

source

pub fn scan(self, scan: Scan) -> Self

change the scan field

source

pub fn external_trigger( self, trigger_mode: TriggerMode, trigger: ExternalTrigger ) -> Self

change the external_trigger field

source

pub fn continuous(self, continuous: Continuous) -> Self

change the continuous field

source

pub fn dma(self, dma: Dma) -> Self

change the dma field

source

pub fn end_of_conversion_interrupt( self, end_of_conversion_interrupt: Eoc ) -> Self

change the end_of_conversion_interrupt field

source

pub fn default_sample_time(self, default_sample_time: SampleTime) -> Self

change the default_sample_time field

source

pub fn reference_voltage(self, vdda_mv: u32) -> Self

Specify the reference voltage for the ADC.

Args
  • vdda_mv - The ADC reference voltage in millivolts.

Trait Implementations§

source§

impl Clone for AdcConfig

source§

fn clone(&self) -> AdcConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AdcConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for AdcConfig

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Format for AdcConfig

source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
source§

impl PartialEq for AdcConfig

source§

fn eq(&self, other: &AdcConfig) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for AdcConfig

source§

impl Eq for AdcConfig

source§

impl StructuralEq for AdcConfig

source§

impl StructuralPartialEq for AdcConfig

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.