SDK API > BS2_ComputeCRC16CCITT


Calculates the CRC-16 CCITT checksum.

Declaration

#include "BS_API.h"
 
int BS2_ComputeCRC16CCITT(uint8_t* data, uint32_t dataLen, uint16_t* crc);

Parameter

  • [In] data : Plain data
  • [In] dataLen : Length of the plain data
  • [Out] crc : Pointer to store the CRC-16 CCITT checksum

Return Value

If successfully done, BS_SDK_SUCCESS will be returned.
If there is an error, the corresponding error code will be returned.