STM32L443xx HAL User Manual
stm32l4xx_hal_flash_ex.h
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32l4xx_hal_flash_ex.h
00004   * @author  MCD Application Team
00005   * @brief   Header file of FLASH HAL Extended module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * Copyright (c) 2017 STMicroelectronics.
00010   * All rights reserved.
00011   *
00012   * This software is licensed under terms that can be found in the LICENSE file in
00013   * the root directory of this software component.
00014   * If no LICENSE file comes with this software, it is provided AS-IS.
00015   ******************************************************************************
00016   */
00017 
00018 /* Define to prevent recursive inclusion -------------------------------------*/
00019 #ifndef STM32L4xx_HAL_FLASH_EX_H
00020 #define STM32L4xx_HAL_FLASH_EX_H
00021 
00022 #ifdef __cplusplus
00023  extern "C" {
00024 #endif
00025 
00026 /* Includes ------------------------------------------------------------------*/
00027 #include "stm32l4xx_hal_def.h"
00028 
00029 /** @addtogroup STM32L4xx_HAL_Driver
00030   * @{
00031   */
00032 
00033 /** @addtogroup FLASHEx
00034   * @{
00035   */
00036 
00037 /* Exported types ------------------------------------------------------------*/
00038 
00039 /* Exported constants --------------------------------------------------------*/
00040 #if defined (FLASH_CFGR_LVEN)
00041 /** @addtogroup FLASHEx_Exported_Constants
00042   * @{
00043   */
00044 /** @defgroup FLASHEx_LVE_PIN_CFG FLASHEx LVE pin configuration
00045   * @{
00046   */
00047 #define FLASH_LVE_PIN_CTRL     0x00000000U       /*!< LVE FLASH pin controlled by power controller       */
00048 #define FLASH_LVE_PIN_FORCED   FLASH_CFGR_LVEN   /*!< LVE FLASH pin enforced to low (external SMPS used) */
00049 /**
00050   * @}
00051   */
00052 
00053 /**
00054   * @}
00055   */
00056 #endif /* FLASH_CFGR_LVEN */
00057 
00058 /* Exported macro ------------------------------------------------------------*/
00059 
00060 /* Exported functions --------------------------------------------------------*/
00061 /** @addtogroup FLASHEx_Exported_Functions
00062   * @{
00063   */
00064 
00065 /* Extended Program operation functions  *************************************/
00066 /** @addtogroup FLASHEx_Exported_Functions_Group1
00067   * @{
00068   */
00069 HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
00070 HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
00071 HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
00072 void              HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
00073 /**
00074   * @}
00075   */
00076 
00077 #if defined (FLASH_CFGR_LVEN)
00078 /** @addtogroup FLASHEx_Exported_Functions_Group2
00079   * @{
00080   */
00081 HAL_StatusTypeDef HAL_FLASHEx_ConfigLVEPin(uint32_t ConfigLVE);
00082 /**
00083   * @}
00084   */
00085 #endif /* FLASH_CFGR_LVEN */
00086 
00087 /**
00088   * @}
00089   */
00090 
00091 /* Private function ----------------------------------------------------------*/
00092 /** @addtogroup FLASHEx_Private_Functions FLASHEx Private Functions
00093  * @{
00094  */
00095 void FLASH_PageErase(uint32_t Page, uint32_t Banks);
00096 void FLASH_FlushCaches(void);
00097 /**
00098   * @}
00099   */
00100 
00101 /* Private macros ------------------------------------------------------------*/
00102 /**
00103   @cond 0
00104   */
00105 #if defined (FLASH_CFGR_LVEN)
00106 #define IS_FLASH_LVE_PIN(CFG)  (((CFG) == FLASH_LVE_PIN_CTRL) || ((CFG) == FLASH_LVE_PIN_FORCED))
00107 #endif /* FLASH_CFGR_LVEN */
00108 /**
00109   @endcond
00110   */
00111 
00112 /**
00113   * @}
00114   */
00115 
00116 /**
00117   * @}
00118   */
00119 
00120 #ifdef __cplusplus
00121 }
00122 #endif
00123 
00124 #endif /* STM32L4xx_HAL_FLASH_EX_H */
00125