[][src]Enum metro_m0::sercom::SPI4Pinout

pub enum SPI4Pinout {
    Dipo0Dopo1SS {
        mosi: Sercom4Pad0,
        miso: Sercom4Pad2,
        sck: Sercom4Pad3,
        ss: Sercom4Pad1,
    },
    Dipo0Dopo2SS {
        mosi: Sercom4Pad0,
        miso: Sercom4Pad3,
        sck: Sercom4Pad1,
        ss: Sercom4Pad2,
    },
    Dipo2Dopo3SS {
        mosi: Sercom4Pad2,
        miso: Sercom4Pad0,
        sck: Sercom4Pad3,
        ss: Sercom4Pad1,
    },
    Dipo3Dopo0SS {
        mosi: Sercom4Pad3,
        miso: Sercom4Pad0,
        sck: Sercom4Pad1,
        ss: Sercom4Pad2,
    },
    Dipo0Dopo1 {
        miso: Sercom4Pad0,
        mosi: Sercom4Pad2,
        sck: Sercom4Pad3,
    },
    Dipo1Dopo1 {
        miso: Sercom4Pad1,
        mosi: Sercom4Pad2,
        sck: Sercom4Pad3,
    },
    Dipo0Dopo2 {
        miso: Sercom4Pad0,
        mosi: Sercom4Pad3,
        sck: Sercom4Pad1,
    },
    Dipo1Dopo3 {
        miso: Sercom4Pad1,
        mosi: Sercom4Pad0,
        sck: Sercom4Pad3,
    },
    Dipo2Dopo0 {
        miso: Sercom4Pad2,
        mosi: Sercom4Pad0,
        sck: Sercom4Pad1,
    },
    Dipo2Dopo2 {
        miso: Sercom4Pad2,
        mosi: Sercom4Pad3,
        sck: Sercom4Pad1,
    },
    Dipo2Dopo3 {
        miso: Sercom4Pad2,
        mosi: Sercom4Pad0,
        sck: Sercom4Pad3,
    },
    Dipo3Dopo0 {
        miso: Sercom4Pad3,
        mosi: Sercom4Pad0,
        sck: Sercom4Pad1,
    },
}

When configured for SPI, in addition to the normal Sercom pad mapping, the SPI peripheral allows those pads to be assigned to different combinations of DI (data-in), DO (data-out), SCK (clock) and SS (slave select) functions. The SPIXPinOut types represent concrete pad mappings for a given SPI Instance. For slaves, DI is the MOSI function and DO is the MISO function. For masters, DI is the MISO function and DO is the MOSI function. The slave configurations all require an SS pin and are constructed using the enum variants ending with SS. The master confiugrations do not require an SS pin and are constructed using the other variants. The SPI master hardware has support for automatically managing the SS line to enable a slave, but this interface does not expose that functionality. The variant names refer to the Data-in-Data-out configuration that is used to configure the SPI peripheral.

Variants

Dipo0Dopo1SS

Construct a slave pinout with mosi assigned to pad0, miso pad2, sck pad3 and ss to pad1.

Fields of Dipo0Dopo1SS

mosi: Sercom4Pad0miso: Sercom4Pad2sck: Sercom4Pad3ss: Sercom4Pad1
Dipo0Dopo2SS

Fields of Dipo0Dopo2SS

mosi: Sercom4Pad0miso: Sercom4Pad3sck: Sercom4Pad1ss: Sercom4Pad2
Dipo2Dopo3SS

Fields of Dipo2Dopo3SS

mosi: Sercom4Pad2miso: Sercom4Pad0sck: Sercom4Pad3ss: Sercom4Pad1
Dipo3Dopo0SS

Fields of Dipo3Dopo0SS

mosi: Sercom4Pad3miso: Sercom4Pad0sck: Sercom4Pad1ss: Sercom4Pad2
Dipo0Dopo1

Construct a master pinout with miso assigned to pad0, mosi pad2 and sck to pad3

Fields of Dipo0Dopo1

miso: Sercom4Pad0mosi: Sercom4Pad2sck: Sercom4Pad3
Dipo1Dopo1

Fields of Dipo1Dopo1

miso: Sercom4Pad1mosi: Sercom4Pad2sck: Sercom4Pad3
Dipo0Dopo2

Fields of Dipo0Dopo2

miso: Sercom4Pad0mosi: Sercom4Pad3sck: Sercom4Pad1
Dipo1Dopo3

Fields of Dipo1Dopo3

miso: Sercom4Pad1mosi: Sercom4Pad0sck: Sercom4Pad3
Dipo2Dopo0

Fields of Dipo2Dopo0

miso: Sercom4Pad2mosi: Sercom4Pad0sck: Sercom4Pad1
Dipo2Dopo2

Fields of Dipo2Dopo2

miso: Sercom4Pad2mosi: Sercom4Pad3sck: Sercom4Pad1
Dipo2Dopo3

Fields of Dipo2Dopo3

miso: Sercom4Pad2mosi: Sercom4Pad0sck: Sercom4Pad3
Dipo3Dopo0

Fields of Dipo3Dopo0

miso: Sercom4Pad3mosi: Sercom4Pad0sck: Sercom4Pad1

Auto Trait Implementations

impl Send for SPI4Pinout

impl Sync for SPI4Pinout

Blanket Implementations

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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, U> Into for T where
    U: From<T>, 
[src]

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

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

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