1 /** 2 ****************************************************************************** 3 * @file stm32wbxx_hal_flash_ex.h 4 * @author MCD Application Team 5 * @brief Header file of FLASH HAL Extended module. 6 ****************************************************************************** 7 * @attention 8 * 9 * <h2><center>© Copyright (c) 2019 STMicroelectronics. 10 * All rights reserved.</center></h2> 11 * 12 * This software component is licensed by ST under BSD 3-Clause license, 13 * the "License"; You may not use this file except in compliance with the 14 * License. You may obtain a copy of the License at: 15 * opensource.org/licenses/BSD-3-Clause 16 * 17 ****************************************************************************** 18 */ 19 20 /* Define to prevent recursive inclusion -------------------------------------*/ 21 #ifndef STM32WBxx_HAL_FLASH_EX_H 22 #define STM32WBxx_HAL_FLASH_EX_H 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 /* Includes ------------------------------------------------------------------*/ 29 #include "stm32wbxx_hal_def.h" 30 31 /** @addtogroup STM32WBxx_HAL_Driver 32 * @{ 33 */ 34 35 /** @addtogroup FLASHEx 36 * @{ 37 */ 38 39 /* Exported types ------------------------------------------------------------*/ 40 /* Exported constants --------------------------------------------------------*/ 41 /** @defgroup FLASHEx_Exported_Constants FLASH Exported Constants 42 * @{ 43 */ 44 /** @defgroup FLASHEx_EMPTY_CHECK FLASHEx Empty Check 45 * @{ 46 */ 47 #define FLASH_PROG_NOT_EMPTY 0x00000000U /*!< 1st location in Flash is programmed */ 48 #define FLASH_PROG_EMPTY FLASH_ACR_EMPTY /*!< 1st location in Flash is empty */ 49 /** 50 * @} 51 */ 52 /** 53 * @} 54 */ 55 56 /* Exported macro ------------------------------------------------------------*/ 57 /* Exported functions --------------------------------------------------------*/ 58 /** @addtogroup FLASHEx_Exported_Functions 59 * @{ 60 */ 61 62 /* Extended Program operation functions *************************************/ 63 /** @addtogroup FLASHEx_Exported_Functions_Group1 64 * @{ 65 */ 66 HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError); 67 HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit); 68 uint32_t HAL_FLASHEx_FlashEmptyCheck(void); 69 void HAL_FLASHEx_ForceFlashEmpty(uint32_t FlashEmpty); 70 HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit); 71 void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit); 72 void HAL_FLASHEx_SuspendOperation(void); 73 void HAL_FLASHEx_AllowOperation(void); 74 uint32_t HAL_FLASHEx_IsOperationSuspended(void); 75 /** 76 * @} 77 */ 78 79 /** 80 * @} 81 */ 82 83 /* Private macros ------------------------------------------------------------*/ 84 /** @defgroup FLASHEx_Private_Macros FLASHEx Private Macros 85 * @{ 86 */ 87 #define IS_FLASH_EMPTY_CHECK(__VALUE__) (((__VALUE__) == FLASH_PROG_EMPTY) || ((__VALUE__) == FLASH_PROG_NOT_EMPTY)) 88 /** 89 * @} 90 */ 91 92 /* Private Functions ---------------------------------------------------------*/ 93 /** @defgroup FLASHEx_Private_Functions FLASHEx Private Functions 94 * @{ 95 */ 96 void FLASH_PageErase(uint32_t Page); 97 /** 98 * @} 99 */ 100 101 /** 102 * @} 103 */ 104 105 /** 106 * @} 107 */ 108 109 #ifdef __cplusplus 110 } 111 #endif 112 113 #endif /* STM32WBxx_HAL_FLASH_EX_H */ 114 115 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 116