Skip to main content

pamoja_scd4x_parse_measurement

Function pamoja_scd4x_parse_measurement 

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

Parses and CRC-checks a nine-byte SCD4x measurement frame.

§Returns

PamojaStatus::Ok on success, with *out_measurement filled in, or PamojaStatus::Codec if any 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 PamojaScd4xMeasurement.