crc_sync_crc16

Calculate the CRC16 value of the buffer.

int32_t crc_sync_crc16(
    struct crc_sync_descriptor *const descr,
    uint16_t *const data,
    const uint32_t len,
    uint16_t * pcrc
)

This function calculates CRC-16 (CCITT).

Parameters

data

Type: uint16_t *const

Pointer to the input data buffer

len

Type: const uint32_t

Length of the input data buffer

pcrc

Type: uint16_t *

Pointer to the CRC value

Returns

Type: int32_t

Calculated result.