ISF
2.2 rev 5
Intelligent Sensing Framework for Kinetis with Processor Expert
Main Page
Modules
Data Structures
Files
File List
Globals
crc.h
Go to the documentation of this file.
1
/*
2
*
3
* Copyright (c) 2015, Freescale Semiconductor, Inc.
4
*
5
*/
6
7
/*!
8
* @file crc.h
9
*
10
* @brief CRC header file.
11
*
12
*/
13
14
#ifndef CRC_H_
15
16
17
/*! @brief The standard polynomial value used for CCITT CRC 16-bit calculation.
18
*/
19
#define POLY_CRC16_GENERATOR 0x1021
20
21
22
/*! @brief This crc function contains the standard CCITT CRC 16-bit
23
* implementation.
24
*
25
* @details This function is used to to generate the CCITT CRC 16-bit
26
* value. It uses the standard polynomial value 0x1021.
27
*
28
* @param [in] apBuf Buffer of data to perform CRC calculation on.
29
*
30
* @param [in] anumBytes The number of bytes to perform CRC calculation.
31
* The range is 0 to (2^32 - 1) bytes.
32
*
33
* @return ccitt_crc16_cal() returns a value of type uint16
34
* which is the CRC value.
35
*
36
* @Constraints The following constraints must be observed when using
37
* this function. If these constraints are not met, this
38
* API returns a zero for the number of bytes read from
39
* the mailboxes.
40
* @li anumBytes must be within the valid range of 1 to (2^32-1)
41
*
42
* @Reentrant No
43
*
44
* @Libs isf_ci.lib
45
*
46
*/
47
extern
uint16
ccitt_crc16_cal
(
uint32
anumBytes,
uint8
*apBuf);
48
49
50
#endif // CRC_H_
51
uint8
unsigned char uint8
Definition:
isf_types.h:76
ccitt_crc16_cal
uint16 ccitt_crc16_cal(uint32 anumBytes, uint8 *apBuf)
This crc function contains the standard CCITT CRC 16-bit implementation.
Definition:
crc.c:18
uint16
unsigned short int uint16
Definition:
isf_types.h:77
uint32
unsigned long int uint32
Definition:
isf_types.h:78
© Freescale Semiconductor, Inc. 2016. All Rights Reserved.