[][src]Enum circuit_playground_express::sercom::SPI2Pinout

pub enum SPI2Pinout {
    Dipo0Dopo1SS {
        mosi: Sercom2Pad0,
        miso: Sercom2Pad2,
        sck: Sercom2Pad3,
        ss: Sercom2Pad1,
    },
    Dipo0Dopo2SS {
        mosi: Sercom2Pad0,
        miso: Sercom2Pad3,
        sck: Sercom2Pad1,
        ss: Sercom2Pad2,
    },
    Dipo2Dopo3SS {
        mosi: Sercom2Pad2,
        miso: Sercom2Pad0,
        sck: Sercom2Pad3,
        ss: Sercom2Pad1,
    },
    Dipo3Dopo0SS {
        mosi: Sercom2Pad3,
        miso: Sercom2Pad0,
        sck: Sercom2Pad1,
        ss: Sercom2Pad2,
    },
    Dipo0Dopo1 {
        miso: Sercom2Pad0,
        mosi: Sercom2Pad2,
        sck: Sercom2Pad3,
    },
    Dipo1Dopo1 {
        miso: Sercom2Pad1,
        mosi: Sercom2Pad2,
        sck: Sercom2Pad3,
    },
    Dipo0Dopo2 {
        miso: Sercom2Pad0,
        mosi: Sercom2Pad3,
        sck: Sercom2Pad1,
    },
    Dipo1Dopo3 {
        miso: Sercom2Pad1,
        mosi: Sercom2Pad0,
        sck: Sercom2Pad3,
    },
    Dipo2Dopo0 {
        miso: Sercom2Pad2,
        mosi: Sercom2Pad0,
        sck: Sercom2Pad1,
    },
    Dipo2Dopo2 {
        miso: Sercom2Pad2,
        mosi: Sercom2Pad3,
        sck: Sercom2Pad1,
    },
    Dipo2Dopo3 {
        miso: Sercom2Pad2,
        mosi: Sercom2Pad0,
        sck: Sercom2Pad3,
    },
    Dipo3Dopo0 {
        miso: Sercom2Pad3,
        mosi: Sercom2Pad0,
        sck: Sercom2Pad1,
    },
}

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: Sercom2Pad0miso: Sercom2Pad2sck: Sercom2Pad3ss: Sercom2Pad1
Dipo0Dopo2SS

Fields of Dipo0Dopo2SS

mosi: Sercom2Pad0miso: Sercom2Pad3sck: Sercom2Pad1ss: Sercom2Pad2
Dipo2Dopo3SS

Fields of Dipo2Dopo3SS

mosi: Sercom2Pad2miso: Sercom2Pad0sck: Sercom2Pad3ss: Sercom2Pad1
Dipo3Dopo0SS

Fields of Dipo3Dopo0SS

mosi: Sercom2Pad3miso: Sercom2Pad0sck: Sercom2Pad1ss: Sercom2Pad2
Dipo0Dopo1

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

Fields of Dipo0Dopo1

miso: Sercom2Pad0mosi: Sercom2Pad2sck: Sercom2Pad3
Dipo1Dopo1

Fields of Dipo1Dopo1

miso: Sercom2Pad1mosi: Sercom2Pad2sck: Sercom2Pad3
Dipo0Dopo2

Fields of Dipo0Dopo2

miso: Sercom2Pad0mosi: Sercom2Pad3sck: Sercom2Pad1
Dipo1Dopo3

Fields of Dipo1Dopo3

miso: Sercom2Pad1mosi: Sercom2Pad0sck: Sercom2Pad3
Dipo2Dopo0

Fields of Dipo2Dopo0

miso: Sercom2Pad2mosi: Sercom2Pad0sck: Sercom2Pad1
Dipo2Dopo2

Fields of Dipo2Dopo2

miso: Sercom2Pad2mosi: Sercom2Pad3sck: Sercom2Pad1
Dipo2Dopo3

Fields of Dipo2Dopo3

miso: Sercom2Pad2mosi: Sercom2Pad0sck: Sercom2Pad3
Dipo3Dopo0

Fields of Dipo3Dopo0

miso: Sercom2Pad3mosi: Sercom2Pad0sck: Sercom2Pad1

Auto Trait Implementations

impl Send for SPI2Pinout

impl Sync for SPI2Pinout

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]