embassy-stm32

Crates

git

Versions

stm32l4p5re

Flavors

Skip to main content

InstanceState

Struct InstanceState 

Source
pub struct InstanceState {
    pub short_circuit_armed: AtomicU8,
    pub short_circuit_waker: AtomicWaker,
    pub clock_absence_armed: AtomicU8,
    pub clock_absence_waker: AtomicWaker,
}
Expand description

State shared between an instance’s interrupt handler and its detectors.

Fields§

§short_circuit_armed: AtomicU8

Bitmask of transceivers whose short-circuit detector the driver has armed (aggregate SCDEN mirror; driver is the sole writer).

§short_circuit_waker: AtomicWaker

Waker for short-circuit-detector events

§clock_absence_armed: AtomicU8

Bitmask of transceivers whose clock-absence detector the driver has armed (aggregate CKABEN mirror; driver is the sole writer).

§clock_absence_waker: AtomicWaker

Waker for clock-absence-detector events

Implementations§

Source§

impl InstanceState

Source

pub const fn new() -> Self

Instantiate a fresh InstanceState.

This is const so it can initialize static INSTANCE_STATE (emitted by build.rs); use Default where a non-const value is more convenient.

Trait Implementations§

Source§

impl Default for InstanceState

Source§

fn default() -> InstanceState

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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.