[][src]Trait rust_i2c::Stream

pub trait Stream {
    fn write(&self, command: Command) -> Result<()>;
fn read(&self, command: Command) -> Result<Vec<u8>>;
fn transfer(&self, command: Command, delay: Duration) -> Result<Vec<u8>>; }

High level read/write trait for I2C connections to implement

Required Methods

Writes an I2C command

Arguments

command - Command to write

Reads command result

Arguments

command - Command to read result from

Writes I2C command and reads result

Arguments

command - Command to write and read from delay - Delay between writing and reading

Implementors

impl Stream for I2CStream
[src]

Writing

Reading

Read/Write transaction