mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Thu Aug 20 10:45:13 2015 +0100
Revision:
613:bc40b8d2aec4
Parent:
532:fe11edbda85c
Synchronized with git revision 92ca8c7b60a283b6bb60eb65b183dac1599f0ade

Full URL: https://github.com/mbedmicro/mbed/commit/92ca8c7b60a283b6bb60eb65b183dac1599f0ade/

Nordic: update application start address in GCC linker script

Who changed what in which revision?

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