Struct stm32f7xx_hal::dma::Transfer [−][src]
pub struct Transfer<T: Target, B, State> { /* fields omitted */ }
Expand description
Represents an ongoing DMA transfer
Peripheral APIs that support DMA have methods like write_all
and
read_all
, which return instances of this struct.
Implementations
pub fn enable_interrupts(
&mut self,
handle: &Handle<T::Instance, Enabled>,
interrupts: Interrupts
)
pub fn enable_interrupts(
&mut self,
handle: &Handle<T::Instance, Enabled>,
interrupts: Interrupts
)
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 stream.
Checks whether the transfer is still ongoing
Try to cancel an in process transfer. Check is_active to verify cancellation
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.