Skip to main content

pamoja_i2c_script_fault

Function pamoja_i2c_script_fault 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_i2c_script_fault( script: *mut PamojaI2cScript, address: u8, fault: u8, ) -> PamojaStatus
Expand description

Adds a step: the next transfer to the address fails, the way a missing or busy part does.

§Arguments

  • script - the script.
  • address - the 7-bit address the failing transfer must go to.
  • fault - one of the PAMOJA_I2C_FAULT_ codes.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument for a null script or a code that names no fault.

§Safety

script must be a live handle or null.