embassy-stm32

Crates

git

Versions

stm32g441vb

Flavors

InjectedAdc

Struct InjectedAdc 

Source
pub struct InjectedAdc<'d, R: InjectedAdcRegs> { /* private fields */ }
Expand description

Injected ADC sequence with owned channels.

Implementations§

Source§

impl<'d, R: InjectedAdcRegs> InjectedAdc<'d, R>

Source

pub fn stop_injected_conversions(&mut self)

Stops injected convention.

Any ongoing injected conversion is aborted with partial result discarded.

Source

pub fn start_injected_conversions(&mut self)

Starts injected convention:

  • Immediately if in software trigger mode (JEXTEN = 0)
  • At the next active edge of the selected injected hardware trigger (JEXTEN != 0)
Source

pub async fn read(&mut self, buf: &mut [u16])

Reads injected convention result after the end of sequence is detected.

Source

pub fn read_latest(&mut self, buf: &mut [u16])

Reads latest result directly from the injected convention registers.

This function is intended to be used in a custom interrupt handler. For other use cases prefer read function.

Trait Implementations§

Source§

impl<'d, R: InjectedAdcRegs> Drop for InjectedAdc<'d, R>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'d, R> Freeze for InjectedAdc<'d, R>
where R: Freeze,

§

impl<'d, R> !RefUnwindSafe for InjectedAdc<'d, R>

§

impl<'d, R> Send for InjectedAdc<'d, R>
where R: Send,

§

impl<'d, R> Sync for InjectedAdc<'d, R>
where R: Sync,

§

impl<'d, R> Unpin for InjectedAdc<'d, R>
where R: Unpin,

§

impl<'d, R> !UnwindSafe for InjectedAdc<'d, R>

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

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.