Trait gemma_m0::sercom::v2::spi::OpMode

source ·
pub trait OpMode: Sealed {
    const MODE: MODE_A;
    const MSSEN: bool;
}
Expand description

Type-level enum representing the SPI operating mode

See the documentation on type-level enums for a discussion of the pattern.

The available operating modes are Master, MasterHWSS and Slave. In Master mode, the SS signal must be handled by the user, so SS must be NoneT. In MasterHWSS mode, the hardware drives the SS line, so SomePad is required. In Slave mode, the SS pad is required as well, to indicate when data is valid.

Required Associated Constants§

source

const MODE: MODE_A

Corresponding variant from the PAC enum

source

const MSSEN: bool

Bit indicating whether hardware SS control is enabled

Implementors§

source§

impl OpMode for Master

source§

const MODE: MODE_A = MODE_A::SPI_MASTER

source§

const MSSEN: bool = false

source§

impl OpMode for MasterHWSS

source§

const MODE: MODE_A = MODE_A::SPI_MASTER

source§

const MSSEN: bool = true

source§

impl OpMode for Slave

source§

const MODE: MODE_A = MODE_A::SPI_SLAVE

source§

const MSSEN: bool = false