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

pub struct MockI2CDevice {
    pub regmap: I2CRegisterMap,
}
Expand description

Mock I2C device exposing a register map

Fields

regmap: I2CRegisterMap

I2C register map

Implementations

Create a new mock I2C device

Trait Implementations

Returns the “default value” for a type. Read more

Error type

Read data from the device to fill the provided slice

Write the provided buffer to the device

This sends a single bit to the device, at the place of the Rd/Wr bit

Read a block of up to 32 bytes from a device Read more

Write a block of up to 32 bytes to a device Read more

Select a register, send 1 to 31 bytes of data to it, and reads 1 to 31 bytes of data from it. Read more

Read a block of up to 32 bytes from a device Read more

Write a block of up to 32 bytes from a device Read more

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

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

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

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

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

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

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

Issue the provided sequence of I2C transactions

I2C transfer error type

I2C transfer message type

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.