atsamd_hal::adc

Struct InterruptAdc

Source
pub struct InterruptAdc<ADC, C>
where C: ConversionMode<ADC>,
{ /* private fields */ }
Expand description

An ADC where results are accessible via interrupt servicing.

Implementations§

Source§

impl<C> InterruptAdc<Adc0, C>
where C: ConversionMode<Adc0>,

Source

pub fn service_interrupt_ready(&mut self) -> Option<u16>

Source

pub fn start_conversion<PIN: Channel<Adc0, ID = u8>>(&mut self, pin: &mut PIN)

Starts a conversion sampling the specified pin.

Source

pub fn stop_conversion(&mut self)

Source§

impl<C> InterruptAdc<Adc1, C>
where C: ConversionMode<Adc1>,

Source

pub fn service_interrupt_ready(&mut self) -> Option<u16>

Source

pub fn start_conversion<PIN: Channel<Adc1, ID = u8>>(&mut self, pin: &mut PIN)

Starts a conversion sampling the specified pin.

Source

pub fn stop_conversion(&mut self)

Trait Implementations§

Source§

impl<C> From<Adc<Adc0>> for InterruptAdc<Adc0, C>
where C: ConversionMode<Adc0>,

Source§

fn from(adc: Adc<Adc0>) -> Self

Converts to this type from the input type.
Source§

impl<C> From<Adc<Adc1>> for InterruptAdc<Adc1, C>
where C: ConversionMode<Adc1>,

Source§

fn from(adc: Adc<Adc1>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<ADC, C> Freeze for InterruptAdc<ADC, C>
where ADC: Freeze,

§

impl<ADC, C> RefUnwindSafe for InterruptAdc<ADC, C>

§

impl<ADC, C> Send for InterruptAdc<ADC, C>
where ADC: Send, C: Send,

§

impl<ADC, C> Sync for InterruptAdc<ADC, C>
where ADC: Sync, C: Sync,

§

impl<ADC, C> Unpin for InterruptAdc<ADC, C>
where ADC: Unpin, C: Unpin,

§

impl<ADC, C> UnwindSafe for InterruptAdc<ADC, C>
where ADC: UnwindSafe, C: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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.