2020-2021 Sunseeker Telemetry and Lighting System
crc.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // crc.h - Driver for the CRC Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_CRC_H__
8 #define __MSP430WARE_CRC_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_CRC__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // Prototypes for the APIs.
28 //
29 //*****************************************************************************
30 
31 //*****************************************************************************
32 //
44 //
45 //*****************************************************************************
46 extern void CRC_setSeed(uint16_t baseAddress,
47  uint16_t seed);
48 
49 //*****************************************************************************
50 //
63 //
64 //*****************************************************************************
65 extern void CRC_set16BitData(uint16_t baseAddress,
66  uint16_t dataIn);
67 
68 //*****************************************************************************
69 //
82 //
83 //*****************************************************************************
84 extern void CRC_set8BitData(uint16_t baseAddress,
85  uint8_t dataIn);
86 
87 //*****************************************************************************
88 //
102 //
103 //*****************************************************************************
104 extern void CRC_set16BitDataReversed(uint16_t baseAddress,
105  uint16_t dataIn);
106 
107 //*****************************************************************************
108 //
122 //
123 //*****************************************************************************
124 extern void CRC_set8BitDataReversed(uint16_t baseAddress,
125  uint8_t dataIn);
126 
127 //*****************************************************************************
128 //
137 //
138 //*****************************************************************************
139 extern uint16_t CRC_getData(uint16_t baseAddress);
140 
141 //*****************************************************************************
142 //
151 //
152 //*****************************************************************************
153 extern uint16_t CRC_getResult(uint16_t baseAddress);
154 
155 //*****************************************************************************
156 //
164 //
165 //*****************************************************************************
166 extern uint16_t CRC_getResultBitsReversed(uint16_t baseAddress);
167 
168 //*****************************************************************************
169 //
170 // Mark the end of the C bindings section for C++ compilers.
171 //
172 //*****************************************************************************
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif
178 #endif // __MSP430WARE_CRC_H__