atsamd_hal::sercom::spi

Trait ValidConfig

Source
pub trait ValidConfig: AnyConfig { }
Expand description

Marker trait for valid SPI Configurations

A functional SPI peripheral must have, at a minimum, an SCLK pad and either a Data In or a Data Out pad. Dependeing on the OpMode, an SS pad may also be required.

The ValidConfig trait is implemented only for valid combinations of Pads and OpMode. No Config is valid if the SCK pad is NoneT or if both the Data In and Data Out pads are NoneT. When in Master OpMode, the SS pad must be NoneT, while in MasterHWSS or Slave OpMode, the SS pad must be SomePad.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<P, Z> ValidConfig for Config<P, Master, Z>
where P: ValidPads<SS = NoneT>, Z: Size,

Source§

impl<P, Z> ValidConfig for Config<P, MasterHWSS, Z>
where P: ValidPads, Z: Size, P::SS: SomePad,

Source§

impl<P, Z> ValidConfig for Config<P, Slave, Z>
where P: ValidPads, Z: Size, P::SS: SomePad,