#[repr(C)]
pub struct i2c_msg_s { pub frequency: u32, pub addr: u16, pub flags: u16, pub buffer: *mut u8, pub length: ssize_t, }
Expand description

I2C Message Struct: I2C transaction segment beginning with a START. A number of these can be transferred together to form an arbitrary sequence of write/read transfer to an I2C device. TODO: Import with bindgen from https://github.com/lupyuen/incubator-nuttx/blob/rusti2c/include/nuttx/i2c/i2c_master.h#L208-L215

Fields

frequency: u32

I2C Frequency

addr: u16

I2C Address

flags: u16

I2C Flags (I2C_M_*)

buffer: *mut u8

Buffer to be transferred

length: ssize_t

Length of the buffer in bytes

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.