Skip to main content

pamoja_mesh_crc16

Function pamoja_mesh_crc16 

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

Computes the CRC-16 a mesh frame carries.

§Arguments

  • data - the bytes the checksum covers.
  • data_len - their length.

§Returns

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

§Safety

data must point to at least data_len readable bytes when that length is non-zero.