#[repr(C)]
pub struct LL_SPI_InitTypeDef { pub TransferDirection: u32, pub Mode: u32, pub DataWidth: u32, pub ClockPolarity: u32, pub ClockPhase: u32, pub NSS: u32, pub BaudRate: u32, pub BitOrder: u32, pub CRCCalculation: u32, pub CRCPoly: u32, }
Expand description

Re-export bindings @brief SPI Init structures definition

Fields§

§TransferDirection: u32

< Specifies the SPI unidirectional or bidirectional data mode. This parameter can be a value of @ref SPI_LL_EC_TRANSFER_MODE.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetTransferDirection().

§Mode: u32

< Specifies the SPI mode (Master/Slave). This parameter can be a value of @ref SPI_LL_EC_MODE.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetMode().

§DataWidth: u32

< Specifies the SPI data width. This parameter can be a value of @ref SPI_LL_EC_DATAWIDTH.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetDataWidth().

§ClockPolarity: u32

< Specifies the serial clock steady state. This parameter can be a value of @ref SPI_LL_EC_POLARITY.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetClockPolarity().

§ClockPhase: u32

< Specifies the clock active edge for the bit capture. This parameter can be a value of @ref SPI_LL_EC_PHASE.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetClockPhase().

§NSS: u32

< Specifies whether the NSS signal is managed by hardware (NSS pin) or by software using the SSI bit. This parameter can be a value of @ref SPI_LL_EC_NSS_MODE.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetNSSMode().

§BaudRate: u32

< Specifies the BaudRate prescaler value which will be used to configure the transmit and receive SCK clock. This parameter can be a value of @ref SPI_LL_EC_BAUDRATEPRESCALER. @note The communication clock is derived from the master clock. The slave clock does not need to be set.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetBaudRatePrescaler().

§BitOrder: u32

< Specifies whether data transfers start from MSB or LSB bit. This parameter can be a value of @ref SPI_LL_EC_BIT_ORDER.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetTransferBitOrder().

§CRCCalculation: u32

< Specifies if the CRC calculation is enabled or not. This parameter can be a value of @ref SPI_LL_EC_CRC_CALCULATION.

This feature can be modified afterwards using unitary functions @ref LL_SPI_EnableCRC() and @ref LL_SPI_DisableCRC().

§CRCPoly: u32

< Specifies the polynomial used for the CRC calculation. This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFFFF.

This feature can be modified afterwards using unitary function @ref LL_SPI_SetCRCPolynomial().

Trait Implementations§

source§

impl Clone for LL_SPI_InitTypeDef

source§

fn clone(&self) -> LL_SPI_InitTypeDef

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LL_SPI_InitTypeDef

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for LL_SPI_InitTypeDef

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.