[][src]Struct mynewt::hw::hal::hal_i2c_master_data

#[repr(C)]pub struct hal_i2c_master_data {
    pub address: u8,
    pub len: u16,
    pub buffer: *mut u8,
}

When sending a packet, use this structure to pass the arguments.

Fields

address: u8

Destination address An I2C address has 7 bits. In the protocol these 7 bits are combined with a 1 bit R/W bit to specify read or write operation in an 8-bit address field sent to the remote device. This API accepts the 7-bit address as its argument in the 7 LSBs of the address field above. For example if I2C was writing a 0x81 in its protocol, you would pass only the top 7-bits to this function as 0x40

len: u16

Number of buffer bytes to transmit or receive

buffer: *mut u8

Buffer space to hold the transmit or receive

Trait Implementations

impl Default for hal_i2c_master_data[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.