Struct stm32f1xx_hal::spi::Spi

source ·
pub struct Spi<SPI, REMAP, PINS, FRAMESIZE, OPERATION = Master> { /* private fields */ }

Implementations§

Constructs an SPI instance using SPI1 in 8bit dataframe mode.

The pin parameter tuple (sck, miso, mosi) should be (PA5, PA6, PA7) or (PB3, PB4, PB5) configured as (Alternate<...>, Input<...>, Alternate<...>).

You can also use NoSck, NoMiso or NoMosi if you don’t want to use the pins

Constructs an SPI instance using SPI1 in 8bit dataframe mode.

The pin parameter tuple (sck, miso, mosi) should be (PA5, PA6, PA7) or (PB3, PB4, PB5) configured as (Input<...>, Alternate<...>, Input<...>).

You can also use NoMiso or NoMosi if you don’t want to use the pins

Constructs an SPI instance using SPI2 in 8bit dataframe mode.

The pin parameter tuple (sck, miso, mosi) should be (PB13, PB14, PB15) configured as (Alternate<...>, Input<...>, Alternate<...>).

You can also use NoSck, NoMiso or NoMosi if you don’t want to use the pins

Constructs an SPI instance using SPI2 in 8bit dataframe mode.

The pin parameter tuple (sck, miso, mosi) should be (PB13, PB14, PB15) configured as (Input<...>, Alternate<...>, Input<...>).

You can also use NoMiso or NoMosi if you don’t want to use the pins

Constructs an SPI instance using SPI3 in 8bit dataframe mode.

The pin parameter tuple (sck, miso, mosi) should be (PB3, PB4, PB5) configured as (Alternate<...>, Input<...>, Alternate<...>).

You can also use NoSck, NoMiso or NoMosi if you don’t want to use the pins

Constructs an SPI instance using SPI3 in 8bit dataframe mode.

The pin parameter tuple (sck, miso, mosi) should be (PB3, PB4, PB5) configured as (Input<...>, Alternate<...>, Input<...>).

You can also use NoMiso or NoMosi if you don’t want to use the pins

👎Deprecated since 0.6.0: Please use release instead

Select which frame format is used for data transfers

Starts listening to the SPI by enabling the Received data ready to be read (RXNE) interrupt and Transmit data register empty (TXE) interrupt

Stops listening to the SPI by disabling the Received data ready to be read (RXNE) interrupt and Transmit data register empty (TXE) interrupt

Returns true if the tx register is empty (and can accept data)

Returns true if the rx register is not empty (and can be read)

Returns true if data are received and the previous data have not yet been read from SPI_DR.

Converts from 8bit dataframe to 16bit.

Converts from 16bit dataframe to 8bit.

Trait Implementations§

An enumeration of SPI errors
Reads the word stored in the shift register Read more
Sends a word to the slave
Error type
Sends words to the slave, ignoring all the incoming words
Error type
Sends words to the slave, ignoring all the incoming words

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

Returns the argument unchanged.

Calls U::from(self).

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

Error type
Sends words to the slave. Returns the words received from the slave
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.