Struct imxrt_hal::adc::ADC[][src]

pub struct ADC<ADCx> { /* fields omitted */ }

Implementations

impl<ADCx> ADC<ADCx>[src]

pub fn set_resolution(&mut self, bits: ResolutionBits)[src]

Sets the resolution that analog reads return, in bits

pub fn set_averaging(&mut self, avg: AveragingCount)[src]

Sets the number of hardware averages taken by the ADC

pub fn set_conversion_speed(&mut self, conversion_speed: ConversionSpeed)[src]

Sets the conversion speed for this ADC, see ConversionSpeed for clock cycle counts.

pub fn set_low_power_mode(&mut self, state: bool)[src]

Enables or disables the low power configuration in the ADC. This does limit the ADACK clock frequency (<= 20MHz)

pub fn calibrate(&mut self)[src]

Calibrates the ADC, will wait for finish

Trait Implementations

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> Send for ADC<ADCx> where
    ADCx: Send

impl<ADCx> !Sync for ADC<ADCx>

impl<ADCx> Unpin for ADC<ADCx> where
    ADCx: 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.