STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
stm32f0xx_crc.h
Go to the documentation of this file.
1 
29 /* Define to prevent recursive inclusion -------------------------------------*/
30 #ifndef __STM32F0XX_CRC_H
31 #define __STM32F0XX_CRC_H
32 
33 #ifdef __cplusplus
34  extern "C" {
35 #endif
36 
38 #include "stm32f0xx.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 
68 /* Exported macro ------------------------------------------------------------*/
69 /* Exported functions ------------------------------------------------------- */
70 /* Configuration of the CRC computation unit **********************************/
71 void CRC_DeInit(void);
72 void CRC_ResetDR(void);
73 void CRC_ReverseInputDataSelect(uint32_t CRC_ReverseInputData);
74 void CRC_ReverseOutputDataCmd(FunctionalState NewState);
75 void CRC_SetInitRegister(uint32_t CRC_InitValue);
76 
77 /* CRC computation ************************************************************/
78 uint32_t CRC_CalcCRC(uint32_t CRC_Data);
79 uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength);
80 uint32_t CRC_GetCRC(void);
81 
82 /* Independent register (IDR) access (write/read) *****************************/
83 void CRC_SetIDRegister(uint8_t CRC_IDValue);
84 uint8_t CRC_GetIDRegister(void);
85 
86 #ifdef __cplusplus
87 }
88 #endif
89 
90 #endif /* __STM32F0XX_CRC_H */
91 
100 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/