embassy-stm32

Crates

git

Versions

stm32h747ig-cm7

Flavors

Skip to main content

ShortCircuitDetector

Struct ShortCircuitDetector 

Source
pub struct ShortCircuitDetector<'a, 'd, T>
where T: Instance,
{ /* private fields */ }
Expand description

Short-circuit detector: flags when a transceiver’s input stays constant (consecutive identical bits) for longer than the threshold, indicating a stuck or short-circuited input.

Implementations§

Source§

impl<'a, 'd, T> ShortCircuitDetector<'a, 'd, T>

Source

pub async fn wait_for_event(&mut self) -> u8

Wait for a short-circuit-detector event

Source§

impl<'a, 'd, T> ShortCircuitDetector<'a, 'd, T>
where T: Instance,

Source

pub fn assign_transceivers<const N: usize>( &mut self, assignments: [ShortCircuitAssignment<'_, T>; N], )
where [(); N]: NonEmpty,

Assigns the transceivers to the short-circuit-detector (overwrites assignments)

Source

pub fn unassign_transceivers<const N: usize>( &mut self, transceivers: [&dyn TransceiverTrait<T, Enabled>; N], )
where [(); N]: NonEmpty,

Unassigns the transceivers from the short-circuit-detector

Source

pub fn assign_break_signals( &mut self, transceiver: &dyn TransceiverTrait<T, Enabled>, signals: BreakSignals, )

Assign break-signals for short-circuit-event of transceiver

§Note

This routes a short-circuit event to a DFSDM break wire (BKSCD); the receiving timer must separately map that wire to a break input (BRK).

Source

pub fn set_threshold( &mut self, transceiver: &dyn TransceiverTrait<T, Enabled>, threshold: u8, )

Set the short-circuit threshold for a transceiver.

Source

pub fn channel_flag(&self, channel: TransceiverChannel) -> bool

Whether the short-circuit flag is set for channel.

Source

pub fn clear_channel_flags(&mut self, channel: TransceiverChannel)

Clear the short-circuit flag for channel.

Source

pub fn flags(&self) -> u8

Short-circuit flag bitmap.

Source

pub fn clear_flags(&mut self)

Clear all pending detector flags for currently armed channels.

Use this after assigning transceivers to clear any startup residue before waiting for events.

Auto Trait Implementations§

§

impl<'a, 'd, T> !RefUnwindSafe for ShortCircuitDetector<'a, 'd, T>

§

impl<'a, 'd, T> !UnwindSafe for ShortCircuitDetector<'a, 'd, T>

§

impl<'a, 'd, T> Freeze for ShortCircuitDetector<'a, 'd, T>
where PhantomData<&'a DfsdmCommon<'d, T, Enabled>>: Freeze,

§

impl<'a, 'd, T> Send for ShortCircuitDetector<'a, 'd, T>
where PhantomData<&'a DfsdmCommon<'d, T, Enabled>>: Send,

§

impl<'a, 'd, T> Sync for ShortCircuitDetector<'a, 'd, T>
where PhantomData<&'a DfsdmCommon<'d, T, Enabled>>: Sync,

§

impl<'a, 'd, T> Unpin for ShortCircuitDetector<'a, 'd, T>
where PhantomData<&'a DfsdmCommon<'d, T, Enabled>>: Unpin,

§

impl<'a, 'd, T> UnsafeUnpin for ShortCircuitDetector<'a, 'd, T>

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.