| ISF 2.1 Intelligent Sensing Framework for Kinetis with Processor Expert

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
crc.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) 2014, 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
This defines uint8 as unsigned char.
Definition: isf_types.h:18
uint32
unsigned long uint32
This defines uint32 as unsigned long.
Definition: isf_types.h:36
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 uint16
This defines uint16 as unsigned short.
Definition: isf_types.h:27
- © Freescale Semiconductor, Inc. 2015. All Rights Reserved.