ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
crc.c File Reference
#include "isf.h"
#include "crc.h"
Include dependency graph for crc.c:

Go to the source code of this file.

Functions

uint16 ccitt_crc16_cal (uint32 anumBytes, uint8 *apBuf)
 This crc function contains the standard CCITT CRC 16-bit implementation. More...
 

Function Documentation

uint16 ccitt_crc16_cal ( uint32  anumBytes,
uint8 apBuf 
)

This crc function contains the standard CCITT CRC 16-bit implementation.

This function is used to to generate the CCITT CRC 16-bit value. It uses the standard polynomial value 0x1021.

Parameters
[in]apBufBuffer of data to perform CRC calculation on.
[in]anumBytesThe number of bytes to perform CRC calculation. The range is 0 to (2^32 - 1) bytes.
Returns
ccitt_crc16_cal() returns a value of type uint16 which is the CRC value.
Constraints:
The following constraints must be observed when using this function. If these constraints are not met, this API returns a zero for the number of bytes read from the mailboxes.
  • anumBytes must be within the valid range of 1 to (2^32-1)
Reentrant: No
Link Libraries:
isf_ci.lib

Definition at line 18 of file crc.c.

References POLY_CRC16_GENERATOR.

Referenced by ci_protocol_CB_mbox(), ci_protocol_CB_stream(), isf_ci_qr_update(), and isf_ci_stream_update_data().

Here is the caller graph for this function: