pub trait CompatiblePad: Sealed {
    type Sercom: Sercom;
    type PadNum: PadNum;
}
Expand description

Type class to improve compatibility between v1 and v2 SERCOM pad types

The sercom::v1::pads module uses a wrapper Pad type to represent SERCOM pads. The v2::pad module, on the other hand, does not use a wrapper. Instead, it labels each correctly-configured v2::Pin with the IsPad trait.

This trait forms a type class over both. It allows the v1::uart, v1::spi and v1::i2c modules to accept both v1 and v2 pad types.

Required Associated Types§

Implementors§

source§

impl<P> CompatiblePad for Pwhere P: IsPad,

§

type Sercom = <P as IsPad>::Sercom

§

type PadNum = <P as IsPad>::PadNum

source§

impl<S, N, P> CompatiblePad for Pad<S, N, P>where S: Sercom, N: PadNum, P: IsPad<Sercom = S, PadNum = N>,

§

type Sercom = S

§

type PadNum = N