Trait stm32f4xx_hal::i2c::dma::I2CMasterWriteDMA
source · pub trait I2CMasterWriteDMA {
// Required method
unsafe fn write_dma(
&mut self,
addr: u8,
bytes: &[u8],
callback: Option<I2cCompleteCallback>
) -> Result<(), Error>;
}
Required Methods§
sourceunsafe fn write_dma(
&mut self,
addr: u8,
bytes: &[u8],
callback: Option<I2cCompleteCallback>
) -> Result<(), Error>
unsafe fn write_dma( &mut self, addr: u8, bytes: &[u8], callback: Option<I2cCompleteCallback> ) -> Result<(), Error>
Writes bytes
to slave with address addr
in non-blocking mode
Arguments
addr
- slave addressbytes
- 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.