# DMAC in k210_soc::dmac - Rust
DMAC peripheral abstraction
Keywords: rust, rustlang, rust-lang, DMAC

# Struct k210_soc::dmac::DMAC

source · [−]

    pub struct DMAC { /* private fields */ }

Expand description

DMAC peripheral abstraction

## Implementations

source

### impl DMAC

source

#### pub fn read_id(&self) -> u64

Get DMAC ID

source

#### pub fn read_version(&self) -> u64

Get DMAC version

source

#### pub fn read_channel_id(&self, channel_num: dma_channel) -> u64

Get AXI ID for channel

source

#### pub fn disable(&self)

Disable DMAC peripheral.

source

#### pub fn src_transaction_complete_int_enable(&self, channel_num: dma_channel)

source

#### pub fn channel_enable(&self, channel_num: dma_channel)

Enable a DMA channel.

source

#### pub fn channel_disable(&self, channel_num: dma_channel)

Disable a DMA channel.

source

#### pub fn check_channel_busy(&self, channel_num: dma_channel) -> bool

Check if a DMA channel is busy.

source

#### pub fn set_list_master_select(
&self,
channel_num: dma_channel,
sd_sel: src_dst_select,
mst_num: master_number
) -> Result<(), ()>

source

#### pub fn enable_common_interrupt_status(&self)

source

#### pub fn enable_common_interrupt_signal(&self)

source

#### pub fn disable_channel_interrupt(&self, channel_num: dma_channel)

source

#### pub fn set_channel_param(
&self,
channel_num: dma_channel,
src: u64,
dest: u64,
src_inc: address_increment,
dest_inc: address_increment,
burst_size: burst_length,
trans_width: transfer_width,
block_size: u32
)

Set DMA channel parameters.

source

#### pub fn init(&self)

Initialize DMA controller

source

#### pub fn set_single_mode(
&self,
channel_num: dma_channel,
src: u64,
dest: u64,
src_inc: address_increment,
dest_inc: address_increment,
burst_size: burst_length,
trans_width: transfer_width,
block_size: u32
)

Start a single DMA transfer.

source

#### pub fn wait_done(&self, channel_num: dma_channel)

Wait for dmac work done.

source

#### pub fn is_idle(&self, channel_num: dma_channel) -> bool

Determine if a DMA channel is idle or not.

source

#### pub fn wait_idle(&self, channel_num: dma_channel)

Wait for a DMA channel to be idle.

## Auto Trait Implementations

### impl RefUnwindSafe for DMAC

### impl Send for DMAC

### impl !Sync for DMAC

### impl Unpin for DMAC

### impl UnwindSafe for DMAC

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

const: unstable · source

#### fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

source

### impl<T> BorrowMut<T> for T where
T: ?Sized,

const: unstable · source

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

Mutably borrows from an owned value. Read more

source

### impl<T> From<T> for T

const: unstable · source

#### fn from(t: T) -> T

Returns the argument unchanged.

source

### impl<T, U> Into<U> for T where
U: From<T>,

const: unstable · 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.

const: unstable · 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.

const: unstable · source

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

Performs the conversion.