embassy-stm32

Crates

git

Versions

stm32l4p5re

Flavors

Skip to main content

Dfsdm

Struct Dfsdm 

Source
pub struct Dfsdm<'d, T: Instance, C: ClockOutputMode> { /* private fields */ }
Expand description

DFSDM driver entry point.

Implementations§

Source§

impl<'d, T> Dfsdm<'d, T, OutputEnabled>
where T: Instance,

Source

pub fn new_ckout( peri: Peri<'d, T>, ckout: Peri<'d, impl CkoutPin<T>>, ckout_source: CkoutSource, ckout_div: CkoutDivider, ) -> Self

Create the driver with an output clock on ckout.

Source§

impl<'d, T> Dfsdm<'d, T, OutputDisabled>
where T: Instance,

Source

pub fn new(peri: Peri<'d, T>) -> Self

Create the driver without an output clock.

Source§

impl<'d, T, C> Dfsdm<'d, T, C>
where T: Instance + HasHwid, C: ClockOutputMode,

Source

pub fn hwid() -> Hwid

Reads the DFSDM version/ID register cluster (HWCFGR, VERR, IPIDR, SIDR).

filter_count/transceiver_count self-describe the silicon; embassy’s compile-time capability tags remain the primary shape mechanism. This is informational, not a runtime capability probe.

Source§

impl<'d, T, C> Dfsdm<'d, T, C>

Source

pub fn configure_pins<F, OUT>( self, f: F, ) -> (DfsdmCommon<'d, T, Enabled>, <OUT as ChannelCfgTuple<'d, T, C>>::Split)
where F: FnOnce(<T::Transceivers as Shape>::Selectors<T>) -> OUT, OUT: ChannelCfgTuple<'d, T, C>,

The closure receives one selector per transceiver the instance actually has, and must return one token per transceiver, as a tuple in the same order.

// DFSDM instance with 8-transceiver capability:

dfsdm1.configure_pins(|tb| {
    (
        tb.ch0.datin_ckin(p.PC1, p.PC0),
        tb.ch1.datin(p.PC3),
        tb.ch2.datin_ckin(p.PC5, p.PC4),
        tb.ch3.none(),
        tb.ch4.none(),
        tb.ch5.none(),
        tb.ch6.none(),
        tb.ch7.none(),
    )
});

// DFSDM instance with 2-transceiver capability:

dfsdm1.configure_pins(|tb| {
    (
        tb.ch0.datin_ckin(p.PC1, p.PC0),
        tb.ch1.datin(p.PC3),
    )
});

Auto Trait Implementations§

§

impl<'d, T, C> !UnwindSafe for Dfsdm<'d, T, C>

§

impl<'d, T, C> Freeze for Dfsdm<'d, T, C>

§

impl<'d, T, C> RefUnwindSafe for Dfsdm<'d, T, C>

§

impl<'d, T, C> Send for Dfsdm<'d, T, C>
where PhantomData<T>: Send, PhantomData<C>: Send, Option<Peri<'d, T>>: Send,

§

impl<'d, T, C> Sync for Dfsdm<'d, T, C>
where PhantomData<T>: Sync, PhantomData<C>: Sync, Option<Peri<'d, T>>: Sync,

§

impl<'d, T, C> Unpin for Dfsdm<'d, T, C>
where PhantomData<T>: Unpin, PhantomData<C>: Unpin, Option<Peri<'d, T>>: Unpin,

§

impl<'d, T, C> UnsafeUnpin for Dfsdm<'d, T, C>

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 = !

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.