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§
Sourceunsafe fn read_buffer(&self) -> (*const u8, usize)
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).