Struct stm32f7xx_hal::spi::Transfer[][src]

pub struct Transfer<Word: SupportedWordSize, I, P, Buffer, Rx: Target, Tx: Target, State> { /* fields omitted */ }
Expand description

A DMA transfer of the SPI peripheral

Since DMA can send and receive at the same time, using two DMA transfers and two DMA streams, we need this type to represent this operation and wrap the underlying dma::Transfer instances.

Implementations

Enables the given interrupts for this DMA transfer

These interrupts are only enabled for this transfer. The settings doesn’t affect other transfers, nor subsequent transfers using the same DMA streams.

Start the DMA transfer

Consumes this instance of Transfer and returns another instance with its type state set to indicate the transfer has been started.

Checks whether the transfer is still ongoing

Waits for the transfer to end

This method will block if the transfer is still ongoing. If you want this method to return immediately, first check whether the transfer is still ongoing by calling is_active.

An ongoing transfer needs exlusive access to some resources, namely the data buffer, the DMA stream, and the peripheral. Those have been moved into the Transfer instance to prevent concurrent access to them. This method returns those resources, so they can be used again.

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.

Should always be Self

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.