[][src]Trait embedded_dma::StaticWriteBuffer

pub unsafe trait StaticWriteBuffer: WriteBuffer {
    type Word;
    unsafe fn static_write_buffer(&mut self) -> (*mut Self::Word, usize);
}

Trait for buffers that can be given to DMA for writing. This is a more strict version of WriteBuffer, if you are not sure about which one to use on your safe API, prefer this one. This trait also allows end users to unsafely bypass the 'static invariant.

Safety

This has the same invariants as WriteBuffer with the additional requirement that the buffer should have a 'static lifetime.

Associated Types

type Word

Loading content...

Required methods

unsafe fn static_write_buffer(&mut self) -> (*mut Self::Word, usize)

Provide a buffer usable for DMA writes.

The return value is:

  • pointer to the start of the buffer
  • buffer size in words

Safety

Once this method has been called, it is unsafe to call any &mut self methods, except for write_buffer, on this object as long as the returned value is in use (by DMA).

Loading content...

Implementors

impl<B: WriteBuffer + 'static> StaticWriteBuffer for B[src]

type Word = Self::Word

Loading content...