Trait serpente::sercom::v2::uart::PadSet[][src]

pub trait PadSet: Sealed {
    type Sercom: Sercom;
    type Rx: OptionalPad;
    type Tx: OptionalPad;
    type Rts: OptionalPad;
    type Cts: OptionalPad;
}
Expand description

Type-level function to recover the OptionalPad types from a generic set of Pads

This trait is used as an interface between the Pads type and other types in this module. It acts as a type-level function, returning the corresponding Sercom and OptionalPad types. It serves to cut down on the total number of type parameters needed in the Config struct. The Config struct doesn’t need access to the Pins directly. Rather, it only needs to apply the SomePad trait bound when a Pin is required. The PadSet trait allows each Config struct to store an instance of Pads without itself being generic over all six type parameters of the Pads type.

Associated Types

Implementors