Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Wed Nov 25 13:21:40 2015 +0000
Revision:
110:165afa46840b
Release 110  of the mbed library

Changes:
- new platforms - STM32F410R, DISCO_F429ZI, DISCO_F469NI
- Nucleo L476 - gcc and uvision template
- k22,k64f targets - ADC channels A addition
- EFM32 - bugfixes in sleep, serial and spi
- Delta DFCM NNN40 - pinnames update

Who changed what in which revision?

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