[][src]Trait avr_hal_generic::prelude::_embedded_hal_blocking_i2c_Read

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

Blocking read

Associated Types

type Error[src]

Error type

Loading content...

Required methods

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

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<H, I2C: I2cOps<H, SDA, SCL>, SDA, SCL, CLOCK> Read<u8> for I2c<H, I2C, SDA, SCL, CLOCK>[src]

type Error = Error

Loading content...