pub trait SerialWriteDMA {
// Required method
unsafe fn write_dma(
&mut self,
bytes: &[u8],
callback: Option<SerialCompleteCallback>,
) -> Result<(), Error>;
}
Required Methods§
Sourceunsafe fn write_dma(
&mut self,
bytes: &[u8],
callback: Option<SerialCompleteCallback>,
) -> Result<(), Error>
unsafe fn write_dma( &mut self, bytes: &[u8], callback: Option<SerialCompleteCallback>, ) -> Result<(), Error>
Writes bytes
to the serial interface in non-blocking mode
§Arguments
bytes
- byte slice that need to sendcallback
- callback that will be called on completion
§Safety
This function relies on supplied slice bytes
until callback
called. So the slice must live until that moment.
§Warning
callback
may be called before function returns value. It happens on errors in preparation stages.