embassy-stm32

Crates

git

Versions

stm32h7b0zb

Flavors

Skip to main content

PinSet

Trait PinSet 

Source
pub trait PinSet: Sealed {
    type Datin<'d>;
    type Ckin<'d>;

    const HAS_DATA: bool;
    const HAS_CLK: bool;

    // Required methods
    fn extract_datin<'d>(pin: Self::Datin<'d>) -> Option<Flex<'d>>;
    fn extract_ckin<'d>(pin: Self::Ckin<'d>) -> Option<Flex<'d>>;
}
Expand description

Type-level pin presence of one transceiver. Exactly three states exist; “clock without data” has no representative and is therefore inexpressible.

Required Associated Constants§

Source

const HAS_DATA: bool

Transceiver owns a DATIN pin.

Source

const HAS_CLK: bool

Transceiver owns a CKIN pin.

Required Associated Types§

Source

type Datin<'d>

Storage for the DATIN pin: Flex<'d> if present, () if absent.

Source

type Ckin<'d>

Storage for the CKIN pin: Flex<'d> if present, () if absent.

Required Methods§

Source

fn extract_datin<'d>(pin: Self::Datin<'d>) -> Option<Flex<'d>>

Extracts the Flex if present, otherwise returns None.

Source

fn extract_ckin<'d>(pin: Self::Ckin<'d>) -> Option<Flex<'d>>

Extracts the Flex if present, otherwise returns None.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl PinSet for DataClk

Source§

const HAS_DATA: bool = true

Source§

const HAS_CLK: bool = true

Source§

type Datin<'d> = Flex<'d>

Source§

type Ckin<'d> = Flex<'d>

Source§

impl PinSet for DataOnly

Source§

const HAS_DATA: bool = true

Source§

const HAS_CLK: bool = false

Source§

type Datin<'d> = Flex<'d>

Source§

type Ckin<'d> = ()

Source§

impl PinSet for NoPins

Source§

const HAS_DATA: bool = false

Source§

const HAS_CLK: bool = false

Source§

type Datin<'d> = ()

Source§

type Ckin<'d> = ()