Trait embedded_hal::blocking::i2c::Read [] [src]

pub trait Read {
    type Error;
    fn read(
        &mut self,
        address: u8,
        buffer: &mut [u8]
    ) -> Result<(), Self::Error>; }

Blocking read

Associated Types

Error type

Required Methods

Reads enough bytes from slave with address to fill buffer

I2C Events (contract)

Master: ST SAD+R        MAK    MAK ...    NMAK SP
Slave:           SAK B0     B1     ... BN

Where

  • ST = start condition
  • SAD+R = slave address with 8th bit set to 1
  • SAK = slave acknowledge
  • Bi = ith byte of data
  • MAK = master acknowledge
  • NMAK = master no acknowledge
  • SP = stop condition

Implementors