Modified version of the mbed library for use with the Nucleo boards.

Dependents:   EEPROMWrite Full-Project

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Sep 28 10:45:10 2015 +0100
Revision:
630:825f75ca301e
Parent:
441:d2c15dda23c1
Synchronized with git revision 54fbe4144faf309c37205a5d39fa665daa919f10

Full URL: https://github.com/mbedmicro/mbed/commit/54fbe4144faf309c37205a5d39fa665daa919f10/

NUCLEO_F031K6 : Add new target

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 340:28d1f895c6fe 1 /**
mbed_official 340:28d1f895c6fe 2 ******************************************************************************
mbed_official 340:28d1f895c6fe 3 * @file stm32f0xx_hal_crc.h
mbed_official 340:28d1f895c6fe 4 * @author MCD Application Team
mbed_official 630:825f75ca301e 5 * @version V1.3.0
mbed_official 630:825f75ca301e 6 * @date 26-June-2015
mbed_official 340:28d1f895c6fe 7 * @brief Header file of CRC HAL module.
mbed_official 340:28d1f895c6fe 8 ******************************************************************************
mbed_official 340:28d1f895c6fe 9 * @attention
mbed_official 340:28d1f895c6fe 10 *
mbed_official 630:825f75ca301e 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 340:28d1f895c6fe 12 *
mbed_official 340:28d1f895c6fe 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 340:28d1f895c6fe 14 * are permitted provided that the following conditions are met:
mbed_official 340:28d1f895c6fe 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 340:28d1f895c6fe 16 * this list of conditions and the following disclaimer.
mbed_official 340:28d1f895c6fe 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 340:28d1f895c6fe 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 340:28d1f895c6fe 19 * and/or other materials provided with the distribution.
mbed_official 340:28d1f895c6fe 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 340:28d1f895c6fe 21 * may be used to endorse or promote products derived from this software
mbed_official 340:28d1f895c6fe 22 * without specific prior written permission.
mbed_official 340:28d1f895c6fe 23 *
mbed_official 340:28d1f895c6fe 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 340:28d1f895c6fe 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 340:28d1f895c6fe 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 340:28d1f895c6fe 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 340:28d1f895c6fe 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 340:28d1f895c6fe 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 340:28d1f895c6fe 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 340:28d1f895c6fe 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 340:28d1f895c6fe 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 340:28d1f895c6fe 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 340:28d1f895c6fe 34 *
mbed_official 340:28d1f895c6fe 35 ******************************************************************************
mbed_official 340:28d1f895c6fe 36 */
mbed_official 340:28d1f895c6fe 37
mbed_official 340:28d1f895c6fe 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 340:28d1f895c6fe 39 #ifndef __STM32F0xx_HAL_CRC_H
mbed_official 340:28d1f895c6fe 40 #define __STM32F0xx_HAL_CRC_H
mbed_official 340:28d1f895c6fe 41
mbed_official 340:28d1f895c6fe 42 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 43 extern "C" {
mbed_official 340:28d1f895c6fe 44 #endif
mbed_official 340:28d1f895c6fe 45
mbed_official 340:28d1f895c6fe 46 /* Includes ------------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 47 #include "stm32f0xx_hal_def.h"
mbed_official 340:28d1f895c6fe 48
mbed_official 340:28d1f895c6fe 49 /** @addtogroup STM32F0xx_HAL_Driver
mbed_official 340:28d1f895c6fe 50 * @{
mbed_official 340:28d1f895c6fe 51 */
mbed_official 340:28d1f895c6fe 52
mbed_official 630:825f75ca301e 53 /** @addtogroup CRC CRC
mbed_official 340:28d1f895c6fe 54 * @{
mbed_official 340:28d1f895c6fe 55 */
mbed_official 340:28d1f895c6fe 56
mbed_official 340:28d1f895c6fe 57 /* Exported types ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 58 /** @defgroup CRC_Exported_Types CRC Exported Types
mbed_official 340:28d1f895c6fe 59 * @{
mbed_official 340:28d1f895c6fe 60 */
mbed_official 340:28d1f895c6fe 61 /**
mbed_official 340:28d1f895c6fe 62 * @brief CRC HAL State Structure definition
mbed_official 340:28d1f895c6fe 63 */
mbed_official 340:28d1f895c6fe 64 typedef enum
mbed_official 340:28d1f895c6fe 65 {
mbed_official 340:28d1f895c6fe 66 HAL_CRC_STATE_RESET = 0x00, /*!< CRC not yet initialized or disabled */
mbed_official 340:28d1f895c6fe 67 HAL_CRC_STATE_READY = 0x01, /*!< CRC initialized and ready for use */
mbed_official 340:28d1f895c6fe 68 HAL_CRC_STATE_BUSY = 0x02, /*!< CRC internal process is ongoing */
mbed_official 340:28d1f895c6fe 69 HAL_CRC_STATE_TIMEOUT = 0x03, /*!< CRC timeout state */
mbed_official 340:28d1f895c6fe 70 HAL_CRC_STATE_ERROR = 0x04 /*!< CRC error state */
mbed_official 340:28d1f895c6fe 71 }HAL_CRC_StateTypeDef;
mbed_official 340:28d1f895c6fe 72
mbed_official 340:28d1f895c6fe 73
mbed_official 340:28d1f895c6fe 74 /**
mbed_official 340:28d1f895c6fe 75 * @brief CRC Init Structure definition
mbed_official 340:28d1f895c6fe 76 */
mbed_official 340:28d1f895c6fe 77 typedef struct
mbed_official 340:28d1f895c6fe 78 {
mbed_official 340:28d1f895c6fe 79 uint8_t DefaultPolynomialUse; /*!< This parameter is a value of @ref CRC_Default_Polynomial and indicates if default polynomial is used.
mbed_official 340:28d1f895c6fe 80 If set to DEFAULT_POLYNOMIAL_ENABLE, resort to default
mbed_official 340:28d1f895c6fe 81 X^32 + X^26 + X^23 + X^22 + X^16 + X^12 + X^11 + X^10 +X^8 + X^7 + X^5 + X^4 + X^2+ X +1.
mbed_official 340:28d1f895c6fe 82 In that case, there is no need to set GeneratingPolynomial field.
mbed_official 340:28d1f895c6fe 83 If otherwise set to DEFAULT_POLYNOMIAL_DISABLE, GeneratingPolynomial and CRCLength fields must be set */
mbed_official 340:28d1f895c6fe 84
mbed_official 340:28d1f895c6fe 85 uint8_t DefaultInitValueUse; /*!< This parameter is a value of @ref CRC_Default_InitValue_Use and indicates if default init value is used.
mbed_official 340:28d1f895c6fe 86 If set to DEFAULT_INIT_VALUE_ENABLE, resort to default
mbed_official 340:28d1f895c6fe 87 0xFFFFFFFF value. In that case, there is no need to set InitValue field.
mbed_official 340:28d1f895c6fe 88 If otherwise set to DEFAULT_INIT_VALUE_DISABLE, InitValue field must be set */
mbed_official 340:28d1f895c6fe 89
mbed_official 340:28d1f895c6fe 90 uint32_t GeneratingPolynomial; /*!< Set CRC generating polynomial. 7, 8, 16 or 32-bit long value for a polynomial degree
mbed_official 340:28d1f895c6fe 91 respectively equal to 7, 8, 16 or 32. This field is written in normal representation,
mbed_official 340:28d1f895c6fe 92 e.g., for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65.
mbed_official 340:28d1f895c6fe 93 No need to specify it if DefaultPolynomialUse is set to DEFAULT_POLYNOMIAL_ENABLE */
mbed_official 340:28d1f895c6fe 94
mbed_official 441:d2c15dda23c1 95 uint32_t CRCLength; /*!< This parameter is a value of @ref CRCEx_Polynomial_Sizes and indicates CRC length.
mbed_official 340:28d1f895c6fe 96 Value can be either one of
mbed_official 340:28d1f895c6fe 97 CRC_POLYLENGTH_32B (32-bit CRC)
mbed_official 340:28d1f895c6fe 98 CRC_POLYLENGTH_16B (16-bit CRC)
mbed_official 340:28d1f895c6fe 99 CRC_POLYLENGTH_8B (8-bit CRC)
mbed_official 340:28d1f895c6fe 100 CRC_POLYLENGTH_7B (7-bit CRC) */
mbed_official 340:28d1f895c6fe 101
mbed_official 340:28d1f895c6fe 102 uint32_t InitValue; /*!< Init value to initiate CRC computation. No need to specify it if DefaultInitValueUse
mbed_official 340:28d1f895c6fe 103 is set to DEFAULT_INIT_VALUE_ENABLE */
mbed_official 340:28d1f895c6fe 104
mbed_official 340:28d1f895c6fe 105 uint32_t InputDataInversionMode; /*!< This parameter is a value of @ref CRCEx_Input_Data_Inversion and specifies input data inversion mode.
mbed_official 340:28d1f895c6fe 106 Can be either one of the following values
mbed_official 340:28d1f895c6fe 107 CRC_INPUTDATA_INVERSION_NONE no input data inversion
mbed_official 340:28d1f895c6fe 108 CRC_INPUTDATA_INVERSION_BYTE byte-wise inversion, 0x1A2B3C4D becomes 0x58D43CB2
mbed_official 340:28d1f895c6fe 109 CRC_INPUTDATA_INVERSION_HALFWORD halfword-wise inversion, 0x1A2B3C4D becomes 0xD458B23C
mbed_official 340:28d1f895c6fe 110 CRC_INPUTDATA_INVERSION_WORD word-wise inversion, 0x1A2B3C4D becomes 0xB23CD458 */
mbed_official 340:28d1f895c6fe 111
mbed_official 340:28d1f895c6fe 112 uint32_t OutputDataInversionMode; /*!< This parameter is a value of @ref CRCEx_Output_Data_Inversion and specifies output data (i.e. CRC) inversion mode.
mbed_official 340:28d1f895c6fe 113 Can be either
mbed_official 630:825f75ca301e 114 CRC_OUTPUTDATA_INVERSION_DISABLE no CRC inversion, or
mbed_official 630:825f75ca301e 115 CRC_OUTPUTDATA_INVERSION_ENABLE CRC 0x11223344 is converted into 0x22CC4488 */
mbed_official 340:28d1f895c6fe 116 }CRC_InitTypeDef;
mbed_official 340:28d1f895c6fe 117
mbed_official 340:28d1f895c6fe 118
mbed_official 340:28d1f895c6fe 119 /**
mbed_official 340:28d1f895c6fe 120 * @brief CRC Handle Structure definition
mbed_official 340:28d1f895c6fe 121 */
mbed_official 340:28d1f895c6fe 122 typedef struct
mbed_official 340:28d1f895c6fe 123 {
mbed_official 340:28d1f895c6fe 124 CRC_TypeDef *Instance; /*!< Register base address */
mbed_official 340:28d1f895c6fe 125
mbed_official 340:28d1f895c6fe 126 CRC_InitTypeDef Init; /*!< CRC configuration parameters */
mbed_official 340:28d1f895c6fe 127
mbed_official 340:28d1f895c6fe 128 HAL_LockTypeDef Lock; /*!< CRC Locking object */
mbed_official 340:28d1f895c6fe 129
mbed_official 340:28d1f895c6fe 130 __IO HAL_CRC_StateTypeDef State; /*!< CRC communication state */
mbed_official 340:28d1f895c6fe 131
mbed_official 340:28d1f895c6fe 132 uint32_t InputDataFormat; /*!< This parameter is a value of @ref CRC_Input_Buffer_Format and specifies input data format.
mbed_official 340:28d1f895c6fe 133 Can be either
mbed_official 340:28d1f895c6fe 134 CRC_INPUTDATA_FORMAT_BYTES input data is a stream of bytes (8-bit data)
mbed_official 340:28d1f895c6fe 135 CRC_INPUTDATA_FORMAT_HALFWORDS input data is a stream of half-words (16-bit data)
mbed_official 340:28d1f895c6fe 136 CRC_INPUTDATA_FORMAT_WORDS input data is a stream of words (32-bits data)
mbed_official 340:28d1f895c6fe 137 Note that constant CRC_INPUT_FORMAT_UNDEFINED is defined but an initialization error
mbed_official 340:28d1f895c6fe 138 must occur if InputBufferFormat is not one of the three values listed above */
mbed_official 340:28d1f895c6fe 139 }CRC_HandleTypeDef;
mbed_official 340:28d1f895c6fe 140 /**
mbed_official 340:28d1f895c6fe 141 * @}
mbed_official 340:28d1f895c6fe 142 */
mbed_official 340:28d1f895c6fe 143
mbed_official 340:28d1f895c6fe 144 /* Exported constants --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 145 /** @defgroup CRC_Exported_Constants CRC Exported Constants
mbed_official 340:28d1f895c6fe 146 * @{
mbed_official 340:28d1f895c6fe 147 */
mbed_official 340:28d1f895c6fe 148 /** @defgroup CRC_Default_Polynomial_Value Default CRC generating polynomial
mbed_official 340:28d1f895c6fe 149 * @{
mbed_official 340:28d1f895c6fe 150 */
mbed_official 340:28d1f895c6fe 151 #define DEFAULT_CRC32_POLY 0x04C11DB7
mbed_official 340:28d1f895c6fe 152
mbed_official 340:28d1f895c6fe 153 /**
mbed_official 340:28d1f895c6fe 154 * @}
mbed_official 340:28d1f895c6fe 155 */
mbed_official 340:28d1f895c6fe 156
mbed_official 340:28d1f895c6fe 157 /** @defgroup CRC_Default_InitValue Default CRC computation initialization value
mbed_official 340:28d1f895c6fe 158 * @{
mbed_official 340:28d1f895c6fe 159 */
mbed_official 340:28d1f895c6fe 160 #define DEFAULT_CRC_INITVALUE 0xFFFFFFFF
mbed_official 340:28d1f895c6fe 161
mbed_official 340:28d1f895c6fe 162 /**
mbed_official 340:28d1f895c6fe 163 * @}
mbed_official 340:28d1f895c6fe 164 */
mbed_official 340:28d1f895c6fe 165
mbed_official 340:28d1f895c6fe 166 /** @defgroup CRC_Default_Polynomial Indicates whether or not default polynomial is used
mbed_official 340:28d1f895c6fe 167 * @{
mbed_official 340:28d1f895c6fe 168 */
mbed_official 340:28d1f895c6fe 169 #define DEFAULT_POLYNOMIAL_ENABLE ((uint8_t)0x00)
mbed_official 340:28d1f895c6fe 170 #define DEFAULT_POLYNOMIAL_DISABLE ((uint8_t)0x01)
mbed_official 340:28d1f895c6fe 171
mbed_official 340:28d1f895c6fe 172 #define IS_DEFAULT_POLYNOMIAL(DEFAULT) (((DEFAULT) == DEFAULT_POLYNOMIAL_ENABLE) || \
mbed_official 340:28d1f895c6fe 173 ((DEFAULT) == DEFAULT_POLYNOMIAL_DISABLE))
mbed_official 340:28d1f895c6fe 174
mbed_official 340:28d1f895c6fe 175 /**
mbed_official 340:28d1f895c6fe 176 * @}
mbed_official 340:28d1f895c6fe 177 */
mbed_official 340:28d1f895c6fe 178
mbed_official 340:28d1f895c6fe 179 /** @defgroup CRC_Default_InitValue_Use Indicates whether or not default init value is used
mbed_official 340:28d1f895c6fe 180 * @{
mbed_official 340:28d1f895c6fe 181 */
mbed_official 340:28d1f895c6fe 182 #define DEFAULT_INIT_VALUE_ENABLE ((uint8_t)0x00)
mbed_official 340:28d1f895c6fe 183 #define DEFAULT_INIT_VALUE_DISABLE ((uint8_t)0x01)
mbed_official 340:28d1f895c6fe 184
mbed_official 340:28d1f895c6fe 185 #define IS_DEFAULT_INIT_VALUE(VALUE) (((VALUE) == DEFAULT_INIT_VALUE_ENABLE) || \
mbed_official 340:28d1f895c6fe 186 ((VALUE) == DEFAULT_INIT_VALUE_DISABLE))
mbed_official 340:28d1f895c6fe 187 /**
mbed_official 340:28d1f895c6fe 188 * @}
mbed_official 340:28d1f895c6fe 189 */
mbed_official 340:28d1f895c6fe 190
mbed_official 340:28d1f895c6fe 191 /** @defgroup CRC_Input_Buffer_Format Input Buffer Format
mbed_official 340:28d1f895c6fe 192 * @{
mbed_official 340:28d1f895c6fe 193 */
mbed_official 340:28d1f895c6fe 194 /* WARNING: CRC_INPUT_FORMAT_UNDEFINED is created for reference purposes but
mbed_official 340:28d1f895c6fe 195 * an error is triggered in HAL_CRC_Init() if InputDataFormat field is set
mbed_official 340:28d1f895c6fe 196 * to CRC_INPUT_FORMAT_UNDEFINED: the format MUST be defined by the user for
mbed_official 340:28d1f895c6fe 197 * the CRC APIs to provide a correct result */
mbed_official 340:28d1f895c6fe 198 #define CRC_INPUTDATA_FORMAT_UNDEFINED ((uint32_t)0x00000000)
mbed_official 340:28d1f895c6fe 199 #define CRC_INPUTDATA_FORMAT_BYTES ((uint32_t)0x00000001)
mbed_official 340:28d1f895c6fe 200 #define CRC_INPUTDATA_FORMAT_HALFWORDS ((uint32_t)0x00000002)
mbed_official 340:28d1f895c6fe 201 #define CRC_INPUTDATA_FORMAT_WORDS ((uint32_t)0x00000003)
mbed_official 340:28d1f895c6fe 202
mbed_official 340:28d1f895c6fe 203 #define IS_CRC_INPUTDATA_FORMAT(FORMAT) (((FORMAT) == CRC_INPUTDATA_FORMAT_BYTES) || \
mbed_official 340:28d1f895c6fe 204 ((FORMAT) == CRC_INPUTDATA_FORMAT_HALFWORDS) || \
mbed_official 340:28d1f895c6fe 205 ((FORMAT) == CRC_INPUTDATA_FORMAT_WORDS))
mbed_official 340:28d1f895c6fe 206 /**
mbed_official 340:28d1f895c6fe 207 * @}
mbed_official 340:28d1f895c6fe 208 */
mbed_official 340:28d1f895c6fe 209
mbed_official 340:28d1f895c6fe 210 /**
mbed_official 340:28d1f895c6fe 211 * @}
mbed_official 340:28d1f895c6fe 212 */
mbed_official 340:28d1f895c6fe 213
mbed_official 340:28d1f895c6fe 214 /* Exported macros -----------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 215
mbed_official 340:28d1f895c6fe 216 /** @defgroup CRC_Exported_Macros CRC Exported Macros
mbed_official 340:28d1f895c6fe 217 * @{
mbed_official 340:28d1f895c6fe 218 */
mbed_official 340:28d1f895c6fe 219
mbed_official 340:28d1f895c6fe 220 /** @brief Reset CRC handle state
mbed_official 340:28d1f895c6fe 221 * @param __HANDLE__: CRC handle.
mbed_official 340:28d1f895c6fe 222 * @retval None
mbed_official 340:28d1f895c6fe 223 */
mbed_official 340:28d1f895c6fe 224 #define __HAL_CRC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_CRC_STATE_RESET)
mbed_official 340:28d1f895c6fe 225
mbed_official 340:28d1f895c6fe 226 /**
mbed_official 340:28d1f895c6fe 227 * @brief Reset CRC Data Register.
mbed_official 340:28d1f895c6fe 228 * @param __HANDLE__: CRC handle
mbed_official 340:28d1f895c6fe 229 * @retval None.
mbed_official 340:28d1f895c6fe 230 */
mbed_official 340:28d1f895c6fe 231 #define __HAL_CRC_DR_RESET(__HANDLE__) ((__HANDLE__)->Instance->CR |= CRC_CR_RESET)
mbed_official 340:28d1f895c6fe 232
mbed_official 340:28d1f895c6fe 233 /**
mbed_official 340:28d1f895c6fe 234 * @brief Set CRC INIT non-default value
mbed_official 340:28d1f895c6fe 235 * @param __HANDLE__ : CRC handle
mbed_official 340:28d1f895c6fe 236 * @param __INIT__ : 32-bit initial value
mbed_official 340:28d1f895c6fe 237 * @retval None.
mbed_official 340:28d1f895c6fe 238 */
mbed_official 340:28d1f895c6fe 239 #define __HAL_CRC_INITIALCRCVALUE_CONFIG(__HANDLE__, __INIT__) ((__HANDLE__)->Instance->INIT = (__INIT__))
mbed_official 340:28d1f895c6fe 240
mbed_official 340:28d1f895c6fe 241 /**
mbed_official 630:825f75ca301e 242 * @brief Stores a 8-bit data in the Independent Data(ID) register.
mbed_official 630:825f75ca301e 243 * @param __HANDLE__: CRC handle
mbed_official 630:825f75ca301e 244 * @param __VALUE__: 8-bit value to be stored in the ID register
mbed_official 630:825f75ca301e 245 * @retval None
mbed_official 630:825f75ca301e 246 */
mbed_official 630:825f75ca301e 247 #define __HAL_CRC_SET_IDR(__HANDLE__, __VALUE__) (WRITE_REG((__HANDLE__)->Instance->IDR, (__VALUE__)))
mbed_official 630:825f75ca301e 248
mbed_official 630:825f75ca301e 249 /**
mbed_official 630:825f75ca301e 250 * @brief Returns the 8-bit data stored in the Independent Data(ID) register.
mbed_official 630:825f75ca301e 251 * @param __HANDLE__: CRC handle
mbed_official 630:825f75ca301e 252 * @retval 8-bit value of the ID register
mbed_official 630:825f75ca301e 253 */
mbed_official 630:825f75ca301e 254 #define __HAL_CRC_GET_IDR(__HANDLE__) (((__HANDLE__)->Instance->IDR) & CRC_IDR_IDR)
mbed_official 630:825f75ca301e 255 /**
mbed_official 340:28d1f895c6fe 256 * @}
mbed_official 340:28d1f895c6fe 257 */
mbed_official 340:28d1f895c6fe 258
mbed_official 340:28d1f895c6fe 259
mbed_official 340:28d1f895c6fe 260 /* Include CRC HAL Extension module */
mbed_official 340:28d1f895c6fe 261 #include "stm32f0xx_hal_crc_ex.h"
mbed_official 340:28d1f895c6fe 262
mbed_official 340:28d1f895c6fe 263 /* Exported functions --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 264 /** @addtogroup CRC_Exported_Functions CRC Exported Functions
mbed_official 340:28d1f895c6fe 265 * @{
mbed_official 340:28d1f895c6fe 266 */
mbed_official 340:28d1f895c6fe 267
mbed_official 340:28d1f895c6fe 268 /** @addtogroup CRC_Exported_Functions_Group1 Initialization/de-initialization functions
mbed_official 340:28d1f895c6fe 269 * @brief Initialization and Configuration functions.
mbed_official 340:28d1f895c6fe 270 * @{
mbed_official 340:28d1f895c6fe 271 */
mbed_official 340:28d1f895c6fe 272
mbed_official 340:28d1f895c6fe 273 /* Initialization and de-initialization functions ****************************/
mbed_official 340:28d1f895c6fe 274 HAL_StatusTypeDef HAL_CRC_Init(CRC_HandleTypeDef *hcrc);
mbed_official 340:28d1f895c6fe 275 HAL_StatusTypeDef HAL_CRC_DeInit (CRC_HandleTypeDef *hcrc);
mbed_official 340:28d1f895c6fe 276 void HAL_CRC_MspInit(CRC_HandleTypeDef *hcrc);
mbed_official 340:28d1f895c6fe 277 void HAL_CRC_MspDeInit(CRC_HandleTypeDef *hcrc);
mbed_official 340:28d1f895c6fe 278 /**
mbed_official 340:28d1f895c6fe 279 * @}
mbed_official 340:28d1f895c6fe 280 */
mbed_official 340:28d1f895c6fe 281
mbed_official 340:28d1f895c6fe 282 /** @addtogroup CRC_Exported_Functions_Group2 Peripheral Control functions
mbed_official 340:28d1f895c6fe 283 * @brief management functions.
mbed_official 340:28d1f895c6fe 284 * @{
mbed_official 340:28d1f895c6fe 285 */
mbed_official 340:28d1f895c6fe 286
mbed_official 340:28d1f895c6fe 287 /* Peripheral Control functions ***********************************************/
mbed_official 340:28d1f895c6fe 288 uint32_t HAL_CRC_Accumulate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);
mbed_official 340:28d1f895c6fe 289 uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);
mbed_official 340:28d1f895c6fe 290 /**
mbed_official 340:28d1f895c6fe 291 * @}
mbed_official 340:28d1f895c6fe 292 */
mbed_official 340:28d1f895c6fe 293
mbed_official 340:28d1f895c6fe 294 /** @addtogroup CRC_Exported_Functions_Group3 Peripheral State functions
mbed_official 340:28d1f895c6fe 295 * @brief Peripheral State functions.
mbed_official 340:28d1f895c6fe 296 * @{
mbed_official 340:28d1f895c6fe 297 */
mbed_official 340:28d1f895c6fe 298 /* Peripheral State and Error functions ***************************************/
mbed_official 340:28d1f895c6fe 299 HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
mbed_official 340:28d1f895c6fe 300 /**
mbed_official 340:28d1f895c6fe 301 * @}
mbed_official 340:28d1f895c6fe 302 */
mbed_official 340:28d1f895c6fe 303
mbed_official 340:28d1f895c6fe 304 /**
mbed_official 340:28d1f895c6fe 305 * @}
mbed_official 340:28d1f895c6fe 306 */
mbed_official 340:28d1f895c6fe 307
mbed_official 340:28d1f895c6fe 308 /** @addtogroup CRC_Exported_Constants CRC Exported Constants
mbed_official 340:28d1f895c6fe 309 * @brief aliases for inter STM32 series compatibility
mbed_official 340:28d1f895c6fe 310 * @{
mbed_official 340:28d1f895c6fe 311 */
mbed_official 340:28d1f895c6fe 312 /** @defgroup CRC_Aliases Aliases for inter STM32 series compatibility
mbed_official 340:28d1f895c6fe 313 * @{
mbed_official 340:28d1f895c6fe 314 */
mbed_official 340:28d1f895c6fe 315 /* Aliases for inter STM32 series compatibility */
mbed_official 340:28d1f895c6fe 316 #define HAL_CRC_Input_Data_Reverse HAL_CRCEx_Input_Data_Reverse
mbed_official 340:28d1f895c6fe 317 #define HAL_CRC_Output_Data_Reverse HAL_CRCEx_Output_Data_Reverse
mbed_official 340:28d1f895c6fe 318 /**
mbed_official 340:28d1f895c6fe 319 * @}
mbed_official 340:28d1f895c6fe 320 */
mbed_official 340:28d1f895c6fe 321
mbed_official 340:28d1f895c6fe 322 /**
mbed_official 340:28d1f895c6fe 323 * @}
mbed_official 340:28d1f895c6fe 324 */
mbed_official 340:28d1f895c6fe 325
mbed_official 340:28d1f895c6fe 326 /**
mbed_official 340:28d1f895c6fe 327 * @}
mbed_official 340:28d1f895c6fe 328 */
mbed_official 340:28d1f895c6fe 329
mbed_official 340:28d1f895c6fe 330 /**
mbed_official 340:28d1f895c6fe 331 * @}
mbed_official 340:28d1f895c6fe 332 */
mbed_official 340:28d1f895c6fe 333
mbed_official 340:28d1f895c6fe 334 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 335 }
mbed_official 340:28d1f895c6fe 336 #endif
mbed_official 340:28d1f895c6fe 337
mbed_official 340:28d1f895c6fe 338 #endif /* __STM32F0xx_HAL_CRC_H */
mbed_official 340:28d1f895c6fe 339
mbed_official 340:28d1f895c6fe 340 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
mbed_official 340:28d1f895c6fe 341