embedded_hal::blocking::i2c

Trait WriteIterRead

Source
pub trait WriteIterRead<A: AddressMode = SevenBitAddress> {
    type Error;

    // Required method
    fn write_iter_read<B>(
        &mut self,
        address: A,
        bytes: B,
        buffer: &mut [u8],
    ) -> Result<(), Self::Error>
       where B: IntoIterator<Item = u8>;
}
Expand description

Blocking write (iterator version) + read

Required Associated Types§

Source

type Error

Error type

Required Methods§

Source

fn write_iter_read<B>( &mut self, address: A, bytes: B, buffer: &mut [u8], ) -> Result<(), Self::Error>
where B: IntoIterator<Item = u8>,

Writes bytes to slave with address address and then reads enough bytes to fill buffer in a single transaction

§I2C Events (contract)

Same as the WriteRead trait

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§