Struct stm32f3xx_hal::dma::Transfer

source ·
pub struct Transfer<B, C: Channel, T: Target> { /* private fields */ }
Expand description

An in-progress one-shot DMA transfer

Implementations§

source§

impl<B, C: Channel, T: Target> Transfer<B, C, T>

source

pub fn start_write(buffer: B, channel: C, target: T) -> Selfwhere B: WriteBuffer + 'static, T: OnChannel<C>,

Start a DMA write transfer.

Panics

Panics if the buffer is longer than 65535 words.

source

pub fn start_read(buffer: B, channel: C, target: T) -> Selfwhere B: ReadBuffer + 'static, T: OnChannel<C>,

Start a DMA read transfer.

Panics

Panics if the buffer is longer than 65535 words.

source

pub fn is_complete(&self) -> bool

Is this transfer complete?

Panics

Panics if no transfer is ongoing.

source

pub fn stop(self) -> (B, C, T)

Stop this transfer and return ownership over its parts

Panics

Panics no transfer is ongoing.

source

pub fn wait(self) -> (B, C, T)

Block until this transfer is done and return ownership over its parts

Trait Implementations§

source§

impl<B: Debug, C: Debug + Channel, T: Debug + Target> Debug for Transfer<B, C, T>

source§

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

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

impl<B, C: Channel, T: Target> Drop for Transfer<B, C, T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<B, C, T> RefUnwindSafe for Transfer<B, C, T>where B: RefUnwindSafe, C: RefUnwindSafe, T: RefUnwindSafe,

§

impl<B, C, T> Send for Transfer<B, C, T>where B: Send, C: Send, T: Send,

§

impl<B, C, T> Sync for Transfer<B, C, T>where B: Sync, C: Sync, T: Sync,

§

impl<B, C, T> Unpin for Transfer<B, C, T>where B: Unpin, C: Unpin, T: Unpin,

§

impl<B, C, T> UnwindSafe for Transfer<B, C, T>where B: UnwindSafe, C: UnwindSafe, T: UnwindSafe,

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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.
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.
source§

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

Performs the conversion.