Skip to main content

pamoja_sht3x_init

Function pamoja_sht3x_init 

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

Soft-resets the part and reads its status; a status word whose CRC checks is what confirms an SHT3x answers, as the part has no id register.

§Arguments

  • sensor - the driver.

§Returns

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

§Safety

sensor must be a live handle or null.