Struct imxrt_hal::adc::AnalogInput[][src]

pub struct AnalogInput<ADCx, P> { /* fields omitted */ }

A pin representing an analog input for a particular ADC

Implementations

impl<P, ADCx> AnalogInput<ADCx, P> where
    P: Pin<ADCx>,
    ADCx: ADC
[src]

pub fn new(pin: P) -> Self[src]

Creates a new analog input pin

pub fn release(self) -> P[src]

Release the ADC input, returning the underlying hardware pin. This pin is in an unspecified state

Trait Implementations

impl<P, ADCx> Channel<ADCx> for AnalogInput<ADCx, P> where
    P: Pin<ADCx>,
    ADCx: ADC
[src]

type ID = u16

Channel ID type Read more

impl<ADCx, WORD, P> OneShot<ADCx, WORD, AnalogInput<ADCx, P>> for ADC<ADCx> where
    ADCx: ADC,
    WORD: From<u16>,
    P: Pin<ADCx>, 
[src]

Implement embedded-hal traits

type Error = Infallible

Error type returned by ADC methods

fn read(&mut self, _pin: &mut AnalogInput<ADCx, P>) -> Result<WORD, Self::Error>[src]

Read an ADC value from an AnalogInput. This should always return a good result

Auto Trait Implementations

impl<ADCx, P> Send for AnalogInput<ADCx, P> where
    ADCx: Send,
    P: Send

impl<ADCx, P> Sync for AnalogInput<ADCx, P> where
    ADCx: Sync,
    P: Sync

impl<ADCx, P> Unpin for AnalogInput<ADCx, P> where
    ADCx: Unpin,
    P: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.