pylab_ml.common.data.crc16
- crc16(word_array)[source]
Calculate CRC-16 on array.
- eg. crc16([0x0201, 0x0403]) -> 0x29B1
crc16([0x1234, 0x5678]) -> 0xE5CC crc16([0xABCD, 0xEF01]) -> 0xD64E
- Parameters:
word_array (list of int) – Array of 16-bit words for which the CRC is to be calculated.
- Returns:
crc – 16-bit CRC value.
- Return type:
int