Skip to main content

pamoja_i2c_bus_read

Function pamoja_i2c_bus_read 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_i2c_bus_read( bus: *const PamojaI2cBus, address: u8, out: *mut u8, len: usize, ) -> PamojaStatus
Expand description

Reads bytes from a part, in one transaction.

§Arguments

  • bus - the bus.
  • address - the part’s 7-bit address.
  • out - receives the bytes.
  • len - how many bytes to read.

§Returns

As pamoja_i2c_bus_write.

§Safety

bus must be a live handle or null, and out must point to len writable bytes.