Function achks16

Function Documentation

uint16_t achks16(const uint16_t *buf, size_t n_bytes, uint16_t seed)

Compute an 16-bit checksum (add-ignore-carry)

Both buf and n_bytes must be 16-bit aligned, or no action is performed

Parameters:
  • buf – Buffer to compute over

  • n_bytes – # bytes in buffer

  • seed – Starting value for checksum

Returns:

computed 16-bit checksum