Skip to main content

pamoja_i2c_script_write

Function pamoja_i2c_script_write 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_i2c_script_write( script: *mut PamojaI2cScript, address: u8, bytes: *const u8, len: usize, ) -> PamojaStatus
Expand description

Adds a step: the driver writes exactly these bytes to the address.

§Arguments

  • script - the script.
  • address - the 7-bit address the write must go to.
  • bytes - the bytes the driver must send.
  • len - how many.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument for a null argument.

§Safety

script must be a live handle or null, and bytes must point to len readable bytes.