[−]Trait samd21_mini::prelude::_embedded_hal_blocking_i2c_Read
Blocking read
Associated Types
type Error
Error type
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 conditionSAD+R
= slave address followed by bit 1 to indicate readingSAK
= slave acknowledgeBi
= ith byte of dataMAK
= master acknowledgeNMAK
= master no acknowledgeSP
= stop condition
Implementors
impl Read for I2CMaster0
[src]
type Error = I2CError
fn read(
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster0 as Read>::Error>
[src]
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster0 as Read>::Error>
impl Read for I2CMaster1
[src]
type Error = I2CError
fn read(
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster1 as Read>::Error>
[src]
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster1 as Read>::Error>
impl Read for I2CMaster2
[src]
type Error = I2CError
fn read(
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster2 as Read>::Error>
[src]
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster2 as Read>::Error>
impl Read for I2CMaster3
[src]
type Error = I2CError
fn read(
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster3 as Read>::Error>
[src]
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster3 as Read>::Error>
impl Read for I2CMaster4
[src]
type Error = I2CError
fn read(
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster4 as Read>::Error>
[src]
&mut self,
addr: u8,
buffer: &mut [u8]
) -> Result<(), <I2CMaster4 as Read>::Error>