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
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 108:34e6b704fe68 5 * @version V1.3.0
Kojto 108:34e6b704fe68 6 * @date 26-June-2015
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 108:34e6b704fe68 11 * <h2><center>&copy; COPYRIGHT(c) 2015 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 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 */
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 /**
Kojto 90:cb3d968589d8 87 * @brief FLASH Procedure structure definition
Kojto 90:cb3d968589d8 88 */
Kojto 90:cb3d968589d8 89 typedef enum
Kojto 90:cb3d968589d8 90 {
Kojto 90:cb3d968589d8 91 FLASH_PROC_NONE = 0,
Kojto 90:cb3d968589d8 92 FLASH_PROC_PAGEERASE = 1,
Kojto 90:cb3d968589d8 93 FLASH_PROC_MASSERASE = 2,
Kojto 90:cb3d968589d8 94 FLASH_PROC_PROGRAMHALFWORD = 3,
Kojto 90:cb3d968589d8 95 FLASH_PROC_PROGRAMWORD = 4,
Kojto 90:cb3d968589d8 96 FLASH_PROC_PROGRAMDOUBLEWORD = 5
Kojto 90:cb3d968589d8 97 } FLASH_ProcedureTypeDef;
Kojto 90:cb3d968589d8 98
Kojto 90:cb3d968589d8 99 /**
Kojto 90:cb3d968589d8 100 * @brief FLASH handle Structure definition
Kojto 90:cb3d968589d8 101 */
Kojto 90:cb3d968589d8 102 typedef struct
Kojto 90:cb3d968589d8 103 {
Kojto 93:e188a91d3eaa 104 __IO FLASH_ProcedureTypeDef ProcedureOnGoing; /*!< Internal variable to indicate which procedure is ongoing or not in IT context */
Kojto 90:cb3d968589d8 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 */
Kojto 90:cb3d968589d8 107
Kojto 93:e188a91d3eaa 108 __IO uint32_t Address; /*!< Internal variable to save address selected for program or erase */
Kojto 90:cb3d968589d8 109
Kojto 93:e188a91d3eaa 110 __IO uint64_t Data; /*!< Internal variable to save data to be programmed */
Kojto 90:cb3d968589d8 111
Kojto 93:e188a91d3eaa 112 HAL_LockTypeDef Lock; /*!< FLASH locking object */
Kojto 90:cb3d968589d8 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 */
Kojto 90:cb3d968589d8 116 } FLASH_ProcessTypeDef;
Kojto 90:cb3d968589d8 117
Kojto 90:cb3d968589d8 118 /**
Kojto 90:cb3d968589d8 119 * @}
Kojto 90:cb3d968589d8 120 */
Kojto 90:cb3d968589d8 121
Kojto 90:cb3d968589d8 122 /* Exported constants --------------------------------------------------------*/
Kojto 90:cb3d968589d8 123 /** @defgroup FLASH_Exported_Constants FLASH Exported Constants
Kojto 90:cb3d968589d8 124 * @{
Kojto 90:cb3d968589d8 125 */
Kojto 90:cb3d968589d8 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
Kojto 90:cb3d968589d8 135 /**
Kojto 90:cb3d968589d8 136 * @}
Kojto 90:cb3d968589d8 137 */
Kojto 90:cb3d968589d8 138
Kojto 90:cb3d968589d8 139 /** @defgroup FLASH_Type_Program FLASH Type Program
Kojto 90:cb3d968589d8 140 * @{
Kojto 90:cb3d968589d8 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*/
Kojto 90:cb3d968589d8 145
Kojto 90:cb3d968589d8 146 /**
Kojto 90:cb3d968589d8 147 * @}
Kojto 90:cb3d968589d8 148 */
Kojto 90:cb3d968589d8 149
Kojto 90:cb3d968589d8 150 /** @defgroup FLASH_Latency FLASH Latency
Kojto 90:cb3d968589d8 151 * @{
Kojto 90:cb3d968589d8 152 */
Kojto 90:cb3d968589d8 153 #define FLASH_LATENCY_0 ((uint32_t)0x00000000) /*!< FLASH Zero Latency cycle */
Kojto 90:cb3d968589d8 154 #define FLASH_LATENCY_1 FLASH_ACR_LATENCY /*!< FLASH One Latency cycle */
Kojto 90:cb3d968589d8 155
Kojto 90:cb3d968589d8 156 /**
Kojto 90:cb3d968589d8 157 * @}
Kojto 90:cb3d968589d8 158 */
Kojto 90:cb3d968589d8 159
Kojto 90:cb3d968589d8 160
Kojto 90:cb3d968589d8 161 /** @defgroup FLASH_Flag_definition FLASH Flag definition
Kojto 90:cb3d968589d8 162 * @{
Kojto 90:cb3d968589d8 163 */
Kojto 90:cb3d968589d8 164 #define FLASH_FLAG_BSY FLASH_SR_BSY /*!< FLASH Busy flag */
Kojto 90:cb3d968589d8 165 #define FLASH_FLAG_PGERR FLASH_SR_PGERR /*!< FLASH Programming error flag */
Kojto 90:cb3d968589d8 166 #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protected error flag */
Kojto 90:cb3d968589d8 167 #define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of Operation flag */
Kojto 90:cb3d968589d8 168 /**
Kojto 90:cb3d968589d8 169 * @}
Kojto 90:cb3d968589d8 170 */
Kojto 90:cb3d968589d8 171
Kojto 90:cb3d968589d8 172 /** @defgroup FLASH_Interrupt_definition FLASH Interrupt definition
Kojto 90:cb3d968589d8 173 * @{
Kojto 90:cb3d968589d8 174 */
Kojto 90:cb3d968589d8 175 #define FLASH_IT_EOP FLASH_CR_EOPIE /*!< End of FLASH Operation Interrupt source */
Kojto 90:cb3d968589d8 176 #define FLASH_IT_ERR FLASH_CR_ERRIE /*!< Error Interrupt source */
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
Kojto 90:cb3d968589d8 185 /* Exported macro ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 186
Kojto 90:cb3d968589d8 187 /** @defgroup FLASH_Exported_Macros FLASH Exported Macros
Kojto 90:cb3d968589d8 188 * @brief macros to control FLASH features
Kojto 90:cb3d968589d8 189 * @{
Kojto 90:cb3d968589d8 190 */
Kojto 108:34e6b704fe68 191
Kojto 90:cb3d968589d8 192 /** @defgroup FLASH_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 90:cb3d968589d8 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 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
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 90:cb3d968589d8 244 * @param __INTERRUPT__ : FLASH interrupt
Kojto 90:cb3d968589d8 245 * This parameter can be any combination of the following values:
Kojto 90:cb3d968589d8 246 * @arg FLASH_IT_EOP: End of FLASH Operation Interrupt
Kojto 90:cb3d968589d8 247 * @arg 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 90:cb3d968589d8 254 * @param __INTERRUPT__ : FLASH interrupt
Kojto 90:cb3d968589d8 255 * This parameter can be any combination of the following values:
Kojto 90:cb3d968589d8 256 * @arg FLASH_IT_EOP: End of FLASH Operation Interrupt
Kojto 90:cb3d968589d8 257 * @arg 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 90:cb3d968589d8 264 * @param __FLAG__: specifies the FLASH flag to check.
Kojto 90:cb3d968589d8 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
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 90:cb3d968589d8 276 * @param __FLAG__: specifies the FLASH flags to clear.
Kojto 90:cb3d968589d8 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
Kojto 90:cb3d968589d8 282 * @retval none
Kojto 90:cb3d968589d8 283 */
Kojto 108:34e6b704fe68 284 #define __HAL_FLASH_CLEAR_FLAG(__FLAG__) ((FLASH->SR) = (__FLAG__))
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 90:cb3d968589d8 292 */
Kojto 108:34e6b704fe68 293
Kojto 108:34e6b704fe68 294 /* Include FLASH HAL Extended module */
Kojto 90:cb3d968589d8 295 #include "stm32f0xx_hal_flash_ex.h"
Kojto 90:cb3d968589d8 296
Kojto 90:cb3d968589d8 297 /* Exported functions --------------------------------------------------------*/
Kojto 90:cb3d968589d8 298 /** @addtogroup FLASH_Exported_Functions
Kojto 90:cb3d968589d8 299 * @{
Kojto 108:34e6b704fe68 300 */
Kojto 90:cb3d968589d8 301
Kojto 108:34e6b704fe68 302 /** @addtogroup FLASH_Exported_Functions_Group1
Kojto 108:34e6b704fe68 303 * @{
Kojto 108:34e6b704fe68 304 */
Kojto 90:cb3d968589d8 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);
Kojto 90:cb3d968589d8 308
Kojto 90:cb3d968589d8 309 /* FLASH IRQ handler method */
Kojto 108:34e6b704fe68 310 void HAL_FLASH_IRQHandler(void);
Kojto 90:cb3d968589d8 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);
Kojto 90:cb3d968589d8 314
Kojto 90:cb3d968589d8 315 /**
Kojto 90:cb3d968589d8 316 * @}
Kojto 90:cb3d968589d8 317 */
Kojto 90:cb3d968589d8 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 */
Kojto 90:cb3d968589d8 336 /* Peripheral State and Error functions ***************************************/
Kojto 93:e188a91d3eaa 337 uint32_t HAL_FLASH_GetError(void);
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 90:cb3d968589d8 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
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 */
Kojto 90:cb3d968589d8 365
Kojto 90:cb3d968589d8 366 #ifdef __cplusplus
Kojto 90:cb3d968589d8 367 }
Kojto 90:cb3d968589d8 368 #endif
Kojto 90:cb3d968589d8 369
Kojto 90:cb3d968589d8 370 #endif /* __STM32F0xx_HAL_FLASH_H */
Kojto 90:cb3d968589d8 371
Kojto 90:cb3d968589d8 372 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Kojto 90:cb3d968589d8 373