[][src]Trait atsame54_xpro::prelude::_embedded_hal_blocking_i2c_Read

pub trait _embedded_hal_blocking_i2c_Read {
    type Error;
    pub fn read(
        &mut self,
        address: u8,
        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: u8,
    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<Sercom0Pad0, Sercom0Pad1> Read for I2CMaster0<Sercom0Pad0, Sercom0Pad1>[src]

type Error = I2CError

impl<Sercom1Pad0, Sercom1Pad1> Read for I2CMaster1<Sercom1Pad0, Sercom1Pad1>[src]

type Error = I2CError

impl<Sercom2Pad0, Sercom2Pad1> Read for I2CMaster2<Sercom2Pad0, Sercom2Pad1>[src]

type Error = I2CError

impl<Sercom3Pad0, Sercom3Pad1> Read for I2CMaster3<Sercom3Pad0, Sercom3Pad1>[src]

type Error = I2CError

impl<Sercom4Pad0, Sercom4Pad1> Read for I2CMaster4<Sercom4Pad0, Sercom4Pad1>[src]

type Error = I2CError

impl<Sercom5Pad0, Sercom5Pad1> Read for I2CMaster5<Sercom5Pad0, Sercom5Pad1>[src]

type Error = I2CError

impl<Sercom6Pad0, Sercom6Pad1> Read for I2CMaster6<Sercom6Pad0, Sercom6Pad1>[src]

type Error = I2CError

impl<Sercom7Pad0, Sercom7Pad1> Read for I2CMaster7<Sercom7Pad0, Sercom7Pad1>[src]

type Error = I2CError

Loading content...