crc32.h
Go to the documentation of this file.
1 #ifndef _CRC_32_H
2 
3 //*****************************************************************************
4 //
7 //
8 //*****************************************************************************
9 
10 #include <stdint.h>
11 
12 #define CRC16_MODE 0x00
13 #define CRC32_MODE 0x01
14 
15 //*****************************************************************************
16 //
30 //
31 //*****************************************************************************
32 extern void CRC32_setSeed(uint32_t seed, uint_fast8_t crcType);
33 
34 //*****************************************************************************
35 //
50 //
51 //*****************************************************************************
52 extern void CRC32_set8BitData(uint8_t dataIn, uint_fast8_t crcType);
53 
54 //*****************************************************************************
55 //
70 //
71 //*****************************************************************************
72 extern void CRC32_set16BitData(uint16_t dataIn, uint_fast8_t crcType);
73 
74 //*****************************************************************************
75 //
87 //
88 //*****************************************************************************
89 extern void CRC32_set32BitData(uint32_t dataIn);
90 
91 //*****************************************************************************
92 //
108 //
109 //*****************************************************************************
110 extern void CRC32_set8BitDataReversed(uint8_t dataIn, uint_fast8_t crcType);
111 
112 //*****************************************************************************
113 //
129 //
130 //*****************************************************************************
131 extern void CRC32_set16BitDataReversed(uint16_t dataIn, uint_fast8_t crcType);
132 
133 //*****************************************************************************
134 //
147 //
148 //*****************************************************************************
149 extern void CRC32_set32BitDataReversed(uint32_t dataIn);
150 
151 //*****************************************************************************
152 //
161 //
162 //*****************************************************************************
163 extern uint32_t CRC32_getResult(uint_fast8_t crcType);
164 
165 //*****************************************************************************
166 //
176 //
177 //*****************************************************************************
178 extern uint32_t CRC32_getResultReversed(uint_fast8_t crcType);
179 
180 /* Defines for future devices that might have multiple instances */
181 #define CRC32_setSeedMultipleInstance(a,b,c) CRC32_setSeed(b,c)
182 #define CRC32_set8BitDataMultipleInstance(a,b,c) CRC32_set8BitData(b,c)
183 #define CRC32_set16BitDataMultipleInstance(a,b,c) CRC32_set16BitData(b,c)
184 #define CRC32_set32BitDataMultipleInstance(a,b) CRC32_set32BitData(b)
185 #define CRC32_set8BitDataReversedMultipleInstance(a,b,c) CRC32_set8BitDataReversed(b,c)
186 #define CRC32_set16BitDataReversedMultipleInstance(a,b,c) CRC32_set16BitDataReversed(b,c)
187 #define CRC32_set32BitDataReversedMultipleInstance(a,b) CRC32_set32BitDataReversed(b)
188 #define CRC32_getResultMultipleInstance(a,b) CRC32_getResult()
189 #define CRC32_getResultReversedMultipleInstance(a,b) CRC32_getResultReversed(b)
190 
191 //*****************************************************************************
192 //
193 // Close the Doxygen group.
195 //
196 //*****************************************************************************
197 
198 
199 #endif
void CRC32_set8BitDataReversed(uint8_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:49
void CRC32_set16BitDataReversed(uint16_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:59
void CRC32_set32BitDataReversed(uint32_t dataIn)
Definition: crc32.c:69
void CRC32_set32BitData(uint32_t dataIn)
Definition: crc32.c:39
void CRC32_setSeed(uint32_t seed, uint_fast8_t crcType)
Definition: crc32.c:6
void CRC32_set16BitData(uint16_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:29
void CRC32_set8BitData(uint8_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:19
uint32_t CRC32_getResultReversed(uint_fast8_t crcType)
Definition: crc32.c:96
uint32_t CRC32_getResult(uint_fast8_t crcType)
Definition: crc32.c:80

Copyright 2016, Texas Instruments Incorporated