Skip to main content

pamoja_ina226_measure

Function pamoja_ina226_measure 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_ina226_measure( sensor: *mut PamojaIna226, out_reading: *mut PamojaIna226Reading, ) -> PamojaStatus
Expand description

Triggers one shunt and bus conversion and reads every result, initializing the part first if pamoja_ina226_init has not run.

§Arguments

  • sensor - the driver.
  • out_reading - receives the results.

§Returns

As pamoja_ina226_init, with PamojaStatus::Io also when the conversion-ready flag never sets.

§Safety

sensor must be a live handle or null, and out_reading a writable pointer or null.