mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
AnnaBridge
Date:
Wed Feb 20 22:31:08 2019 +0000
Revision:
189:f392fc9709a3
Parent:
182:a56a73fd2a6f
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 144:ef7eb2e8f9f7 1 /**
<> 144:ef7eb2e8f9f7 2 ******************************************************************************
<> 144:ef7eb2e8f9f7 3 * @file stm32f4xx_hal_crc.c
<> 144:ef7eb2e8f9f7 4 * @author MCD Application Team
<> 144:ef7eb2e8f9f7 5 * @brief CRC HAL module driver.
<> 144:ef7eb2e8f9f7 6 * This file provides firmware functions to manage the following
<> 144:ef7eb2e8f9f7 7 * functionalities of the Cyclic Redundancy Check (CRC) peripheral:
<> 144:ef7eb2e8f9f7 8 * + Initialization and de-initialization functions
<> 144:ef7eb2e8f9f7 9 * + Peripheral Control functions
<> 144:ef7eb2e8f9f7 10 * + Peripheral State functions
<> 144:ef7eb2e8f9f7 11 *
<> 144:ef7eb2e8f9f7 12 @verbatim
<> 144:ef7eb2e8f9f7 13 ==============================================================================
<> 144:ef7eb2e8f9f7 14 ##### How to use this driver #####
<> 144:ef7eb2e8f9f7 15 ==============================================================================
<> 144:ef7eb2e8f9f7 16 [..]
<> 144:ef7eb2e8f9f7 17 The CRC HAL driver can be used as follows:
<> 144:ef7eb2e8f9f7 18
<> 144:ef7eb2e8f9f7 19 (#) Enable CRC AHB clock using __HAL_RCC_CRC_CLK_ENABLE();
<> 144:ef7eb2e8f9f7 20
<> 144:ef7eb2e8f9f7 21 (#) Use HAL_CRC_Accumulate() function to compute the CRC value of
<> 144:ef7eb2e8f9f7 22 a 32-bit data buffer using combination of the previous CRC value
<> 144:ef7eb2e8f9f7 23 and the new one.
<> 144:ef7eb2e8f9f7 24
<> 144:ef7eb2e8f9f7 25 (#) Use HAL_CRC_Calculate() function to compute the CRC Value of
<> 144:ef7eb2e8f9f7 26 a new 32-bit data buffer. This function resets the CRC computation
<> 144:ef7eb2e8f9f7 27 unit before starting the computation to avoid getting wrong CRC values.
<> 144:ef7eb2e8f9f7 28
<> 144:ef7eb2e8f9f7 29 @endverbatim
<> 144:ef7eb2e8f9f7 30 ******************************************************************************
<> 144:ef7eb2e8f9f7 31 * @attention
<> 144:ef7eb2e8f9f7 32 *
AnnaBridge 167:e84263d55307 33 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
<> 144:ef7eb2e8f9f7 34 *
<> 144:ef7eb2e8f9f7 35 * Redistribution and use in source and binary forms, with or without modification,
<> 144:ef7eb2e8f9f7 36 * are permitted provided that the following conditions are met:
<> 144:ef7eb2e8f9f7 37 * 1. Redistributions of source code must retain the above copyright notice,
<> 144:ef7eb2e8f9f7 38 * this list of conditions and the following disclaimer.
<> 144:ef7eb2e8f9f7 39 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 144:ef7eb2e8f9f7 40 * this list of conditions and the following disclaimer in the documentation
<> 144:ef7eb2e8f9f7 41 * and/or other materials provided with the distribution.
<> 144:ef7eb2e8f9f7 42 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 144:ef7eb2e8f9f7 43 * may be used to endorse or promote products derived from this software
<> 144:ef7eb2e8f9f7 44 * without specific prior written permission.
<> 144:ef7eb2e8f9f7 45 *
<> 144:ef7eb2e8f9f7 46 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 144:ef7eb2e8f9f7 47 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 144:ef7eb2e8f9f7 48 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 144:ef7eb2e8f9f7 49 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 144:ef7eb2e8f9f7 50 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 144:ef7eb2e8f9f7 51 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 144:ef7eb2e8f9f7 52 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 144:ef7eb2e8f9f7 53 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 144:ef7eb2e8f9f7 54 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 144:ef7eb2e8f9f7 55 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 144:ef7eb2e8f9f7 56 *
<> 144:ef7eb2e8f9f7 57 ******************************************************************************
<> 144:ef7eb2e8f9f7 58 */
<> 144:ef7eb2e8f9f7 59
<> 144:ef7eb2e8f9f7 60 /* Includes ------------------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 61 #include "stm32f4xx_hal.h"
<> 144:ef7eb2e8f9f7 62
<> 144:ef7eb2e8f9f7 63 /** @addtogroup STM32F4xx_HAL_Driver
<> 144:ef7eb2e8f9f7 64 * @{
<> 144:ef7eb2e8f9f7 65 */
<> 144:ef7eb2e8f9f7 66
<> 144:ef7eb2e8f9f7 67 /** @addtogroup CRC
<> 144:ef7eb2e8f9f7 68 * @{
<> 144:ef7eb2e8f9f7 69 */
<> 144:ef7eb2e8f9f7 70
<> 144:ef7eb2e8f9f7 71 #ifdef HAL_CRC_MODULE_ENABLED
<> 144:ef7eb2e8f9f7 72
<> 144:ef7eb2e8f9f7 73 /* Private typedef -----------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 74 /* Private define ------------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 75 /* Private macro -------------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 76 /* Private variables ---------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 77 /* Private function prototypes -----------------------------------------------*/
<> 144:ef7eb2e8f9f7 78 /* Private functions ---------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 79 /* Exported functions --------------------------------------------------------*/
<> 144:ef7eb2e8f9f7 80
<> 144:ef7eb2e8f9f7 81 /** @addtogroup CRC_Exported_Functions
<> 144:ef7eb2e8f9f7 82 * @{
<> 144:ef7eb2e8f9f7 83 */
<> 144:ef7eb2e8f9f7 84
<> 144:ef7eb2e8f9f7 85 /** @addtogroup CRC_Exported_Functions_Group1
<> 144:ef7eb2e8f9f7 86 * @brief Initialization and de-initialization functions
<> 144:ef7eb2e8f9f7 87 *
<> 144:ef7eb2e8f9f7 88 @verbatim
<> 144:ef7eb2e8f9f7 89 ==============================================================================
<> 144:ef7eb2e8f9f7 90 ##### Initialization and de-initialization functions #####
<> 144:ef7eb2e8f9f7 91 ==============================================================================
<> 144:ef7eb2e8f9f7 92 [..] This section provides functions allowing to:
<> 144:ef7eb2e8f9f7 93 (+) Initialize the CRC according to the specified parameters
<> 144:ef7eb2e8f9f7 94 in the CRC_InitTypeDef and create the associated handle
<> 144:ef7eb2e8f9f7 95 (+) DeInitialize the CRC peripheral
<> 144:ef7eb2e8f9f7 96 (+) Initialize the CRC MSP
<> 144:ef7eb2e8f9f7 97 (+) DeInitialize CRC MSP
<> 144:ef7eb2e8f9f7 98
<> 144:ef7eb2e8f9f7 99 @endverbatim
<> 144:ef7eb2e8f9f7 100 * @{
<> 144:ef7eb2e8f9f7 101 */
<> 144:ef7eb2e8f9f7 102
<> 144:ef7eb2e8f9f7 103 /**
<> 144:ef7eb2e8f9f7 104 * @brief Initializes the CRC according to the specified
<> 144:ef7eb2e8f9f7 105 * parameters in the CRC_InitTypeDef and creates the associated handle.
AnnaBridge 182:a56a73fd2a6f 106 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 107 * the configuration information for CRC
<> 144:ef7eb2e8f9f7 108 * @retval HAL status
<> 144:ef7eb2e8f9f7 109 */
<> 144:ef7eb2e8f9f7 110 HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc)
<> 144:ef7eb2e8f9f7 111 {
<> 144:ef7eb2e8f9f7 112 /* Check the CRC handle allocation */
<> 144:ef7eb2e8f9f7 113 if(hcrc == NULL)
<> 144:ef7eb2e8f9f7 114 {
<> 144:ef7eb2e8f9f7 115 return HAL_ERROR;
<> 144:ef7eb2e8f9f7 116 }
<> 144:ef7eb2e8f9f7 117
<> 144:ef7eb2e8f9f7 118 /* Check the parameters */
<> 144:ef7eb2e8f9f7 119 assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance));
<> 144:ef7eb2e8f9f7 120
<> 144:ef7eb2e8f9f7 121 if(hcrc->State == HAL_CRC_STATE_RESET)
<> 144:ef7eb2e8f9f7 122 {
<> 144:ef7eb2e8f9f7 123 /* Allocate lock resource and initialize it */
<> 144:ef7eb2e8f9f7 124 hcrc->Lock = HAL_UNLOCKED;
<> 144:ef7eb2e8f9f7 125 /* Init the low level hardware */
<> 144:ef7eb2e8f9f7 126 HAL_CRC_MspInit(hcrc);
<> 144:ef7eb2e8f9f7 127 }
<> 144:ef7eb2e8f9f7 128
<> 144:ef7eb2e8f9f7 129 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 130 hcrc->State = HAL_CRC_STATE_BUSY;
<> 144:ef7eb2e8f9f7 131
<> 144:ef7eb2e8f9f7 132 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 133 hcrc->State = HAL_CRC_STATE_READY;
<> 144:ef7eb2e8f9f7 134
<> 144:ef7eb2e8f9f7 135 /* Return function status */
<> 144:ef7eb2e8f9f7 136 return HAL_OK;
<> 144:ef7eb2e8f9f7 137 }
<> 144:ef7eb2e8f9f7 138
<> 144:ef7eb2e8f9f7 139 /**
<> 144:ef7eb2e8f9f7 140 * @brief DeInitializes the CRC peripheral.
AnnaBridge 182:a56a73fd2a6f 141 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 142 * the configuration information for CRC
<> 144:ef7eb2e8f9f7 143 * @retval HAL status
<> 144:ef7eb2e8f9f7 144 */
<> 144:ef7eb2e8f9f7 145 HAL_StatusTypeDef HAL_CRC_DeInit(CRC_HandleTypeDef *hcrc)
<> 144:ef7eb2e8f9f7 146 {
<> 144:ef7eb2e8f9f7 147 /* Check the CRC handle allocation */
<> 144:ef7eb2e8f9f7 148 if(hcrc == NULL)
<> 144:ef7eb2e8f9f7 149 {
<> 144:ef7eb2e8f9f7 150 return HAL_ERROR;
<> 144:ef7eb2e8f9f7 151 }
<> 144:ef7eb2e8f9f7 152
<> 144:ef7eb2e8f9f7 153 /* Check the parameters */
<> 144:ef7eb2e8f9f7 154 assert_param(IS_CRC_ALL_INSTANCE(hcrc->Instance));
<> 144:ef7eb2e8f9f7 155
<> 144:ef7eb2e8f9f7 156 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 157 hcrc->State = HAL_CRC_STATE_BUSY;
<> 144:ef7eb2e8f9f7 158
<> 144:ef7eb2e8f9f7 159 /* DeInit the low level hardware */
<> 144:ef7eb2e8f9f7 160 HAL_CRC_MspDeInit(hcrc);
<> 144:ef7eb2e8f9f7 161
<> 144:ef7eb2e8f9f7 162 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 163 hcrc->State = HAL_CRC_STATE_RESET;
<> 144:ef7eb2e8f9f7 164
<> 144:ef7eb2e8f9f7 165 /* Release Lock */
<> 144:ef7eb2e8f9f7 166 __HAL_UNLOCK(hcrc);
<> 144:ef7eb2e8f9f7 167
<> 144:ef7eb2e8f9f7 168 /* Return function status */
<> 144:ef7eb2e8f9f7 169 return HAL_OK;
<> 144:ef7eb2e8f9f7 170 }
<> 144:ef7eb2e8f9f7 171
<> 144:ef7eb2e8f9f7 172 /**
<> 144:ef7eb2e8f9f7 173 * @brief Initializes the CRC MSP.
AnnaBridge 182:a56a73fd2a6f 174 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 175 * the configuration information for CRC
<> 144:ef7eb2e8f9f7 176 * @retval None
<> 144:ef7eb2e8f9f7 177 */
<> 144:ef7eb2e8f9f7 178 __weak void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc)
<> 144:ef7eb2e8f9f7 179 {
<> 144:ef7eb2e8f9f7 180 /* Prevent unused argument(s) compilation warning */
<> 144:ef7eb2e8f9f7 181 UNUSED(hcrc);
<> 144:ef7eb2e8f9f7 182 /* NOTE : This function Should not be modified, when the callback is needed,
<> 144:ef7eb2e8f9f7 183 the HAL_CRC_MspInit could be implemented in the user file
<> 144:ef7eb2e8f9f7 184 */
<> 144:ef7eb2e8f9f7 185 }
<> 144:ef7eb2e8f9f7 186
<> 144:ef7eb2e8f9f7 187 /**
<> 144:ef7eb2e8f9f7 188 * @brief DeInitializes the CRC MSP.
AnnaBridge 182:a56a73fd2a6f 189 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 190 * the configuration information for CRC
<> 144:ef7eb2e8f9f7 191 * @retval None
<> 144:ef7eb2e8f9f7 192 */
<> 144:ef7eb2e8f9f7 193 __weak void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc)
<> 144:ef7eb2e8f9f7 194 {
<> 144:ef7eb2e8f9f7 195 /* Prevent unused argument(s) compilation warning */
<> 144:ef7eb2e8f9f7 196 UNUSED(hcrc);
<> 144:ef7eb2e8f9f7 197 /* NOTE : This function Should not be modified, when the callback is needed,
<> 144:ef7eb2e8f9f7 198 the HAL_CRC_MspDeInit could be implemented in the user file
<> 144:ef7eb2e8f9f7 199 */
<> 144:ef7eb2e8f9f7 200 }
<> 144:ef7eb2e8f9f7 201
<> 144:ef7eb2e8f9f7 202 /**
<> 144:ef7eb2e8f9f7 203 * @}
<> 144:ef7eb2e8f9f7 204 */
<> 144:ef7eb2e8f9f7 205
<> 144:ef7eb2e8f9f7 206 /** @addtogroup CRC_Exported_Functions_Group2
<> 144:ef7eb2e8f9f7 207 * @brief Peripheral Control functions
<> 144:ef7eb2e8f9f7 208 *
<> 144:ef7eb2e8f9f7 209 @verbatim
<> 144:ef7eb2e8f9f7 210 ==============================================================================
<> 144:ef7eb2e8f9f7 211 ##### Peripheral Control functions #####
<> 144:ef7eb2e8f9f7 212 ==============================================================================
<> 144:ef7eb2e8f9f7 213 [..] This section provides functions allowing to:
<> 144:ef7eb2e8f9f7 214 (+) Compute the 32-bit CRC value of 32-bit data buffer,
<> 144:ef7eb2e8f9f7 215 using combination of the previous CRC value and the new one.
<> 144:ef7eb2e8f9f7 216 (+) Compute the 32-bit CRC value of 32-bit data buffer,
<> 144:ef7eb2e8f9f7 217 independently of the previous CRC value.
<> 144:ef7eb2e8f9f7 218
<> 144:ef7eb2e8f9f7 219 @endverbatim
<> 144:ef7eb2e8f9f7 220 * @{
<> 144:ef7eb2e8f9f7 221 */
<> 144:ef7eb2e8f9f7 222
<> 144:ef7eb2e8f9f7 223 /**
<> 144:ef7eb2e8f9f7 224 * @brief Computes the 32-bit CRC of 32-bit data buffer using combination
<> 144:ef7eb2e8f9f7 225 * of the previous CRC value and the new one.
AnnaBridge 182:a56a73fd2a6f 226 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 227 * the configuration information for CRC
AnnaBridge 182:a56a73fd2a6f 228 * @param pBuffer pointer to the buffer containing the data to be computed
AnnaBridge 182:a56a73fd2a6f 229 * @param BufferLength length of the buffer to be computed
<> 144:ef7eb2e8f9f7 230 * @retval 32-bit CRC
<> 144:ef7eb2e8f9f7 231 */
<> 144:ef7eb2e8f9f7 232 uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength)
<> 144:ef7eb2e8f9f7 233 {
<> 144:ef7eb2e8f9f7 234 uint32_t index = 0U;
<> 144:ef7eb2e8f9f7 235
<> 144:ef7eb2e8f9f7 236 /* Process Locked */
<> 144:ef7eb2e8f9f7 237 __HAL_LOCK(hcrc);
<> 144:ef7eb2e8f9f7 238
<> 144:ef7eb2e8f9f7 239 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 240 hcrc->State = HAL_CRC_STATE_BUSY;
<> 144:ef7eb2e8f9f7 241
<> 144:ef7eb2e8f9f7 242 /* Enter Data to the CRC calculator */
<> 144:ef7eb2e8f9f7 243 for(index = 0U; index < BufferLength; index++)
<> 144:ef7eb2e8f9f7 244 {
<> 144:ef7eb2e8f9f7 245 hcrc->Instance->DR = pBuffer[index];
<> 144:ef7eb2e8f9f7 246 }
<> 144:ef7eb2e8f9f7 247
<> 144:ef7eb2e8f9f7 248 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 249 hcrc->State = HAL_CRC_STATE_READY;
<> 144:ef7eb2e8f9f7 250
<> 144:ef7eb2e8f9f7 251 /* Process Unlocked */
<> 144:ef7eb2e8f9f7 252 __HAL_UNLOCK(hcrc);
<> 144:ef7eb2e8f9f7 253
<> 144:ef7eb2e8f9f7 254 /* Return the CRC computed value */
<> 144:ef7eb2e8f9f7 255 return hcrc->Instance->DR;
<> 144:ef7eb2e8f9f7 256 }
<> 144:ef7eb2e8f9f7 257
<> 144:ef7eb2e8f9f7 258 /**
<> 144:ef7eb2e8f9f7 259 * @brief Computes the 32-bit CRC of 32-bit data buffer independently
<> 144:ef7eb2e8f9f7 260 * of the previous CRC value.
AnnaBridge 182:a56a73fd2a6f 261 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 262 * the configuration information for CRC
AnnaBridge 182:a56a73fd2a6f 263 * @param pBuffer Pointer to the buffer containing the data to be computed
AnnaBridge 182:a56a73fd2a6f 264 * @param BufferLength Length of the buffer to be computed
<> 144:ef7eb2e8f9f7 265 * @retval 32-bit CRC
<> 144:ef7eb2e8f9f7 266 */
<> 144:ef7eb2e8f9f7 267 uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength)
<> 144:ef7eb2e8f9f7 268 {
<> 144:ef7eb2e8f9f7 269 uint32_t index = 0U;
<> 144:ef7eb2e8f9f7 270
<> 144:ef7eb2e8f9f7 271 /* Process Locked */
<> 144:ef7eb2e8f9f7 272 __HAL_LOCK(hcrc);
<> 144:ef7eb2e8f9f7 273
<> 144:ef7eb2e8f9f7 274 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 275 hcrc->State = HAL_CRC_STATE_BUSY;
<> 144:ef7eb2e8f9f7 276
<> 144:ef7eb2e8f9f7 277 /* Reset CRC Calculation Unit */
<> 144:ef7eb2e8f9f7 278 __HAL_CRC_DR_RESET(hcrc);
<> 144:ef7eb2e8f9f7 279
<> 144:ef7eb2e8f9f7 280 /* Enter Data to the CRC calculator */
<> 144:ef7eb2e8f9f7 281 for(index = 0U; index < BufferLength; index++)
<> 144:ef7eb2e8f9f7 282 {
<> 144:ef7eb2e8f9f7 283 hcrc->Instance->DR = pBuffer[index];
<> 144:ef7eb2e8f9f7 284 }
<> 144:ef7eb2e8f9f7 285
<> 144:ef7eb2e8f9f7 286 /* Change CRC peripheral state */
<> 144:ef7eb2e8f9f7 287 hcrc->State = HAL_CRC_STATE_READY;
<> 144:ef7eb2e8f9f7 288
<> 144:ef7eb2e8f9f7 289 /* Process Unlocked */
<> 144:ef7eb2e8f9f7 290 __HAL_UNLOCK(hcrc);
<> 144:ef7eb2e8f9f7 291
<> 144:ef7eb2e8f9f7 292 /* Return the CRC computed value */
<> 144:ef7eb2e8f9f7 293 return hcrc->Instance->DR;
<> 144:ef7eb2e8f9f7 294 }
<> 144:ef7eb2e8f9f7 295
<> 144:ef7eb2e8f9f7 296 /**
<> 144:ef7eb2e8f9f7 297 * @}
<> 144:ef7eb2e8f9f7 298 */
<> 144:ef7eb2e8f9f7 299
<> 144:ef7eb2e8f9f7 300
<> 144:ef7eb2e8f9f7 301 /** @addtogroup CRC_Exported_Functions_Group3
<> 144:ef7eb2e8f9f7 302 * @brief Peripheral State functions
<> 144:ef7eb2e8f9f7 303 *
<> 144:ef7eb2e8f9f7 304 @verbatim
<> 144:ef7eb2e8f9f7 305 ==============================================================================
<> 144:ef7eb2e8f9f7 306 ##### Peripheral State functions #####
<> 144:ef7eb2e8f9f7 307 ==============================================================================
<> 144:ef7eb2e8f9f7 308 [..]
<> 144:ef7eb2e8f9f7 309 This subsection permits to get in run-time the status of the peripheral
<> 144:ef7eb2e8f9f7 310 and the data flow.
<> 144:ef7eb2e8f9f7 311
<> 144:ef7eb2e8f9f7 312 @endverbatim
<> 144:ef7eb2e8f9f7 313 * @{
<> 144:ef7eb2e8f9f7 314 */
<> 144:ef7eb2e8f9f7 315
<> 144:ef7eb2e8f9f7 316 /**
<> 144:ef7eb2e8f9f7 317 * @brief Returns the CRC state.
AnnaBridge 182:a56a73fd2a6f 318 * @param hcrc pointer to a CRC_HandleTypeDef structure that contains
<> 144:ef7eb2e8f9f7 319 * the configuration information for CRC
<> 144:ef7eb2e8f9f7 320 * @retval HAL state
<> 144:ef7eb2e8f9f7 321 */
<> 144:ef7eb2e8f9f7 322 HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc)
<> 144:ef7eb2e8f9f7 323 {
<> 144:ef7eb2e8f9f7 324 return hcrc->State;
<> 144:ef7eb2e8f9f7 325 }
<> 144:ef7eb2e8f9f7 326
<> 144:ef7eb2e8f9f7 327 /**
<> 144:ef7eb2e8f9f7 328 * @}
<> 144:ef7eb2e8f9f7 329 */
<> 144:ef7eb2e8f9f7 330
<> 144:ef7eb2e8f9f7 331 /**
<> 144:ef7eb2e8f9f7 332 * @}
<> 144:ef7eb2e8f9f7 333 */
<> 144:ef7eb2e8f9f7 334
<> 144:ef7eb2e8f9f7 335 #endif /* HAL_CRC_MODULE_ENABLED */
<> 144:ef7eb2e8f9f7 336 /**
<> 144:ef7eb2e8f9f7 337 * @}
<> 144:ef7eb2e8f9f7 338 */
<> 144:ef7eb2e8f9f7 339
<> 144:ef7eb2e8f9f7 340 /**
<> 144:ef7eb2e8f9f7 341 * @}
<> 144:ef7eb2e8f9f7 342 */
<> 144:ef7eb2e8f9f7 343
<> 144:ef7eb2e8f9f7 344 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/