[−][src]Trait rust_i2c::Stream
High level read/write trait for I2C connections to implement
Required methods
fn write(&self, command: Command) -> Result<()>
fn read(&self, command: Command, rx_len: usize) -> Result<Vec<u8>>
Reads command result
Arguments
command
- Command to read result from
rx_len
- Amount of data to read
fn transfer(
&self,
command: Command,
rx_len: usize,
delay: Duration
) -> Result<Vec<u8>>
&self,
command: Command,
rx_len: usize,
delay: Duration
) -> Result<Vec<u8>>
Writes I2C command and reads result
Arguments
command
- Command to write and read from
rx_len
- Amount of data to read
delay
- Delay between writing and reading