Struct stm32_hal2::spi::SpiMode[][src]

pub struct SpiMode {
    pub polarity: SpiPolarity,
    pub phase: SpiPhase,
}
Expand description

SPI mode. Sets CFGR2 reigster, CPOL and CPHA fields.

Fields

polarity: SpiPolarity

Clock polarity

phase: SpiPhase

Clock phase

Implementations

Set Spi Mode 0: Idle low, capture on first transition.

Set Spi Mode 1: Idle low, capture on second transition.

Set Spi Mode 2: Idle high, capture on first transition.

Set Spi Mode 3: Idle high, capture on second transition.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.