comparison Common/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_crc.h @ 128:c78bcbd5deda FlipDisplay

Added current STM32 standandard libraries in version independend folder structure
author Ideenmodellierer
date Sun, 17 Feb 2019 21:12:22 +0100
parents
children
comparison
equal deleted inserted replaced
127:1369f8660eaa 128:c78bcbd5deda
1 /**
2 ******************************************************************************
3 * @file stm32f4xx_hal_crc.h
4 * @author MCD Application Team
5 * @brief Header file of CRC HAL module.
6 ******************************************************************************
7 * @attention
8 *
9 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10 *
11 * Redistribution and use in source and binary forms, with or without modification,
12 * are permitted provided that the following conditions are met:
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 ******************************************************************************
34 */
35
36 /* Define to prevent recursive inclusion -------------------------------------*/
37 #ifndef __STM32F4xx_HAL_CRC_H
38 #define __STM32F4xx_HAL_CRC_H
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 /* Includes ------------------------------------------------------------------*/
45 #include "stm32f4xx_hal_def.h"
46
47 /** @addtogroup STM32F4xx_HAL_Driver
48 * @{
49 */
50
51 /** @defgroup CRC CRC
52 * @brief CRC HAL module driver
53 * @{
54 */
55
56 /* Exported types ------------------------------------------------------------*/
57 /** @defgroup CRC_Exported_Types CRC Exported Types
58 * @{
59 */
60
61 /** @defgroup CRC_Exported_Types_Group1 CRC State Structure definition
62 * @{
63 */
64 typedef enum
65 {
66 HAL_CRC_STATE_RESET = 0x00U, /*!< CRC not yet initialized or disabled */
67 HAL_CRC_STATE_READY = 0x01U, /*!< CRC initialized and ready for use */
68 HAL_CRC_STATE_BUSY = 0x02U, /*!< CRC internal process is ongoing */
69 HAL_CRC_STATE_TIMEOUT = 0x03U, /*!< CRC timeout state */
70 HAL_CRC_STATE_ERROR = 0x04U /*!< CRC error state */
71
72 }HAL_CRC_StateTypeDef;
73 /**
74 * @}
75 */
76
77 /** @defgroup CRC_Exported_Types_Group2 CRC Handle Structure definition
78 * @{
79 */
80 typedef struct
81 {
82 CRC_TypeDef *Instance; /*!< Register base address */
83
84 HAL_LockTypeDef Lock; /*!< CRC locking object */
85
86 __IO HAL_CRC_StateTypeDef State; /*!< CRC communication state */
87
88 }CRC_HandleTypeDef;
89 /**
90 * @}
91 */
92
93 /**
94 * @}
95 */
96
97 /* Exported constants --------------------------------------------------------*/
98 /* Exported macro ------------------------------------------------------------*/
99 /** @defgroup CRC_Exported_Macros CRC Exported Macros
100 * @{
101 */
102
103 /** @brief Resets CRC handle state
104 * @param __HANDLE__ CRC handle
105 * @retval None
106 */
107 #define __HAL_CRC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRC_STATE_RESET)
108
109 /**
110 * @brief Resets CRC Data Register.
111 * @param __HANDLE__ CRC handle
112 * @retval None
113 */
114 #define __HAL_CRC_DR_RESET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_RESET)
115
116 /**
117 * @brief Stores a 8-bit data in the Independent Data(ID) register.
118 * @param __HANDLE__ CRC handle
119 * @param __VALUE__ 8-bit value to be stored in the ID register
120 * @retval None
121 */
122 #define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (WRITE_REG((__HANDLE__)->Instance->IDR, (__VALUE__)))
123
124 /**
125 * @brief Returns the 8-bit data stored in the Independent Data(ID) register.
126 * @param __HANDLE__ CRC handle
127 * @retval 8-bit value of the ID register
128 */
129 #define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR)
130 /**
131 * @}
132 */
133
134 /* Exported functions --------------------------------------------------------*/
135 /** @defgroup CRC_Exported_Functions CRC Exported Functions
136 * @{
137 */
138
139 /** @defgroup CRC_Exported_Functions_Group1 Initialization and de-initialization functions
140 * @{
141 */
142 HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc);
143 HAL_StatusTypeDef HAL_CRC_DeInit (CRC_HandleTypeDef *hcrc);
144 void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc);
145 void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc);
146 /**
147 * @}
148 */
149
150 /** @defgroup CRC_Exported_Functions_Group2 Peripheral Control functions
151 * @{
152 */
153 uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);
154 uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);
155 /**
156 * @}
157 */
158
159 /** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions
160 * @{
161 */
162 HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
163 /**
164 * @}
165 */
166
167 /**
168 * @}
169 */
170 /* Private types -------------------------------------------------------------*/
171 /** @defgroup CRC_Private_Types CRC Private Types
172 * @{
173 */
174
175 /**
176 * @}
177 */
178
179 /* Private defines -----------------------------------------------------------*/
180 /** @defgroup CRC_Private_Defines CRC Private Defines
181 * @{
182 */
183
184 /**
185 * @}
186 */
187
188 /* Private variables ---------------------------------------------------------*/
189 /** @defgroup CRC_Private_Variables CRC Private Variables
190 * @{
191 */
192
193 /**
194 * @}
195 */
196
197 /* Private constants ---------------------------------------------------------*/
198 /** @defgroup CRC_Private_Constants CRC Private Constants
199 * @{
200 */
201
202 /**
203 * @}
204 */
205
206 /* Private macros ------------------------------------------------------------*/
207 /** @defgroup CRC_Private_Macros CRC Private Macros
208 * @{
209 */
210
211 /**
212 * @}
213 */
214
215 /* Private functions prototypes ----------------------------------------------*/
216 /** @defgroup CRC_Private_Functions_Prototypes CRC Private Functions Prototypes
217 * @{
218 */
219
220 /**
221 * @}
222 */
223
224 /* Private functions ---------------------------------------------------------*/
225 /** @defgroup CRC_Private_Functions CRC Private Functions
226 * @{
227 */
228
229 /**
230 * @}
231 */
232
233 /**
234 * @}
235 */
236
237 /**
238 * @}
239 */
240
241 #ifdef __cplusplus
242 }
243 #endif
244
245 #endif /* __STM32F4xx_HAL_CRC_H */
246
247 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/