[][src]Enum circuit_playground_express::sercom::SPI1Pinout

pub enum SPI1Pinout {
    Dipo0Dopo1SS {
        mosi: Sercom1Pad0,
        miso: Sercom1Pad2,
        sck: Sercom1Pad3,
        ss: Sercom1Pad1,
    },
    Dipo0Dopo2SS {
        mosi: Sercom1Pad0,
        miso: Sercom1Pad3,
        sck: Sercom1Pad1,
        ss: Sercom1Pad2,
    },
    Dipo2Dopo3SS {
        mosi: Sercom1Pad2,
        miso: Sercom1Pad0,
        sck: Sercom1Pad3,
        ss: Sercom1Pad1,
    },
    Dipo3Dopo0SS {
        mosi: Sercom1Pad3,
        miso: Sercom1Pad0,
        sck: Sercom1Pad1,
        ss: Sercom1Pad2,
    },
    Dipo0Dopo1 {
        miso: Sercom1Pad0,
        mosi: Sercom1Pad2,
        sck: Sercom1Pad3,
    },
    Dipo1Dopo1 {
        miso: Sercom1Pad1,
        mosi: Sercom1Pad2,
        sck: Sercom1Pad3,
    },
    Dipo0Dopo2 {
        miso: Sercom1Pad0,
        mosi: Sercom1Pad3,
        sck: Sercom1Pad1,
    },
    Dipo1Dopo3 {
        miso: Sercom1Pad1,
        mosi: Sercom1Pad0,
        sck: Sercom1Pad3,
    },
    Dipo2Dopo0 {
        miso: Sercom1Pad2,
        mosi: Sercom1Pad0,
        sck: Sercom1Pad1,
    },
    Dipo2Dopo2 {
        miso: Sercom1Pad2,
        mosi: Sercom1Pad3,
        sck: Sercom1Pad1,
    },
    Dipo2Dopo3 {
        miso: Sercom1Pad2,
        mosi: Sercom1Pad0,
        sck: Sercom1Pad3,
    },
    Dipo3Dopo0 {
        miso: Sercom1Pad3,
        mosi: Sercom1Pad0,
        sck: Sercom1Pad1,
    },
}

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: Sercom1Pad0miso: Sercom1Pad2sck: Sercom1Pad3ss: Sercom1Pad1
Dipo0Dopo2SS

Fields of Dipo0Dopo2SS

mosi: Sercom1Pad0miso: Sercom1Pad3sck: Sercom1Pad1ss: Sercom1Pad2
Dipo2Dopo3SS

Fields of Dipo2Dopo3SS

mosi: Sercom1Pad2miso: Sercom1Pad0sck: Sercom1Pad3ss: Sercom1Pad1
Dipo3Dopo0SS

Fields of Dipo3Dopo0SS

mosi: Sercom1Pad3miso: Sercom1Pad0sck: Sercom1Pad1ss: Sercom1Pad2
Dipo0Dopo1

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

Fields of Dipo0Dopo1

miso: Sercom1Pad0mosi: Sercom1Pad2sck: Sercom1Pad3
Dipo1Dopo1

Fields of Dipo1Dopo1

miso: Sercom1Pad1mosi: Sercom1Pad2sck: Sercom1Pad3
Dipo0Dopo2

Fields of Dipo0Dopo2

miso: Sercom1Pad0mosi: Sercom1Pad3sck: Sercom1Pad1
Dipo1Dopo3

Fields of Dipo1Dopo3

miso: Sercom1Pad1mosi: Sercom1Pad0sck: Sercom1Pad3
Dipo2Dopo0

Fields of Dipo2Dopo0

miso: Sercom1Pad2mosi: Sercom1Pad0sck: Sercom1Pad1
Dipo2Dopo2

Fields of Dipo2Dopo2

miso: Sercom1Pad2mosi: Sercom1Pad3sck: Sercom1Pad1
Dipo2Dopo3

Fields of Dipo2Dopo3

miso: Sercom1Pad2mosi: Sercom1Pad0sck: Sercom1Pad3
Dipo3Dopo0

Fields of Dipo3Dopo0

miso: Sercom1Pad3mosi: Sercom1Pad0sck: Sercom1Pad1

Auto Trait Implementations

impl Send for SPI1Pinout

impl Sync for SPI1Pinout

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]