[][src]Struct lpc8xx_hal::swm::pin_state::Swm

pub struct Swm<Output, Inputs>(_, _);

Marks a Pin as being available for switch matrix function assigment

The type parameters of this struct track whether output and input functions have been assigned to a pin:

  • Output tracks whether an output function has been assigned. Zero or one output functions can be assigned to a pin.
  • Inputs tracks the number of assigned input functions. Any number of input functions can be assigned to a pin at the same time.

Both type parameters use nested tuples to count the number of assigned functions. The empty tuple (()) represents zero assigned functions, the empty tuple nested in another tuple (((),)) represents one function being assigned, (((),)) represents two assigned functions, and so forth. This is a bit of a hack, of course, but it should do until const generics become available.

Trait Implementations

impl<Output, Inputs> PinState for Swm<Output, Inputs>[src]

Auto Trait Implementations

impl<Output, Inputs> Unpin for Swm<Output, Inputs> where
    Inputs: Unpin,
    Output: Unpin

impl<Output, Inputs> Send for Swm<Output, Inputs> where
    Inputs: Send,
    Output: Send

impl<Output, Inputs> Sync for Swm<Output, Inputs> where
    Inputs: Sync,
    Output: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self