#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_i2c_bus_write_read(
bus: *const PamojaI2cBus,
address: u8,
bytes: *const u8,
len: usize,
out: *mut u8,
out_len: usize,
) -> PamojaStatusExpand description
Writes bytes to a part and reads its reply in one transaction, with a repeated start between them, which is how a register is read.
§Arguments
bus- the bus.address- the part’s 7-bit address.bytes- what to write first, usually the register address.len- how many bytes to write.out- receives the reply.out_len- how many bytes to read.
§Returns
§Safety
bus must be a live handle or null, bytes must point to len readable bytes, and out
to out_len writable bytes.