WB32F10x Standard Peripherals Firmware Library

wb32f10x_crc.h
浏览该文件的文档.
1
10 /* Define to prevent recursive inclusion -------------------------------------*/
11 #ifndef __WB32F10x_CRC_H
12 #define __WB32F10x_CRC_H
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 /* Includes ------------------------------------------------------------------*/
19 #include "wb32f10x.h"
20
29 /* Exported types ------------------------------------------------------------*/
30 /* Exported constants --------------------------------------------------------*/
31 /* Exported macro ------------------------------------------------------------*/
32 /* Exported functions --------------------------------------------------------*/
33
34 uint8_t CRC8_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
35 uint8_t CRC8_ComputeBytes_Update(uint8_t seed, const uint8_t *ptr_data, uint32_t data_len);
36
37 uint16_t CRC16_CCITT_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
38 uint16_t CRC16_CCITT_ComputeBytes_Update(uint16_t seed, const uint8_t *ptr_data, uint32_t data_len);
39
40 uint16_t CRC16_Modbus_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
41 uint16_t CRC16_Modbus_ComputeBytes_Update(uint16_t seed, const uint8_t *ptr_data, uint32_t data_len);
42
43 uint16_t CRC16_IBM_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
44 #define CRC16_IBM_ComputeBytes_Update CRC16_Modbus_ComputeBytes_Update
45
46 uint32_t CRC32_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
47 uint32_t CRC32_ComputeBytes_Update(uint32_t seed, const uint8_t *ptr_data, uint32_t data_len);
48
49 uint32_t CRC32_MPEG2_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len);
50 uint32_t CRC32_MPEG2_ComputeBytes_Update(uint32_t seed, const uint8_t *ptr_data, uint32_t data_len);
51
52 uint16_t CRC16_CCITT_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len);
53 uint16_t CRC16_CCITT_ComputeHalfWords_Update(uint16_t seed, const uint16_t *ptr_data, uint32_t data_len);
54
55 uint16_t CRC16_Modbus_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len);
56 uint16_t CRC16_Modbus_ComputeHalfWords_Update(uint16_t seed, const uint16_t *ptr_data, uint32_t data_len);
57
58 uint16_t CRC16_IBM_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len);
59 #define CRC16_IBM_ComputeHalfWords_Update CRC16_Modbus_ComputeHalfWords_Update
60
61 uint32_t CRC32_ComputeWords(const uint32_t *ptr_data, uint32_t data_len);
62 uint32_t CRC32_ComputeWords_Update(uint32_t seed, const uint32_t *ptr_data, uint32_t data_len);
63
64 uint32_t CRC32_MPEG2_ComputeWords(const uint32_t *ptr_data, uint32_t data_len);
65 uint32_t CRC32_MPEG2_ComputeWords_Update(uint32_t seed, const uint32_t *ptr_data, uint32_t data_len);
66
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif /* __WB32F10x_CRC_H */
80
CRC16_CCITT_ComputeBytes
uint16_t CRC16_CCITT_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC-CCITT of a given buffer of byte(8-bit) with default seed.
Definition: wb32f10x_crc.c:81
CRC32_MPEG2_ComputeWords_Update
uint32_t CRC32_MPEG2_ComputeWords_Update(uint32_t seed, const uint32_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC(MPEG2) of a given buffer of word(32-bit) with user-defined seed.
Definition: wb32f10x_crc.c:470
CRC16_Modbus_ComputeBytes
uint16_t CRC16_Modbus_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC(Modbus) of a given buffer of byte(8-bit) with default seed.
Definition: wb32f10x_crc.c:123
CRC32_ComputeBytes
uint32_t CRC32_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC of a given buffer of byte(8-bit) with default seed.
Definition: wb32f10x_crc.c:186
CRC16_CCITT_ComputeHalfWords
uint16_t CRC16_CCITT_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC-CCITT of a given buffer of halfword(16-bit) with default seed.
Definition: wb32f10x_crc.c:272
CRC16_IBM_ComputeBytes
uint16_t CRC16_IBM_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC(IBM) of a given buffer of byte(8-bit) with default seed.
Definition: wb32f10x_crc.c:166
CRC16_Modbus_ComputeHalfWords_Update
uint16_t CRC16_Modbus_ComputeHalfWords_Update(uint16_t seed, const uint16_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC(Modbus) of a given buffer of halfword(16-bit) with user-defined seed.
Definition: wb32f10x_crc.c:342
CRC32_MPEG2_ComputeWords
uint32_t CRC32_MPEG2_ComputeWords(const uint32_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC(MPEG2) of a given buffer of word(32-bit) with default seed.
Definition: wb32f10x_crc.c:443
CRC16_IBM_ComputeHalfWords
uint16_t CRC16_IBM_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC(IBM) of a given buffer of halfword(16-bit) with default seed.
Definition: wb32f10x_crc.c:365
CRC8_ComputeBytes
uint8_t CRC8_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len)
Computes the 8-bit CRC of a given buffer of byte(8-bit) with default seed.
Definition: wb32f10x_crc.c:39
CRC32_MPEG2_ComputeBytes
uint32_t CRC32_MPEG2_ComputeBytes(const uint8_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC(MPEG2) of a given buffer of byte(8-bit) with default seed.
Definition: wb32f10x_crc.c:230
CRC16_Modbus_ComputeBytes_Update
uint16_t CRC16_Modbus_ComputeBytes_Update(uint16_t seed, const uint8_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC(Modbus) of a given buffer of byte(8-bit) with user-defined seed.
Definition: wb32f10x_crc.c:145
CRC32_ComputeBytes_Update
uint32_t CRC32_ComputeBytes_Update(uint32_t seed, const uint8_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC of a given buffer of byte(8-bit) with user-defined seed.
Definition: wb32f10x_crc.c:208
CRC8_ComputeBytes_Update
uint8_t CRC8_ComputeBytes_Update(uint8_t seed, const uint8_t *ptr_data, uint32_t data_len)
Computes the 8-bit CRC of a given buffer of byte(8-bit) with user-defined seed.
Definition: wb32f10x_crc.c:60
CRC32_ComputeWords
uint32_t CRC32_ComputeWords(const uint32_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC of a given buffer of word(32-bit) with default seed.
Definition: wb32f10x_crc.c:387
CRC16_CCITT_ComputeBytes_Update
uint16_t CRC16_CCITT_ComputeBytes_Update(uint16_t seed, const uint8_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC-CCITT of a given buffer of byte(8-bit) with user-defined seed.
Definition: wb32f10x_crc.c:102
CRC16_Modbus_ComputeHalfWords
uint16_t CRC16_Modbus_ComputeHalfWords(const uint16_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC(Modbus) of a given buffer of halfword(16-bit) with default seed.
Definition: wb32f10x_crc.c:318
CRC32_MPEG2_ComputeBytes_Update
uint32_t CRC32_MPEG2_ComputeBytes_Update(uint32_t seed, const uint8_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC(MPEG2) of a given buffer of byte(8-bit) with user-defined seed.
Definition: wb32f10x_crc.c:251
CRC32_ComputeWords_Update
uint32_t CRC32_ComputeWords_Update(uint32_t seed, const uint32_t *ptr_data, uint32_t data_len)
Computes the 32-bit CRC of a given buffer of word(32-bit) with user-defined seed.
Definition: wb32f10x_crc.c:415
CRC16_CCITT_ComputeHalfWords_Update
uint16_t CRC16_CCITT_ComputeHalfWords_Update(uint16_t seed, const uint16_t *ptr_data, uint32_t data_len)
Computes the 16-bit CRC-CCITT of a given buffer of halfword(16-bit) with user-defined seed.
Definition: wb32f10x_crc.c:295