stm32f30x_crc.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F30x_CRC_H
31 #define __STM32F30x_CRC_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
38 #include "stm32f30x.h"
39 
48 /* Exported types ------------------------------------------------------------*/
49 /* Exported constants --------------------------------------------------------*/
50 
54 #define CRC_ReverseInputData_No ((uint32_t)0x00000000)
55 #define CRC_ReverseInputData_8bits CRC_CR_REV_IN_0
56 #define CRC_ReverseInputData_16bits CRC_CR_REV_IN_1
57 #define CRC_ReverseInputData_32bits CRC_CR_REV_IN
59 #define IS_CRC_REVERSE_INPUT_DATA(DATA) (((DATA) == CRC_ReverseInputData_No) || \
60  ((DATA) == CRC_ReverseInputData_8bits) || \
61  ((DATA) == CRC_ReverseInputData_16bits) || \
62  ((DATA) == CRC_ReverseInputData_32bits))
63 
71 #define CRC_PolSize_7 CRC_CR_POLSIZE
72 #define CRC_PolSize_8 CRC_CR_POLSIZE_1
73 #define CRC_PolSize_16 CRC_CR_POLSIZE_0
74 #define CRC_PolSize_32 ((uint32_t)0x00000000)
76 #define IS_CRC_POL_SIZE(SIZE) (((SIZE) == CRC_PolSize_7) || \
77  ((SIZE) == CRC_PolSize_8) || \
78  ((SIZE) == CRC_PolSize_16) || \
79  ((SIZE) == CRC_PolSize_32))
80 
85 /* Exported macro ------------------------------------------------------------*/
86 /* Exported functions ------------------------------------------------------- */
87 /* Configuration of the CRC computation unit **********************************/
88 void CRC_DeInit(void);
89 void CRC_ResetDR(void);
90 void CRC_PolynomialSizeSelect(uint32_t CRC_PolSize);
91 void CRC_ReverseInputDataSelect(uint32_t CRC_ReverseInputData);
93 void CRC_SetInitRegister(uint32_t CRC_InitValue);
94 void CRC_SetPolynomial(uint32_t CRC_Pol);
95 
96 /* CRC computation ************************************************************/
97 uint32_t CRC_CalcCRC(uint32_t CRC_Data);
98 uint32_t CRC_CalcCRC16bits(uint16_t CRC_Data);
99 uint32_t CRC_CalcCRC8bits(uint8_t CRC_Data);
100 uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
101 uint32_t CRC_GetCRC(void);
102 
103 /* Independent register (IDR) access (write/read) *****************************/
104 void CRC_SetIDRegister(uint8_t CRC_IDValue);
105 uint8_t CRC_GetIDRegister(void);
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* __STM32F30x_CRC_H */
112 
121 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void CRC_SetIDRegister(uint8_t IDValue)
Stores a 8-bit data in the Independent Data(ID) register.
FunctionalState
Definition: stm32f4xx.h:708
void CRC_SetInitRegister(uint32_t CRC_InitValue)
Initializes the INIT register.
uint32_t CRC_CalcCRC(uint32_t Data)
Computes the 32-bit CRC of a given data word(32-bit).
Definition: stm32f10x_crc.c:94
void CRC_DeInit(void)
Deinitializes CRC peripheral registers to their default reset values.
Definition: stm32f30x_crc.c:95
void CRC_ReverseOutputDataCmd(FunctionalState NewState)
Enables or disable the reverse operation on output data. The reverse operation on output data is perf...
uint32_t CRC_CalcCRC8bits(uint8_t CRC_Data)
Computes the 8-bit CRC of a given 8-bit data.
uint32_t CRC_CalcCRC16bits(uint16_t CRC_Data)
Computes the 16-bit CRC of a given 16-bit data.
uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength)
Computes the 32-bit CRC of a given buffer of data word(32-bit).
void CRC_PolynomialSizeSelect(uint32_t CRC_PolSize)
Selects the polynomial size.
uint8_t CRC_GetIDRegister(void)
Returns the 8-bit data stored in the Independent Data(ID) register.
void CRC_ReverseInputDataSelect(uint32_t CRC_ReverseInputData)
Selects the reverse operation to be performed on input data.
void CRC_SetPolynomial(uint32_t CRC_Pol)
Initializes the polynomail coefficients.
uint32_t CRC_GetCRC(void)
Returns the current CRC value.
void CRC_ResetDR(void)
Resets the CRC Data register (DR).
Definition: stm32f10x_crc.c:83


rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:25