2 ******************************************************************************
\r
3 * @file stm32l4xx_hal_flash_ex.h
\r
4 * @author MCD Application Team
\r
5 * @brief Header file of FLASH HAL Extended module.
\r
6 ******************************************************************************
\r
9 * <h2><center>© Copyright (c) 2017 STMicroelectronics.
\r
10 * All rights reserved.</center></h2>
\r
12 * This software component is licensed by ST under BSD 3-Clause license,
\r
13 * the "License"; You may not use this file except in compliance with the
\r
14 * License. You may obtain a copy of the License at:
\r
15 * opensource.org/licenses/BSD-3-Clause
\r
17 ******************************************************************************
\r
20 /* Define to prevent recursive inclusion -------------------------------------*/
\r
21 #ifndef __STM32L4xx_HAL_FLASH_EX_H
\r
22 #define __STM32L4xx_HAL_FLASH_EX_H
\r
28 /* Includes ------------------------------------------------------------------*/
\r
29 #include "stm32l4xx_hal_def.h"
\r
31 /** @addtogroup STM32L4xx_HAL_Driver
\r
35 /** @addtogroup FLASHEx
\r
39 /* Exported types ------------------------------------------------------------*/
\r
41 /* Exported constants --------------------------------------------------------*/
\r
42 #if defined (FLASH_CFGR_LVEN)
\r
43 /** @addtogroup FLASHEx_Exported_Constants
\r
46 /** @defgroup FLASHEx_LVE_PIN_CFG FLASHEx LVE pin configuration
\r
49 #define FLASH_LVE_PIN_CTRL 0x00000000U /*!< LVE FLASH pin controlled by power controller */
\r
50 #define FLASH_LVE_PIN_FORCED FLASH_CFGR_LVEN /*!< LVE FLASH pin enforced to low (external SMPS used) */
\r
58 #endif /* FLASH_CFGR_LVEN */
\r
60 /* Exported macro ------------------------------------------------------------*/
\r
62 /* Exported functions --------------------------------------------------------*/
\r
63 /** @addtogroup FLASHEx_Exported_Functions
\r
67 /* Extended Program operation functions *************************************/
\r
68 /** @addtogroup FLASHEx_Exported_Functions_Group1
\r
71 HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
\r
72 HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
\r
73 HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
\r
74 void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
\r
79 #if defined (FLASH_CFGR_LVEN)
\r
80 /** @addtogroup FLASHEx_Exported_Functions_Group2
\r
83 HAL_StatusTypeDef HAL_FLASHEx_ConfigLVEPin(uint32_t ConfigLVE);
\r
87 #endif /* FLASH_CFGR_LVEN */
\r
93 /* Private function ----------------------------------------------------------*/
\r
94 /** @addtogroup FLASHEx_Private_Functions FLASHEx Private Functions
\r
97 void FLASH_PageErase(uint32_t Page, uint32_t Banks);
\r
98 void FLASH_FlushCaches(void);
\r
103 /* Private macros ------------------------------------------------------------*/
\r
107 #if defined (FLASH_CFGR_LVEN)
\r
108 #define IS_FLASH_LVE_PIN(CFG) (((CFG) == FLASH_LVE_PIN_CTRL) || ((CFG) == FLASH_LVE_PIN_FORCED))
\r
109 #endif /* FLASH_CFGR_LVEN */
\r
126 #endif /* __STM32L4xx_HAL_FLASH_EX_H */
\r
128 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
\r