embassy-stm32

Crates

git

Versions

stm32f469zg

Flavors

Channel

Struct Channel 

Source
pub struct Channel<'d> { /* private fields */ }
Expand description

DMA channel driver

Implementations§

Source§

impl<'d> Channel<'d>

Source

pub unsafe fn transfer<'a, MW: Word, PW: Word>( &'a mut self, request: Request, buf: *const [MW], dest_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a>

Create a memory DMA transfer (memory to memory), using raw pointers.

Source

pub unsafe fn transfer_raw<'a, MW: Word, PW: Word>( &'a mut self, request: Request, src_addr: *const MW, src_size: usize, dest_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a>

Create a memory DMA transfer (memory to memory), using raw pointers.

Source

pub unsafe fn read<'a, W: Word>( &'a mut self, request: Request, peri_addr: *mut W, buf: &'a mut [W], options: TransferOptions, ) -> Transfer<'a>

Create a read DMA transfer (peripheral to memory).

Source

pub unsafe fn read_raw<'a, MW: Word, PW: Word>( &'a mut self, request: Request, peri_addr: *mut PW, buf: *mut [MW], options: TransferOptions, ) -> Transfer<'a>

Create a read DMA transfer (peripheral to memory), using raw pointers.

Source

pub unsafe fn write<'a, MW: Word, PW: Word>( &'a mut self, request: Request, buf: &'a [MW], peri_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a>

Create a write DMA transfer (memory to peripheral).

Source

pub unsafe fn write_raw<'a, MW: Word, PW: Word>( &'a mut self, request: Request, buf: *const [MW], peri_addr: *mut PW, options: TransferOptions, ) -> Transfer<'a>

Create a write DMA transfer (memory to peripheral), using raw pointers.

Source

pub unsafe fn write_repeated<'a, W: Word>( &'a mut self, request: Request, repeated: &'a W, count: usize, peri_addr: *mut W, options: TransferOptions, ) -> Transfer<'a>

Create a write DMA transfer (memory to peripheral), writing the same value repeatedly.

Source§

impl<'d> Channel<'d>

Source

pub fn new<T: ChannelInstance>( _ch: Peri<'d, T>, _irq: impl Binding<T::Interrupt, InterruptHandler<T>> + 'd, ) -> Self

Create a new DMA channel driver.

Source

pub fn reborrow(&mut self) -> Channel<'_>

Reborrow the channel, allowing it to be used in multiple places.

Auto Trait Implementations§

§

impl<'d> Freeze for Channel<'d>

§

impl<'d> RefUnwindSafe for Channel<'d>

§

impl<'d> Send for Channel<'d>

§

impl<'d> Sync for Channel<'d>

§

impl<'d> Unpin for Channel<'d>

§

impl<'d> UnwindSafe for Channel<'d>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.