stm32l4xx_hal_flash_ex.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /**
  2. ******************************************************************************
  3. * @file stm32l4xx_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>&copy; Copyright (c) 2017 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. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef __STM32L4xx_HAL_FLASH_EX_H
  21. #define __STM32L4xx_HAL_FLASH_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32l4xx_hal_def.h"
  27. /** @addtogroup STM32L4xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup FLASHEx
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* Exported constants --------------------------------------------------------*/
  35. #if defined (FLASH_CFGR_LVEN)
  36. /** @addtogroup FLASHEx_Exported_Constants
  37. * @{
  38. */
  39. /** @defgroup FLASHEx_LVE_PIN_CFG FLASHEx LVE pin configuration
  40. * @{
  41. */
  42. #define FLASH_LVE_PIN_CTRL 0x00000000U /*!< LVE FLASH pin controlled by power controller */
  43. #define FLASH_LVE_PIN_FORCED FLASH_CFGR_LVEN /*!< LVE FLASH pin enforced to low (external SMPS used) */
  44. /**
  45. * @}
  46. */
  47. /**
  48. * @}
  49. */
  50. #endif /* FLASH_CFGR_LVEN */
  51. /* Exported macro ------------------------------------------------------------*/
  52. /* Exported functions --------------------------------------------------------*/
  53. /** @addtogroup FLASHEx_Exported_Functions
  54. * @{
  55. */
  56. /* Extended Program operation functions *************************************/
  57. /** @addtogroup FLASHEx_Exported_Functions_Group1
  58. * @{
  59. */
  60. HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
  61. HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
  62. HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
  63. void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
  64. /**
  65. * @}
  66. */
  67. #if defined (FLASH_CFGR_LVEN)
  68. /** @addtogroup FLASHEx_Exported_Functions_Group2
  69. * @{
  70. */
  71. HAL_StatusTypeDef HAL_FLASHEx_ConfigLVEPin(uint32_t ConfigLVE);
  72. /**
  73. * @}
  74. */
  75. #endif /* FLASH_CFGR_LVEN */
  76. /**
  77. * @}
  78. */
  79. /* Private function ----------------------------------------------------------*/
  80. /** @addtogroup FLASHEx_Private_Functions FLASHEx Private Functions
  81. * @{
  82. */
  83. void FLASH_PageErase(uint32_t Page, uint32_t Banks);
  84. void FLASH_FlushCaches(void);
  85. /**
  86. * @}
  87. */
  88. /* Private macros ------------------------------------------------------------*/
  89. /**
  90. @cond 0
  91. */
  92. #if defined (FLASH_CFGR_LVEN)
  93. #define IS_FLASH_LVE_PIN(CFG) (((CFG) == FLASH_LVE_PIN_CTRL) || ((CFG) == FLASH_LVE_PIN_FORCED))
  94. #endif /* FLASH_CFGR_LVEN */
  95. /**
  96. @endcond
  97. */
  98. /**
  99. * @}
  100. */
  101. /**
  102. * @}
  103. */
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif /* __STM32L4xx_HAL_FLASH_EX_H */
  108. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/