Trait ReadBuffer

Source
pub unsafe trait ReadBuffer {
    // Required method
    unsafe fn read_buffer(&self) -> (*const u8, usize);
}
Available on crate feature unstable only.
Expand description

Trait for buffers that can be given to DMA for reading.

§Safety

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

Required Methods§

Source

unsafe fn read_buffer(&self) -> (*const u8, usize)

Provide a buffer usable for DMA reads.

The return value is:

  • pointer to the start of the buffer
  • buffer size in bytes
§Safety

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

Implementations on Foreign Types§

Source§

impl<W> ReadBuffer for &[W]
where W: Word,

Source§

unsafe fn read_buffer(&self) -> (*const u8, usize)

Source§

impl<W> ReadBuffer for &mut [W]
where W: Word,

Source§

unsafe fn read_buffer(&self) -> (*const u8, usize)

Source§

impl<W, const S: usize> ReadBuffer for &[W; S]
where W: Word,

Source§

unsafe fn read_buffer(&self) -> (*const u8, usize)

Source§

impl<W, const S: usize> ReadBuffer for &mut [W; S]
where W: Word,

Source§

unsafe fn read_buffer(&self) -> (*const u8, usize)

Source§

impl<W, const S: usize> ReadBuffer for [W; S]
where W: Word,

Source§

unsafe fn read_buffer(&self) -> (*const u8, usize)

Implementors§