[]Trait sodaq_one::prelude::_embedded_hal_blocking_i2c_Read

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

Blocking read

Associated Types

type Error

Error type

Loading content...

Required methods

fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error>

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 followed by bit 1 to indicate reading
  • SAK = slave acknowledge
  • Bi = ith byte of data
  • MAK = master acknowledge
  • NMAK = master no acknowledge
  • SP = stop condition
Loading content...

Implementors

impl Read for I2CMaster0[src]

type Error = I2CError

impl Read for I2CMaster1[src]

type Error = I2CError

impl Read for I2CMaster2[src]

type Error = I2CError

impl Read for I2CMaster3[src]

type Error = I2CError

impl Read for I2CMaster4[src]

type Error = I2CError

impl Read for I2CMaster5[src]

type Error = I2CError

Loading content...