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 #include "register_remap.h"
12 
13 #define CRC16_MODE 0x00
14 #define CRC32_MODE 0x01
15 
16 //*****************************************************************************
17 //
31 //
32 //*****************************************************************************
33 extern void CRC32_setSeed(uint32_t seed, uint_fast8_t crcType);
34 
35 //*****************************************************************************
36 //
51 //
52 //*****************************************************************************
53 extern void CRC32_set8BitData(uint8_t dataIn, uint_fast8_t crcType);
54 
55 //*****************************************************************************
56 //
71 //
72 //*****************************************************************************
73 extern void CRC32_set16BitData(uint16_t dataIn, uint_fast8_t crcType);
74 
75 //*****************************************************************************
76 //
88 //
89 //*****************************************************************************
90 extern void CRC32_set32BitData(uint32_t dataIn);
91 
92 //*****************************************************************************
93 //
109 //
110 //*****************************************************************************
111 extern void CRC32_set8BitDataReversed(uint8_t dataIn, uint_fast8_t crcType);
112 
113 //*****************************************************************************
114 //
130 //
131 //*****************************************************************************
132 extern void CRC32_set16BitDataReversed(uint16_t dataIn, uint_fast8_t crcType);
133 
134 //*****************************************************************************
135 //
148 //
149 //*****************************************************************************
150 extern void CRC32_set32BitDataReversed(uint32_t dataIn);
151 
152 //*****************************************************************************
153 //
162 //
163 //*****************************************************************************
164 extern uint32_t CRC32_getResult(uint_fast8_t crcType);
165 
166 //*****************************************************************************
167 //
177 //
178 //*****************************************************************************
179 extern uint32_t CRC32_getResultReversed(uint_fast8_t crcType);
180 
181 /* Defines for future devices that might have multiple instances */
182 #define CRC32_setSeedMultipleInstance(a,b,c) CRC32_setSeed(b,c)
183 #define CRC32_set8BitDataMultipleInstance(a,b,c) CRC32_set8BitData(b,c)
184 #define CRC32_set16BitDataMultipleInstance(a,b,c) CRC32_set16BitData(b,c)
185 #define CRC32_set32BitDataMultipleInstance(a,b) CRC32_set32BitData(b)
186 #define CRC32_set8BitDataReversedMultipleInstance(a,b,c) CRC32_set8BitDataReversed(b,c)
187 #define CRC32_set16BitDataReversedMultipleInstance(a,b,c) CRC32_set16BitDataReversed(b,c)
188 #define CRC32_set32BitDataReversedMultipleInstance(a,b) CRC32_set32BitDataReversed(b)
189 #define CRC32_getResultMultipleInstance(a,b) CRC32_getResult()
190 #define CRC32_getResultReversedMultipleInstance(a,b) CRC32_getResultReversed(b)
191 
192 //*****************************************************************************
193 //
194 // Close the Doxygen group.
196 //
197 //*****************************************************************************
198 
199 
200 #endif
void CRC32_set8BitDataReversed(uint8_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:48
void CRC32_set16BitDataReversed(uint16_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:58
void CRC32_set32BitDataReversed(uint32_t dataIn)
Definition: crc32.c:68
void CRC32_set32BitData(uint32_t dataIn)
Definition: crc32.c:38
void CRC32_setSeed(uint32_t seed, uint_fast8_t crcType)
Definition: crc32.c:5
void CRC32_set16BitData(uint16_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:28
void CRC32_set8BitData(uint8_t dataIn, uint_fast8_t crcType)
Definition: crc32.c:18
uint32_t CRC32_getResultReversed(uint_fast8_t crcType)
Definition: crc32.c:93
uint32_t CRC32_getResult(uint_fast8_t crcType)
Definition: crc32.c:77

Copyright 2014, Texas Instruments Incorporated