Trait i2c::Smbus [] [src]

pub trait Smbus: Master {
    fn smbus_write_quick(&mut self, value: bool) -> Result<(), Self::Error>;
fn smbus_read_byte(&mut self) -> Result<u8, Self::Error>;
fn smbus_write_byte(&mut self, value: u8) -> Result<(), Self::Error>;
fn smbus_read_byte_data(&mut self, command: u8) -> Result<u8, Self::Error>;
fn smbus_write_byte_data(
        &mut self,
        command: u8,
        value: u8
    ) -> Result<(), Self::Error>;
fn smbus_read_word_data(&mut self, command: u8) -> Result<u16, Self::Error>;
fn smbus_write_word_data(
        &mut self,
        command: u8,
        value: u16
    ) -> Result<(), Self::Error>;
fn smbus_process_call(
        &mut self,
        command: u8,
        value: u16
    ) -> Result<u16, Self::Error>;
fn smbus_read_block_data(
        &mut self,
        command: u8,
        value: &mut [u8]
    ) -> Result<usize, Self::Error>;
fn smbus_write_block_data(
        &mut self,
        command: u8,
        value: &[u8]
    ) -> Result<(), Self::Error>; }

SMBus operations

Required Methods

Sends a single bit to the device, in the place of the rd/wr address bit.

Reads a single byte from a device without specifying a register.

Sends a single byte to the device

Reads a byte from the designated register.

Writes a byte to the designated register.

Reads a 16-bit word from the designated register.

Writes a 16-bit word to the designated register.

Writes a 16-bit word to the specified register, then reads a 16-bit word in response.

Reads up to 32 bytes from the designated device register.

Returns the number of bytes read, which may be larger than value.len() if the read was truncated.

Writes up to 32 bytes to the designated device register.

Implementors