k210_soc::dmac

Struct 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 Freeze for DMAC

§

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,

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.