[][src]Struct samd_dma::DMAController

pub struct DMAController<T: 'static + DmaStorage> { /* fields omitted */ }

DMA system controller.

Used to distribute channels, as well as control higher level operations of the DMA system.

Methods

impl<T: 'static + DmaStorage> DMAController<T>[src]

pub fn init(dmac: DMAC, storage: &'static mut T) -> DMAController<T>[src]

Initialise the DMA Controller with the specified storage.

pub fn disable(&mut self)[src]

Disable all channels and the CRC module. This will abort any ongoing DMA transactions. The DMA system will not be fully disabled until any ongoing burst transfer is completed.

pub fn enable(&mut self)[src]

Enable the DMA system.

pub fn is_enabled(&self) -> bool[src]

Returns true if the DMA system is enabled.

pub fn take_channel<U: Unsigned>(&mut self) -> Option<Channel> where
    U: IsLess<T::Index, Output = True>, 
[src]

Take a DMA channel by its number. If the channel has already been taken or if the ID is not available, None is returned. If you don't call return_channel on this channel, you can never get it back.

Safety

Taking the same channel from overlapping interrupt contexts could lead to double channels all the way. This will alias the exclusive references of the base and write-back descriptors corresponding to this channel. The same problem applies when a call to return_channel overlaps with a call to this function for the same channel.

pub fn return_channel(&mut self, channel: Channel)[src]

Return a channel to the controller. This will disable the channel and reset the channel and first transfer descriptor.

Safety

The same interrupt safety issues with take_channel apply here as well.

pub fn enable_priority_level(&mut self, level: Priority)[src]

Allow channels with the corresponding priority level to be part of arbitration.

pub fn diable_priority_level(&mut self, level: Priority)[src]

Deny channels with the corresponding priority level to be a part of arbitration.

pub fn priority_level_enabled(&self, level: Priority) -> bool[src]

Return true if the priority level is enabled.

pub fn set_priority_level_scheduling(&mut self, level: Priority, enable: bool)[src]

Enable or disable round-robin scheduling method for channels of the given priority level. Disabling round-robin scheduling will enable static scheduling.

pub fn get_channel_interrupt_status(&self) -> Channels[src]

Auto Trait Implementations

impl<T> Send for DMAController<T> where
    T: Send

impl<T> !Sync for DMAController<T>

impl<T> Unpin for DMAController<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.