Enum i2c_linux::Message

source ·
pub enum Message<'a> {
    Read {
        address: u16,
        data: &'a mut [u8],
        flags: ReadFlags,
    },
    Write {
        address: u16,
        data: &'a [u8],
        flags: WriteFlags,
    },
}
Expand description

Part of a combined I2C transaction.

Variants

Read

Fields

address: u16

The slave address of the device to read from.

data: &'a mut [u8]

A data buffer to read into.

flags: ReadFlags

Additional flags can modify the operation to work around device quirks.

I2C read command

Write

Fields

address: u16

The slave address of the device to write to.

data: &'a [u8]

The data to write.

flags: WriteFlags

Additional flags can modify the operation to work around device quirks.

I2C write command

Implementations

Byte length of the message data buffer.

Address of the message’s slave.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.