Skip to main content

pamoja_sht3x_parse_measurement

Function pamoja_sht3x_parse_measurement 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_sht3x_parse_measurement( frame: *const u8, frame_len: usize, out_measurement: *mut PamojaSht3xMeasurement, ) -> PamojaStatus
Expand description

Parses and CRC-checks a six-byte SHT3x measurement frame.

§Returns

PamojaStatus::Ok on success, with *out_measurement filled in, or PamojaStatus::Codec if either word fails its checksum, which means the read was corrupted on the bus and should be repeated.

§Safety

frame must point to at least frame_len readable bytes, and out_measurement must point to a writable PamojaSht3xMeasurement.