STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_ll_crc.h
Go to the documentation of this file.
1 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32F4xx_LL_CRC_H
21 #define STM32F4xx_LL_CRC_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32f4xx.h"
29 
34 #if defined(CRC)
35 
40 /* Private types -------------------------------------------------------------*/
41 /* Private variables ---------------------------------------------------------*/
42 /* Private constants ---------------------------------------------------------*/
43 /* Private macros ------------------------------------------------------------*/
44 
45 /* Exported types ------------------------------------------------------------*/
46 /* Exported constants --------------------------------------------------------*/
55 /* Exported macro ------------------------------------------------------------*/
71 #define LL_CRC_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, __VALUE__)
72 
79 #define LL_CRC_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
89 /* Exported functions --------------------------------------------------------*/
107 __STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit(CRC_TypeDef *CRCx)
108 {
109  SET_BIT(CRCx->CR, CRC_CR_RESET);
110 }
111 
127 __STATIC_INLINE void LL_CRC_FeedData32(CRC_TypeDef *CRCx, uint32_t InData)
128 {
129  WRITE_REG(CRCx->DR, InData);
130 }
131 
138 __STATIC_INLINE uint32_t LL_CRC_ReadData32(const CRC_TypeDef *CRCx)
139 {
140  return (uint32_t)(READ_REG(CRCx->DR));
141 }
142 
150 __STATIC_INLINE uint32_t LL_CRC_Read_IDR(CRC_TypeDef *CRCx)
151 {
152  return (uint32_t)(READ_REG(CRCx->IDR));
153 }
154 
163 __STATIC_INLINE void LL_CRC_Write_IDR(CRC_TypeDef *CRCx, uint32_t InData)
164 {
165  *((uint8_t __IO *)(&CRCx->IDR)) = (uint8_t) InData;
166 }
171 #if defined(USE_FULL_LL_DRIVER)
176 ErrorStatus LL_CRC_DeInit(const CRC_TypeDef *CRCx);
177 
181 #endif /* USE_FULL_LL_DRIVER */
182 
191 #endif /* defined(CRC) */
192 
197 #ifdef __cplusplus
198 }
199 #endif
200 
201 #endif /* STM32F4xx_LL_CRC_H */
__STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit(CRC_TypeDef *CRCx)
Reset the CRC calculation unit.
__STATIC_INLINE uint32_t LL_CRC_ReadData32(const CRC_TypeDef *CRCx)
Return current CRC calculation result. 32 bits value is returned. @rmtoll DR DR LL_CRC_ReadData32.
__STATIC_INLINE void LL_CRC_FeedData32(CRC_TypeDef *CRCx, uint32_t InData)
Write given 32-bit data to the CRC calculator @rmtoll DR DR LL_CRC_FeedData32.
__STATIC_INLINE uint32_t LL_CRC_Read_IDR(CRC_TypeDef *CRCx)
Return data stored in the Independent Data(IDR) register.
__STATIC_INLINE void LL_CRC_Write_IDR(CRC_TypeDef *CRCx, uint32_t InData)
Store data in the Independent Data(IDR) register.
ErrorStatus LL_CRC_DeInit(const CRC_TypeDef *CRCx)
De-initialize CRC registers (Registers restored to their default values).