[][src]Trait stm32f3xx_hal::dma::Channel

pub trait Channel: Channel {
    pub fn event_occurred(&self, event: Event) -> bool;
pub fn clear_event(&mut self, event: Event); pub fn reset(&mut self) { ... }
pub unsafe fn set_peripheral_address(
        &mut self,
        address: u32,
        inc: Increment
    ) { ... }
pub unsafe fn set_memory_address(&mut self, address: u32, inc: Increment) { ... }
pub fn set_transfer_length(&mut self, len: u16) { ... }
pub fn set_word_size<W>(&mut self) { ... }
pub fn set_priority_level(&mut self, priority: Priority) { ... }
pub fn set_direction(&mut self, direction: Direction) { ... }
pub fn listen(&mut self, event: Event) { ... }
pub fn unlisten(&mut self, event: Event) { ... }
pub fn enable(&mut self) { ... }
pub fn disable(&mut self) { ... }
pub fn is_enabled(&self) -> bool { ... } }

Trait implemented by all DMA channels

Required methods

pub fn event_occurred(&self, event: Event) -> bool[src]

Is the interrupt flag for the given event set?

pub fn clear_event(&mut self, event: Event)[src]

Clear the interrupt flag for the given event.

Passing Event::Any clears all interrupt flags.

Note that the the global interrupt flag is not automatically cleared even when all other flags are cleared. The only way to clear it is to call this method with Event::Any.

Loading content...

Provided methods

pub fn reset(&mut self)[src]

Reset the control registers of this channel. This stops any ongoing transfers.

pub unsafe fn set_peripheral_address(&mut self, address: u32, inc: Increment)[src]

Set the base address of the peripheral data register from/to which the data will be read/written.

Only call this method on disabled channels.

Panics

Panics if this channel is enabled.

Safety

Callers must ensure the given address is the address of a peripheral register that supports DMA.

pub unsafe fn set_memory_address(&mut self, address: u32, inc: Increment)[src]

Set the base address of the memory area from/to which the data will be read/written.

Only call this method on disabled channels.

Panics

Panics if this channel is enabled.

Safety

Callers must ensure the given address is a valid memory address that will remain valid as long as at is used by DMA.

pub fn set_transfer_length(&mut self, len: u16)[src]

Set the number of words to transfer.

Only call this method on disabled channels.

Panics

Panics if this channel is enabled.

pub fn set_word_size<W>(&mut self)[src]

Set the word size.

Panics

Panics if the word size is not one of 8, 16, or 32 bits.

pub fn set_priority_level(&mut self, priority: Priority)[src]

Set the priority level of this channel

pub fn set_direction(&mut self, direction: Direction)[src]

Set the transfer direction

pub fn listen(&mut self, event: Event)[src]

Enable the interrupt for the given event

pub fn unlisten(&mut self, event: Event)[src]

Disable the interrupt for the given event

pub fn enable(&mut self)[src]

Start a transfer

pub fn disable(&mut self)[src]

Stop the current transfer

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

Is there a transfer in progress on this channel?

Loading content...

Implementors

impl Channel for stm32f3xx_hal::dma::dma1::C1[src]

impl Channel for stm32f3xx_hal::dma::dma1::C2[src]

impl Channel for stm32f3xx_hal::dma::dma1::C3[src]

impl Channel for stm32f3xx_hal::dma::dma1::C4[src]

impl Channel for stm32f3xx_hal::dma::dma1::C5[src]

impl Channel for C6[src]

impl Channel for C7[src]

impl Channel for stm32f3xx_hal::dma::dma2::C1[src]

impl Channel for stm32f3xx_hal::dma::dma2::C2[src]

impl Channel for stm32f3xx_hal::dma::dma2::C3[src]

impl Channel for stm32f3xx_hal::dma::dma2::C4[src]

impl Channel for stm32f3xx_hal::dma::dma2::C5[src]

Loading content...