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:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
108:34e6b704fe68
.

Who changed what in which revision?

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