ISF  2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
crc.h File Reference

CRC header file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define POLY_CRC16_GENERATOR   0x1021
 The standard polynomial value used for CCITT CRC 16-bit calculation. More...
 

Functions

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

Detailed Description

CRC header file.

CRC source file that implements the CCITT CRC16 standard.

Definition in file crc.h.

Macro Definition Documentation

#define POLY_CRC16_GENERATOR   0x1021

The standard polynomial value used for CCITT CRC 16-bit calculation.

Definition at line 19 of file crc.h.

Referenced by ccitt_crc16_cal().

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: