Skip to main content

pamoja_scd4x_crc

Function pamoja_scd4x_crc 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_scd4x_crc( data: *const u8, data_len: usize, ) -> u8
Expand description

Computes the CRC-8 an SCD4x appends to every data word.

§Returns

The checksum over data, or 0 if the pointer is null with a non-zero length.

§Safety

data must point to at least data_len readable bytes, or be null when data_len is 0.