[][src]Struct stm32f3xx_hal_v2::adc::Adc

pub struct Adc<ADC> {
    pub rb: ADC,
    // some fields omitted
}

Analog Digital Converter Peripheral

Fields

rb: ADC

ADC Register

Implementations

impl Adc<ADC1>[src]

pub fn adc1(
    rb: ADC1,
    adc_common: &mut ADC1_2,
    ahb: &mut AHB,
    ckmode: CkMode,
    clocks: Clocks
) -> Self
[src]

Init a new ADC

Enables the clock, performs a calibration and enables the ADC

Panics

If one of the following occurs:

  • the clocksetting is not well defined.
  • the clock was already enabled with a different setting

pub fn setup_oneshot(&mut self)[src]

sets up adc in one shot mode for a single channel

impl Adc<ADC2>[src]

pub fn adc2(
    rb: ADC2,
    adc_common: &mut ADC1_2,
    ahb: &mut AHB,
    ckmode: CkMode,
    clocks: Clocks
) -> Self
[src]

Init a new ADC

Enables the clock, performs a calibration and enables the ADC

Panics

If one of the following occurs:

  • the clocksetting is not well defined.
  • the clock was already enabled with a different setting

pub fn setup_oneshot(&mut self)[src]

sets up adc in one shot mode for a single channel

impl Adc<ADC3>[src]

pub fn adc3(
    rb: ADC3,
    adc_common: &mut ADC3_4,
    ahb: &mut AHB,
    ckmode: CkMode,
    clocks: Clocks
) -> Self
[src]

Init a new ADC

Enables the clock, performs a calibration and enables the ADC

Panics

If one of the following occurs:

  • the clocksetting is not well defined.
  • the clock was already enabled with a different setting

pub fn setup_oneshot(&mut self)[src]

sets up adc in one shot mode for a single channel

impl Adc<ADC4>[src]

pub fn adc4(
    rb: ADC4,
    adc_common: &mut ADC3_4,
    ahb: &mut AHB,
    ckmode: CkMode,
    clocks: Clocks
) -> Self
[src]

Init a new ADC

Enables the clock, performs a calibration and enables the ADC

Panics

If one of the following occurs:

  • the clocksetting is not well defined.
  • the clock was already enabled with a different setting

pub fn setup_oneshot(&mut self)[src]

sets up adc in one shot mode for a single channel

Trait Implementations

impl<WORD, PIN> OneShot<ADC1, WORD, PIN> for Adc<ADC1> where
    WORD: From<u16>,
    PIN: Channel<ADC1, ID = u8>, 
[src]

type Error = ()

Error type returned by ADC methods

impl<WORD, PIN> OneShot<ADC2, WORD, PIN> for Adc<ADC2> where
    WORD: From<u16>,
    PIN: Channel<ADC2, ID = u8>, 
[src]

type Error = ()

Error type returned by ADC methods

impl<WORD, PIN> OneShot<ADC3, WORD, PIN> for Adc<ADC3> where
    WORD: From<u16>,
    PIN: Channel<ADC3, ID = u8>, 
[src]

type Error = ()

Error type returned by ADC methods

impl<WORD, PIN> OneShot<ADC4, WORD, PIN> for Adc<ADC4> where
    WORD: From<u16>,
    PIN: Channel<ADC4, ID = u8>, 
[src]

type Error = ()

Error type returned by ADC methods

Auto Trait Implementations

impl<ADC> Send for Adc<ADC> where
    ADC: Send
[src]

impl<ADC> Sync for Adc<ADC> where
    ADC: Sync
[src]

impl<ADC> Unpin for Adc<ADC> where
    ADC: Unpin
[src]

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.