Skip to main content

pamoja_scd4x_init

Function pamoja_scd4x_init 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_scd4x_init( sensor: *mut PamojaScd4x, ) -> PamojaStatus
Expand description

Stops any running measurement, reads the serial number, and starts periodic measurement, after which the part has a new result every five seconds.

§Arguments

  • sensor - the driver.

§Returns

PamojaStatus::Ok; PamojaStatus::InvalidArgument for a null driver; PamojaStatus::Io when the bus fails; or PamojaStatus::Codec when the serial number fails its CRC.

§Safety

sensor must be a live handle or null.