Struct s2pac_ch32v103::DMA

source ·
pub struct DMA { /* private fields */ }
Expand description

DMA controller

Implementations§

source§

impl DMA

source

pub const PTR: *const RegisterBlock = {0x40020000 as *const dma::RegisterBlock}

Pointer to the register block

source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

source

pub fn intfr(&self) -> &INTFR

0x00 - DMA interrupt status register (DMA_INTFR)

source

pub fn intfcr(&self) -> &INTFCR

0x04 - DMA interrupt flag clear register (DMA_INTFCR)

source

pub fn cfgr1(&self) -> &CFGR1

0x08 - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr1(&self) -> &CNTR1

0x0c - DMA channel 1 number of data register

source

pub fn paddr1(&self) -> &PADDR1

0x10 - DMA channel 1 peripheral address register

source

pub fn maddr1(&self) -> &MADDR1

0x14 - DMA channel 1 memory address register

source

pub fn cfgr2(&self) -> &CFGR2

0x1c - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr2(&self) -> &CNTR2

0x20 - DMA channel 2 number of data register

source

pub fn paddr2(&self) -> &PADDR2

0x24 - DMA channel 2 peripheral address register

source

pub fn maddr2(&self) -> &MADDR2

0x28 - DMA channel 2 memory address register

source

pub fn cfgr3(&self) -> &CFGR3

0x30 - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr3(&self) -> &CNTR3

0x34 - DMA channel 3 number of data register

source

pub fn paddr3(&self) -> &PADDR3

0x38 - DMA channel 3 peripheral address register

source

pub fn maddr3(&self) -> &MADDR3

0x3c - DMA channel 3 memory address register

source

pub fn cfgr4(&self) -> &CFGR4

0x44 - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr4(&self) -> &CNTR4

0x48 - DMA channel 4 number of data register

source

pub fn paddr4(&self) -> &PADDR4

0x4c - DMA channel 4 peripheral address register

source

pub fn maddr4(&self) -> &MADDR4

0x50 - DMA channel 4 memory address register

source

pub fn cfgr5(&self) -> &CFGR5

0x58 - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr5(&self) -> &CNTR5

0x5c - DMA channel 5 number of data register

source

pub fn paddr5(&self) -> &PADDR5

0x60 - DMA channel 5 peripheral address register

source

pub fn maddr5(&self) -> &MADDR5

0x64 - DMA channel 5 memory address register

source

pub fn cfgr6(&self) -> &CFGR6

0x6c - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr6(&self) -> &CNTR6

0x70 - DMA channel 6 number of data register

source

pub fn paddr6(&self) -> &PADDR6

0x74 - DMA channel 6 peripheral address register

source

pub fn maddr6(&self) -> &MADDR6

0x78 - DMA channel 6 memory address register

source

pub fn cfgr7(&self) -> &CFGR7

0x80 - DMA channel configuration register (DMA_CFGR)

source

pub fn cntr7(&self) -> &CNTR7

0x84 - DMA channel 7 number of data register

source

pub fn paddr7(&self) -> &PADDR7

0x88 - DMA channel 7 peripheral address register

source

pub fn maddr7(&self) -> &MADDR7

0x8c - DMA channel 7 memory address register

Trait Implementations§

source§

impl Debug for DMA

source§

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

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

impl Deref for DMA

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl Send for DMA

Auto Trait Implementations§

§

impl RefUnwindSafe for DMA

§

impl !Sync for DMA

§

impl Unpin for DMA

§

impl UnwindSafe for DMA

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>,

§

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>,

§

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.