Skip to main content

DmaChannelConfig

Struct DmaChannelConfig 

Source
pub struct DmaChannelConfig {
    pub src_peripheral: u8,
    pub dst_peripheral: u8,
    pub flow_control: FlowControl,
    pub src_width: TransferWidth,
    pub dst_width: TransferWidth,
    pub src_burst: BurstSize,
    pub dst_burst: BurstSize,
    pub src_inc: bool,
    pub dst_inc: bool,
    pub transfer_int: bool,
    pub error_int: bool,
    pub bus_lock: bool,
}
Expand description

DMA channel configuration.

Fields§

§src_peripheral: u8

Source peripheral select (0-15).

§dst_peripheral: u8

Destination peripheral select (0-15).

§flow_control: FlowControl

Flow control mode.

§src_width: TransferWidth

Source transfer width.

§dst_width: TransferWidth

Destination transfer width.

§src_burst: BurstSize

Source burst size.

§dst_burst: BurstSize

Destination burst size.

§src_inc: bool

Increment source address after each beat.

§dst_inc: bool

Increment destination address after each beat.

§transfer_int: bool

Enable transfer complete interrupt.

§error_int: bool

Enable error interrupt.

§bus_lock: bool

Bus lock during transfer.

Implementations§

Source§

impl DmaChannelConfig

Source

pub fn mem_to_peripheral(self, peri: DmaPeripheral) -> Self

Configure this channel for a memory → peripheral transfer to peri: sets MemToPeripheral flow control, the destination handshaking ID, and holds the destination address fixed (a peripheral data register).

Source

pub fn peripheral_to_mem(self, peri: DmaPeripheral) -> Self

Configure this channel for a peripheral → memory transfer from peri: sets PeripheralToMem flow control, the source handshaking ID, and holds the source address fixed (a peripheral data register).

Trait Implementations§

Source§

impl Clone for DmaChannelConfig

Source§

fn clone(&self) -> DmaChannelConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DmaChannelConfig

Source§

impl Debug for DmaChannelConfig

Source§

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

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

impl Default for DmaChannelConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.