mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
108:34e6b704fe68
Release 122 of the mbed library

Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 90:cb3d968589d8 1 /**
Kojto 90:cb3d968589d8 2 ******************************************************************************
Kojto 90:cb3d968589d8 3 * @file stm32f0xx_hal_flash.h
Kojto 90:cb3d968589d8 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.4.0
Kojto 122:f9eeca106725 6 * @date 27-May-2016
Kojto 90:cb3d968589d8 7 * @brief Header file of Flash HAL module.
Kojto 90:cb3d968589d8 8 ******************************************************************************
Kojto 90:cb3d968589d8 9 * @attention
Kojto 90:cb3d968589d8 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 90:cb3d968589d8 12 *
Kojto 90:cb3d968589d8 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 90:cb3d968589d8 14 * are permitted provided that the following conditions are met:
Kojto 90:cb3d968589d8 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 90:cb3d968589d8 16 * this list of conditions and the following disclaimer.
Kojto 90:cb3d968589d8 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 90:cb3d968589d8 18 * this list of conditions and the following disclaimer in the documentation
Kojto 90:cb3d968589d8 19 * and/or other materials provided with the distribution.
Kojto 90:cb3d968589d8 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 90:cb3d968589d8 21 * may be used to endorse or promote products derived from this software
Kojto 90:cb3d968589d8 22 * without specific prior written permission.
Kojto 90:cb3d968589d8 23 *
Kojto 90:cb3d968589d8 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 90:cb3d968589d8 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 90:cb3d968589d8 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 90:cb3d968589d8 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 90:cb3d968589d8 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 90:cb3d968589d8 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 90:cb3d968589d8 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 90:cb3d968589d8 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 90:cb3d968589d8 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 90:cb3d968589d8 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 90:cb3d968589d8 34 *
Kojto 90:cb3d968589d8 35 ******************************************************************************
Kojto 90:cb3d968589d8 36 */
Kojto 90:cb3d968589d8 37
Kojto 90:cb3d968589d8 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 90:cb3d968589d8 39 #ifndef __STM32F0xx_HAL_FLASH_H
Kojto 90:cb3d968589d8 40 #define __STM32F0xx_HAL_FLASH_H
Kojto 90:cb3d968589d8 41
Kojto 90:cb3d968589d8 42 #ifdef __cplusplus
Kojto 90:cb3d968589d8 43 extern "C" {
Kojto 90:cb3d968589d8 44 #endif
Kojto 90:cb3d968589d8 45
Kojto 90:cb3d968589d8 46 /* Includes ------------------------------------------------------------------*/
Kojto 90:cb3d968589d8 47 #include "stm32f0xx_hal_def.h"
Kojto 108:34e6b704fe68 48
Kojto 90:cb3d968589d8 49 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 90:cb3d968589d8 50 * @{
Kojto 90:cb3d968589d8 51 */
Kojto 90:cb3d968589d8 52
Kojto 90:cb3d968589d8 53 /** @addtogroup FLASH
Kojto 90:cb3d968589d8 54 * @{
Kojto 108:34e6b704fe68 55 */
Kojto 108:34e6b704fe68 56
Kojto 108:34e6b704fe68 57 /** @addtogroup FLASH_Private_Constants
Kojto 108:34e6b704fe68 58 * @{
Kojto 108:34e6b704fe68 59 */
Kojto 122:f9eeca106725 60 #define FLASH_TIMEOUT_VALUE ((uint32_t)50000U) /* 50 s */
Kojto 108:34e6b704fe68 61 /**
Kojto 108:34e6b704fe68 62 * @}
Kojto 108:34e6b704fe68 63 */
Kojto 108:34e6b704fe68 64
Kojto 108:34e6b704fe68 65 /** @addtogroup FLASH_Private_Macros
Kojto 108:34e6b704fe68 66 * @{
Kojto 108:34e6b704fe68 67 */
Kojto 108:34e6b704fe68 68
Kojto 108:34e6b704fe68 69 #define IS_FLASH_TYPEPROGRAM(VALUE) (((VALUE) == FLASH_TYPEPROGRAM_HALFWORD) || \
Kojto 108:34e6b704fe68 70 ((VALUE) == FLASH_TYPEPROGRAM_WORD) || \
Kojto 108:34e6b704fe68 71 ((VALUE) == FLASH_TYPEPROGRAM_DOUBLEWORD))
Kojto 108:34e6b704fe68 72
Kojto 108:34e6b704fe68 73 #define IS_FLASH_LATENCY(__LATENCY__) (((__LATENCY__) == FLASH_LATENCY_0) || \
Kojto 108:34e6b704fe68 74 ((__LATENCY__) == FLASH_LATENCY_1))
Kojto 108:34e6b704fe68 75
Kojto 108:34e6b704fe68 76 /**
Kojto 108:34e6b704fe68 77 * @}
Kojto 108:34e6b704fe68 78 */
Kojto 90:cb3d968589d8 79
Kojto 90:cb3d968589d8 80 /* Exported types ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 81 /** @defgroup FLASH_Exported_Types FLASH Exported Types
Kojto 90:cb3d968589d8 82 * @{
Kojto 90:cb3d968589d8 83 */
Kojto 90:cb3d968589d8 84
Kojto 90:cb3d968589d8 85 /**
Kojto 90:cb3d968589d8 86 * @brief FLASH Procedure structure definition
Kojto 90:cb3d968589d8 87 */
Kojto 90:cb3d968589d8 88 typedef enum
Kojto 90:cb3d968589d8 89 {
Kojto 90:cb3d968589d8 90 FLASH_PROC_NONE = 0,
Kojto 90:cb3d968589d8 91 FLASH_PROC_PAGEERASE = 1,
Kojto 90:cb3d968589d8 92 FLASH_PROC_MASSERASE = 2,
Kojto 90:cb3d968589d8 93 FLASH_PROC_PROGRAMHALFWORD = 3,
Kojto 90:cb3d968589d8 94 FLASH_PROC_PROGRAMWORD = 4,
Kojto 90:cb3d968589d8 95 FLASH_PROC_PROGRAMDOUBLEWORD = 5
Kojto 90:cb3d968589d8 96 } FLASH_ProcedureTypeDef;
Kojto 90:cb3d968589d8 97
Kojto 90:cb3d968589d8 98 /**
Kojto 90:cb3d968589d8 99 * @brief FLASH handle Structure definition
Kojto 90:cb3d968589d8 100 */
Kojto 90:cb3d968589d8 101 typedef struct
Kojto 90:cb3d968589d8 102 {
Kojto 93:e188a91d3eaa 103 __IO FLASH_ProcedureTypeDef ProcedureOnGoing; /*!< Internal variable to indicate which procedure is ongoing or not in IT context */
Kojto 90:cb3d968589d8 104
Kojto 93:e188a91d3eaa 105 __IO uint32_t DataRemaining; /*!< Internal variable to save the remaining pages to erase or half-word to program in IT context */
Kojto 122:f9eeca106725 106
Kojto 93:e188a91d3eaa 107 __IO uint32_t Address; /*!< Internal variable to save address selected for program or erase */
Kojto 122:f9eeca106725 108
Kojto 93:e188a91d3eaa 109 __IO uint64_t Data; /*!< Internal variable to save data to be programmed */
Kojto 90:cb3d968589d8 110
Kojto 93:e188a91d3eaa 111 HAL_LockTypeDef Lock; /*!< FLASH locking object */
Kojto 90:cb3d968589d8 112
Kojto 93:e188a91d3eaa 113 __IO uint32_t ErrorCode; /*!< FLASH error code
Kojto 108:34e6b704fe68 114 This parameter can be a value of @ref FLASH_Error_Codes */
Kojto 90:cb3d968589d8 115 } FLASH_ProcessTypeDef;
Kojto 90:cb3d968589d8 116
Kojto 90:cb3d968589d8 117 /**
Kojto 90:cb3d968589d8 118 * @}
Kojto 90:cb3d968589d8 119 */
Kojto 90:cb3d968589d8 120
Kojto 90:cb3d968589d8 121 /* Exported constants --------------------------------------------------------*/
Kojto 90:cb3d968589d8 122 /** @defgroup FLASH_Exported_Constants FLASH Exported Constants
Kojto 90:cb3d968589d8 123 * @{
Kojto 90:cb3d968589d8 124 */
Kojto 90:cb3d968589d8 125
Kojto 108:34e6b704fe68 126 /** @defgroup FLASH_Error_Codes FLASH Error Codes
Kojto 93:e188a91d3eaa 127 * @{
Kojto 93:e188a91d3eaa 128 */
Kojto 122:f9eeca106725 129
Kojto 122:f9eeca106725 130 #define HAL_FLASH_ERROR_NONE 0x00U /*!< No error */
Kojto 122:f9eeca106725 131 #define HAL_FLASH_ERROR_PROG 0x01U /*!< Programming error */
Kojto 122:f9eeca106725 132 #define HAL_FLASH_ERROR_WRP 0x02U /*!< Write protection error */
Kojto 93:e188a91d3eaa 133
Kojto 90:cb3d968589d8 134 /**
Kojto 90:cb3d968589d8 135 * @}
Kojto 90:cb3d968589d8 136 */
Kojto 90:cb3d968589d8 137
Kojto 90:cb3d968589d8 138 /** @defgroup FLASH_Type_Program FLASH Type Program
Kojto 90:cb3d968589d8 139 * @{
Kojto 90:cb3d968589d8 140 */
Kojto 122:f9eeca106725 141 #define FLASH_TYPEPROGRAM_HALFWORD ((uint32_t)0x01U) /*!<Program a half-word (16-bit) at a specified address.*/
Kojto 122:f9eeca106725 142 #define FLASH_TYPEPROGRAM_WORD ((uint32_t)0x02U) /*!<Program a word (32-bit) at a specified address.*/
Kojto 122:f9eeca106725 143 #define FLASH_TYPEPROGRAM_DOUBLEWORD ((uint32_t)0x03U) /*!<Program a double word (64-bit) at a specified address*/
Kojto 90:cb3d968589d8 144
Kojto 90:cb3d968589d8 145 /**
Kojto 90:cb3d968589d8 146 * @}
Kojto 90:cb3d968589d8 147 */
Kojto 90:cb3d968589d8 148
Kojto 90:cb3d968589d8 149 /** @defgroup FLASH_Latency FLASH Latency
Kojto 90:cb3d968589d8 150 * @{
Kojto 90:cb3d968589d8 151 */
Kojto 122:f9eeca106725 152 #define FLASH_LATENCY_0 ((uint32_t)0x00000000U) /*!< FLASH Zero Latency cycle */
Kojto 90:cb3d968589d8 153 #define FLASH_LATENCY_1 FLASH_ACR_LATENCY /*!< FLASH One Latency cycle */
Kojto 90:cb3d968589d8 154
Kojto 90:cb3d968589d8 155 /**
Kojto 90:cb3d968589d8 156 * @}
Kojto 122:f9eeca106725 157 */
Kojto 90:cb3d968589d8 158
Kojto 90:cb3d968589d8 159
Kojto 90:cb3d968589d8 160 /** @defgroup FLASH_Flag_definition FLASH Flag definition
Kojto 90:cb3d968589d8 161 * @{
Kojto 90:cb3d968589d8 162 */
Kojto 90:cb3d968589d8 163 #define FLASH_FLAG_BSY FLASH_SR_BSY /*!< FLASH Busy flag */
Kojto 90:cb3d968589d8 164 #define FLASH_FLAG_PGERR FLASH_SR_PGERR /*!< FLASH Programming error flag */
Kojto 90:cb3d968589d8 165 #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protected error flag */
Kojto 90:cb3d968589d8 166 #define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of Operation flag */
Kojto 90:cb3d968589d8 167 /**
Kojto 90:cb3d968589d8 168 * @}
Kojto 90:cb3d968589d8 169 */
Kojto 90:cb3d968589d8 170
Kojto 90:cb3d968589d8 171 /** @defgroup FLASH_Interrupt_definition FLASH Interrupt definition
Kojto 90:cb3d968589d8 172 * @{
Kojto 90:cb3d968589d8 173 */
Kojto 90:cb3d968589d8 174 #define FLASH_IT_EOP FLASH_CR_EOPIE /*!< End of FLASH Operation Interrupt source */
Kojto 90:cb3d968589d8 175 #define FLASH_IT_ERR FLASH_CR_ERRIE /*!< Error Interrupt source */
Kojto 90:cb3d968589d8 176 /**
Kojto 90:cb3d968589d8 177 * @}
Kojto 90:cb3d968589d8 178 */
Kojto 90:cb3d968589d8 179
Kojto 90:cb3d968589d8 180 /**
Kojto 90:cb3d968589d8 181 * @}
Kojto 90:cb3d968589d8 182 */
Kojto 90:cb3d968589d8 183
Kojto 90:cb3d968589d8 184 /* Exported macro ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 185
Kojto 90:cb3d968589d8 186 /** @defgroup FLASH_Exported_Macros FLASH Exported Macros
Kojto 90:cb3d968589d8 187 * @brief macros to control FLASH features
Kojto 90:cb3d968589d8 188 * @{
Kojto 90:cb3d968589d8 189 */
Kojto 108:34e6b704fe68 190
Kojto 122:f9eeca106725 191
Kojto 122:f9eeca106725 192 /** @defgroup FLASH_EM_Latency FLASH Latency
Kojto 90:cb3d968589d8 193 * @brief macros to handle FLASH Latency
Kojto 90:cb3d968589d8 194 * @{
Kojto 90:cb3d968589d8 195 */
Kojto 90:cb3d968589d8 196
Kojto 90:cb3d968589d8 197 /**
Kojto 90:cb3d968589d8 198 * @brief Set the FLASH Latency.
Kojto 122:f9eeca106725 199 * @param __LATENCY__ FLASH Latency
Kojto 90:cb3d968589d8 200 * The value of this parameter depend on device used within the same series
Kojto 90:cb3d968589d8 201 * @retval None
Kojto 90:cb3d968589d8 202 */
Kojto 90:cb3d968589d8 203 #define __HAL_FLASH_SET_LATENCY(__LATENCY__) (FLASH->ACR = (FLASH->ACR&(~FLASH_ACR_LATENCY)) | (__LATENCY__))
Kojto 108:34e6b704fe68 204
Kojto 108:34e6b704fe68 205
Kojto 108:34e6b704fe68 206 /**
Kojto 108:34e6b704fe68 207 * @brief Get the FLASH Latency.
Kojto 108:34e6b704fe68 208 * @retval FLASH Latency
Kojto 122:f9eeca106725 209 * The value of this parameter depend on device used within the same series
Kojto 108:34e6b704fe68 210 */
Kojto 108:34e6b704fe68 211 #define __HAL_FLASH_GET_LATENCY() (READ_BIT((FLASH->ACR), FLASH_ACR_LATENCY))
Kojto 108:34e6b704fe68 212
Kojto 90:cb3d968589d8 213 /**
Kojto 90:cb3d968589d8 214 * @}
Kojto 90:cb3d968589d8 215 */
Kojto 90:cb3d968589d8 216
Kojto 90:cb3d968589d8 217 /** @defgroup FLASH_Prefetch FLASH Prefetch
Kojto 90:cb3d968589d8 218 * @brief macros to handle FLASH Prefetch buffer
Kojto 90:cb3d968589d8 219 * @{
Kojto 90:cb3d968589d8 220 */
Kojto 90:cb3d968589d8 221 /**
Kojto 90:cb3d968589d8 222 * @brief Enable the FLASH prefetch buffer.
Kojto 90:cb3d968589d8 223 * @retval None
Kojto 90:cb3d968589d8 224 */
Kojto 90:cb3d968589d8 225 #define __HAL_FLASH_PREFETCH_BUFFER_ENABLE() (FLASH->ACR |= FLASH_ACR_PRFTBE)
Kojto 90:cb3d968589d8 226
Kojto 90:cb3d968589d8 227 /**
Kojto 90:cb3d968589d8 228 * @brief Disable the FLASH prefetch buffer.
Kojto 90:cb3d968589d8 229 * @retval None
Kojto 90:cb3d968589d8 230 */
Kojto 90:cb3d968589d8 231 #define __HAL_FLASH_PREFETCH_BUFFER_DISABLE() (FLASH->ACR &= (~FLASH_ACR_PRFTBE))
Kojto 90:cb3d968589d8 232
Kojto 90:cb3d968589d8 233 /**
Kojto 90:cb3d968589d8 234 * @}
Kojto 90:cb3d968589d8 235 */
Kojto 108:34e6b704fe68 236
Kojto 108:34e6b704fe68 237 /** @defgroup FLASH_Interrupt FLASH Interrupts
Kojto 90:cb3d968589d8 238 * @brief macros to handle FLASH interrupts
Kojto 90:cb3d968589d8 239 * @{
Kojto 90:cb3d968589d8 240 */
Kojto 90:cb3d968589d8 241
Kojto 90:cb3d968589d8 242 /**
Kojto 90:cb3d968589d8 243 * @brief Enable the specified FLASH interrupt.
Kojto 122:f9eeca106725 244 * @param __INTERRUPT__ FLASH interrupt
Kojto 90:cb3d968589d8 245 * This parameter can be any combination of the following values:
Kojto 122:f9eeca106725 246 * @arg @ref FLASH_IT_EOP End of FLASH Operation Interrupt
Kojto 122:f9eeca106725 247 * @arg @ref FLASH_IT_ERR Error Interrupt
Kojto 90:cb3d968589d8 248 * @retval none
Kojto 90:cb3d968589d8 249 */
Kojto 108:34e6b704fe68 250 #define __HAL_FLASH_ENABLE_IT(__INTERRUPT__) SET_BIT((FLASH->CR), (__INTERRUPT__))
Kojto 90:cb3d968589d8 251
Kojto 90:cb3d968589d8 252 /**
Kojto 90:cb3d968589d8 253 * @brief Disable the specified FLASH interrupt.
Kojto 122:f9eeca106725 254 * @param __INTERRUPT__ FLASH interrupt
Kojto 90:cb3d968589d8 255 * This parameter can be any combination of the following values:
Kojto 122:f9eeca106725 256 * @arg @ref FLASH_IT_EOP End of FLASH Operation Interrupt
Kojto 122:f9eeca106725 257 * @arg @ref FLASH_IT_ERR Error Interrupt
Kojto 90:cb3d968589d8 258 * @retval none
Kojto 90:cb3d968589d8 259 */
Kojto 108:34e6b704fe68 260 #define __HAL_FLASH_DISABLE_IT(__INTERRUPT__) CLEAR_BIT((FLASH->CR), (uint32_t)(__INTERRUPT__))
Kojto 90:cb3d968589d8 261
Kojto 90:cb3d968589d8 262 /**
Kojto 90:cb3d968589d8 263 * @brief Get the specified FLASH flag status.
Kojto 122:f9eeca106725 264 * @param __FLAG__ specifies the FLASH flag to check.
Kojto 90:cb3d968589d8 265 * This parameter can be one of the following values:
Kojto 122:f9eeca106725 266 * @arg @ref FLASH_FLAG_BSY FLASH Busy flag
Kojto 122:f9eeca106725 267 * @arg @ref FLASH_FLAG_EOP FLASH End of Operation flag
Kojto 122:f9eeca106725 268 * @arg @ref FLASH_FLAG_WRPERR FLASH Write protected error flag
Kojto 122:f9eeca106725 269 * @arg @ref FLASH_FLAG_PGERR FLASH Programming error flag
Kojto 90:cb3d968589d8 270 * @retval The new state of __FLAG__ (SET or RESET).
Kojto 90:cb3d968589d8 271 */
Kojto 108:34e6b704fe68 272 #define __HAL_FLASH_GET_FLAG(__FLAG__) (((FLASH->SR) & (__FLAG__)) == (__FLAG__))
Kojto 90:cb3d968589d8 273
Kojto 90:cb3d968589d8 274 /**
Kojto 90:cb3d968589d8 275 * @brief Clear the specified FLASH flag.
Kojto 122:f9eeca106725 276 * @param __FLAG__ specifies the FLASH flags to clear.
Kojto 90:cb3d968589d8 277 * This parameter can be any combination of the following values:
Kojto 122:f9eeca106725 278 * @arg @ref FLASH_FLAG_EOP FLASH End of Operation flag
Kojto 122:f9eeca106725 279 * @arg @ref FLASH_FLAG_WRPERR FLASH Write protected error flag
Kojto 122:f9eeca106725 280 * @arg @ref FLASH_FLAG_PGERR FLASH Programming error flag
Kojto 90:cb3d968589d8 281 * @retval none
Kojto 90:cb3d968589d8 282 */
Kojto 108:34e6b704fe68 283 #define __HAL_FLASH_CLEAR_FLAG(__FLAG__) ((FLASH->SR) = (__FLAG__))
Kojto 90:cb3d968589d8 284
Kojto 90:cb3d968589d8 285 /**
Kojto 90:cb3d968589d8 286 * @}
Kojto 90:cb3d968589d8 287 */
Kojto 90:cb3d968589d8 288
Kojto 90:cb3d968589d8 289 /**
Kojto 90:cb3d968589d8 290 * @}
Kojto 90:cb3d968589d8 291 */
Kojto 108:34e6b704fe68 292
Kojto 108:34e6b704fe68 293 /* Include FLASH HAL Extended module */
Kojto 90:cb3d968589d8 294 #include "stm32f0xx_hal_flash_ex.h"
Kojto 90:cb3d968589d8 295
Kojto 90:cb3d968589d8 296 /* Exported functions --------------------------------------------------------*/
Kojto 90:cb3d968589d8 297 /** @addtogroup FLASH_Exported_Functions
Kojto 90:cb3d968589d8 298 * @{
Kojto 108:34e6b704fe68 299 */
Kojto 90:cb3d968589d8 300
Kojto 108:34e6b704fe68 301 /** @addtogroup FLASH_Exported_Functions_Group1
Kojto 108:34e6b704fe68 302 * @{
Kojto 108:34e6b704fe68 303 */
Kojto 90:cb3d968589d8 304 /* IO operation functions *****************************************************/
Kojto 108:34e6b704fe68 305 HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data);
Kojto 108:34e6b704fe68 306 HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data);
Kojto 90:cb3d968589d8 307
Kojto 122:f9eeca106725 308 /* FLASH IRQ handler function */
Kojto 108:34e6b704fe68 309 void HAL_FLASH_IRQHandler(void);
Kojto 90:cb3d968589d8 310 /* Callbacks in non blocking modes */
Kojto 108:34e6b704fe68 311 void HAL_FLASH_EndOfOperationCallback(uint32_t ReturnValue);
Kojto 108:34e6b704fe68 312 void HAL_FLASH_OperationErrorCallback(uint32_t ReturnValue);
Kojto 90:cb3d968589d8 313
Kojto 90:cb3d968589d8 314 /**
Kojto 90:cb3d968589d8 315 * @}
Kojto 90:cb3d968589d8 316 */
Kojto 90:cb3d968589d8 317
Kojto 108:34e6b704fe68 318 /** @addtogroup FLASH_Exported_Functions_Group2
Kojto 108:34e6b704fe68 319 * @{
Kojto 108:34e6b704fe68 320 */
Kojto 108:34e6b704fe68 321 /* Peripheral Control functions ***********************************************/
Kojto 108:34e6b704fe68 322 HAL_StatusTypeDef HAL_FLASH_Unlock(void);
Kojto 108:34e6b704fe68 323 HAL_StatusTypeDef HAL_FLASH_Lock(void);
Kojto 108:34e6b704fe68 324 HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void);
Kojto 108:34e6b704fe68 325 HAL_StatusTypeDef HAL_FLASH_OB_Lock(void);
Kojto 108:34e6b704fe68 326 HAL_StatusTypeDef HAL_FLASH_OB_Launch(void);
Kojto 108:34e6b704fe68 327
Kojto 108:34e6b704fe68 328 /**
Kojto 108:34e6b704fe68 329 * @}
Kojto 108:34e6b704fe68 330 */
Kojto 108:34e6b704fe68 331
Kojto 108:34e6b704fe68 332 /** @addtogroup FLASH_Exported_Functions_Group3
Kojto 108:34e6b704fe68 333 * @{
Kojto 108:34e6b704fe68 334 */
Kojto 90:cb3d968589d8 335 /* Peripheral State and Error functions ***************************************/
Kojto 93:e188a91d3eaa 336 uint32_t HAL_FLASH_GetError(void);
Kojto 90:cb3d968589d8 337
Kojto 90:cb3d968589d8 338 /**
Kojto 90:cb3d968589d8 339 * @}
Kojto 90:cb3d968589d8 340 */
Kojto 90:cb3d968589d8 341
Kojto 90:cb3d968589d8 342 /**
Kojto 90:cb3d968589d8 343 * @}
Kojto 90:cb3d968589d8 344 */
Kojto 90:cb3d968589d8 345
Kojto 108:34e6b704fe68 346 /* Private function -------------------------------------------------*/
Kojto 108:34e6b704fe68 347 /** @addtogroup FLASH_Private_Functions
Kojto 108:34e6b704fe68 348 * @{
Kojto 108:34e6b704fe68 349 */
Kojto 108:34e6b704fe68 350 HAL_StatusTypeDef FLASH_WaitForLastOperation(uint32_t Timeout);
Kojto 108:34e6b704fe68 351
Kojto 108:34e6b704fe68 352 /**
Kojto 108:34e6b704fe68 353 * @}
Kojto 108:34e6b704fe68 354 */
Kojto 108:34e6b704fe68 355
Kojto 90:cb3d968589d8 356 /**
Kojto 90:cb3d968589d8 357 * @}
Kojto 90:cb3d968589d8 358 */
Kojto 90:cb3d968589d8 359
Kojto 90:cb3d968589d8 360 /**
Kojto 90:cb3d968589d8 361 * @}
Kojto 90:cb3d968589d8 362 */
Kojto 90:cb3d968589d8 363
Kojto 90:cb3d968589d8 364 #ifdef __cplusplus
Kojto 90:cb3d968589d8 365 }
Kojto 90:cb3d968589d8 366 #endif
Kojto 90:cb3d968589d8 367
Kojto 90:cb3d968589d8 368 #endif /* __STM32F0xx_HAL_FLASH_H */
Kojto 90:cb3d968589d8 369
Kojto 90:cb3d968589d8 370 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Kojto 90:cb3d968589d8 371