#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_sht3x_new(
bus: *const PamojaI2cBus,
address: u8,
repeatability: u8,
out_sensor: *mut *mut PamojaSht3x,
) -> PamojaStatusExpand description
Creates an SHT3x driver on a bus. Nothing is sent until pamoja_sht3x_init or the first
pamoja_sht3x_measure.
§Arguments
bus- the bus the part is on; the driver holds its own share.address-PAMOJA_SHT3X_I2C_ADDRESS_Awith ADDR low,PAMOJA_SHT3X_I2C_ADDRESS_Bwith ADDR high.repeatability-0low,1medium, or2high, which trades noise against measurement time.out_sensor- receives the driver.
§Returns
PamojaStatus::Ok with the driver in out_sensor, or PamojaStatus::InvalidArgument
for a null argument or a repeatability code the part does not have.
§Safety
bus must be a live handle or null, and out_sensor a writable pointer or null.