pub trait PadSet: Sealed {
    type Sercom: Sercom;
    type Sda: IsI2cPad<PadNum = Pad0, Sercom = Self::Sercom>;
    type Scl: IsI2cPad<PadNum = Pad1, Sercom = Self::Sercom>;
}
Expand description

Type-level function to recover the Pad 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.

This trait is a simplified version of the AnyKind trait pattern.

Required Associated Types

Implementors