[][src]Struct i2cdev::mock::MockI2CDevice

pub struct MockI2CDevice {
    pub regmap: I2CRegisterMap,
}

Fields

regmap: I2CRegisterMap

Methods

impl MockI2CDevice[src]

Trait Implementations

impl I2CDevice for MockI2CDevice[src]

type Error = Error

fn smbus_read_byte(&mut self) -> Result<u8, Self::Error>[src]

Read a single byte from a device, without specifying a device register Read more

fn smbus_write_byte(&mut self, value: u8) -> Result<(), Self::Error>[src]

Write a single byte to a device, without specifying a device register Read more

fn smbus_read_byte_data(&mut self, register: u8) -> Result<u8, Self::Error>[src]

Read a single byte from a device, from a designated register Read more

fn smbus_write_byte_data(
    &mut self,
    register: u8,
    value: u8
) -> Result<(), Self::Error>
[src]

Write a single byte to a specific register on a device Read more

fn smbus_read_word_data(&mut self, register: u8) -> Result<u16, Self::Error>[src]

Read 2 bytes from a given register on a device (lsb first)

fn smbus_write_word_data(
    &mut self,
    register: u8,
    value: u16
) -> Result<(), Self::Error>
[src]

Write 2 bytes to a given register on a device (lsb first)

fn smbus_process_word(
    &mut self,
    register: u8,
    value: u16
) -> Result<u16, Self::Error>
[src]

Select a register, send 16 bits of data to it, and read 16 bits of data

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]