pub unsafe trait WriteBuffer {
// Required method
unsafe fn write_buffer(&mut self) -> (*mut u8, usize);
}
Available on crate feature
unstable
only.Expand description
Trait for buffers that can be given to DMA for writing.
§Safety
Once the write_buffer
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).
Required Methods§
Sourceunsafe fn write_buffer(&mut self) -> (*mut u8, usize)
unsafe fn write_buffer(&mut self) -> (*mut u8, usize)
Provide a buffer usable for DMA writes.
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, except for write_buffer
, on this object as long as the
returned value is in use (by DMA).