Morse Micro IoT SDK  2.9.7
Morse Micro Cyclic Redundancy Check (mmcrc) API

Detailed Description

This API provides support for CRC algorithms used by Morse Micro code.

Functions

uint16_t mmcrc_16_xmodem (uint16_t crc, const void *data, size_t data_len)
 Compute the CRC-16 for the data buffer using the XMODEM model. More...
 

Function Documentation

◆ mmcrc_16_xmodem()

uint16_t mmcrc_16_xmodem ( uint16_t  crc,
const void *  data,
size_t  data_len 
)

Compute the CRC-16 for the data buffer using the XMODEM model.

Parameters
crcSeed for CRC calc, zero in most cases this is zero (0). If chaining calls then this is the output from the previous invocation.
dataPointer to the start of the data to calculate the crc over.
data_lenLength of the data array in bytes.
Returns
Returns the CRC value.