Struct nuttx_embedded_hal::i2c_msg_s
source · [−]#[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
impl RefUnwindSafe for i2c_msg_s
impl !Send for i2c_msg_s
impl !Sync for i2c_msg_s
impl Unpin for i2c_msg_s
impl UnwindSafe for i2c_msg_s
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more