Lines Matching refs:seed
9 uint16_t crc16(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len) in crc16() argument
11 uint16_t crc = seed; in crc16()
30 uint16_t crc16_reflect(uint16_t poly, uint16_t seed, const uint8_t *src, size_t len) in crc16_reflect() argument
32 uint16_t crc = seed; in crc16_reflect()
52 uint16_t crc16_ccitt(uint16_t seed, const uint8_t *src, size_t len) in crc16_ccitt() argument
57 e = seed ^ *src; in crc16_ccitt()
60 seed = (seed >> 8) ^ ((uint16_t)f << 8) ^ ((uint16_t)f << 3) ^ ((uint16_t)f >> 4); in crc16_ccitt()
63 return seed; in crc16_ccitt()
66 uint16_t crc16_itu_t(uint16_t seed, const uint8_t *src, size_t len) in crc16_itu_t() argument
69 seed = (seed >> 8U) | (seed << 8U); in crc16_itu_t()
70 seed ^= *src; in crc16_itu_t()
72 seed ^= (seed & 0xffU) >> 4U; in crc16_itu_t()
73 seed ^= seed << 12U; in crc16_itu_t()
74 seed ^= (seed & 0xffU) << 5U; in crc16_itu_t()
77 return seed; in crc16_itu_t()