You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

116 lines
3.3 KiB

  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>&copy; 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. /* Define to prevent recursive inclusion -------------------------------------*/
  20. #ifndef STM32WBxx_HAL_FLASH_EX_H
  21. #define STM32WBxx_HAL_FLASH_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32wbxx_hal_def.h"
  27. /** @addtogroup STM32WBxx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup FLASHEx
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* Exported constants --------------------------------------------------------*/
  35. /** @defgroup FLASHEx_Exported_Constants FLASH Exported Constants
  36. * @{
  37. */
  38. /** @defgroup FLASHEx_EMPTY_CHECK FLASHEx Empty Check
  39. * @{
  40. */
  41. #define FLASH_PROG_NOT_EMPTY 0x00000000U /*!< 1st location in Flash is programmed */
  42. #define FLASH_PROG_EMPTY FLASH_ACR_EMPTY /*!< 1st location in Flash is empty */
  43. /**
  44. * @}
  45. */
  46. /**
  47. * @}
  48. */
  49. /* Exported macro ------------------------------------------------------------*/
  50. /* Exported functions --------------------------------------------------------*/
  51. /** @addtogroup FLASHEx_Exported_Functions
  52. * @{
  53. */
  54. /* Extended Program operation functions *************************************/
  55. /** @addtogroup FLASHEx_Exported_Functions_Group1
  56. * @{
  57. */
  58. HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
  59. HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
  60. uint32_t HAL_FLASHEx_FlashEmptyCheck(void);
  61. void HAL_FLASHEx_ForceFlashEmpty(uint32_t FlashEmpty);
  62. HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
  63. void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
  64. void HAL_FLASHEx_SuspendOperation(void);
  65. void HAL_FLASHEx_AllowOperation(void);
  66. uint32_t HAL_FLASHEx_IsOperationSuspended(void);
  67. /**
  68. * @}
  69. */
  70. /**
  71. * @}
  72. */
  73. /* Private macros ------------------------------------------------------------*/
  74. /** @defgroup FLASHEx_Private_Macros FLASHEx Private Macros
  75. * @{
  76. */
  77. #define IS_FLASH_EMPTY_CHECK(__VALUE__) (((__VALUE__) == FLASH_PROG_EMPTY) || ((__VALUE__) == FLASH_PROG_NOT_EMPTY))
  78. /**
  79. * @}
  80. */
  81. /* Private Functions ---------------------------------------------------------*/
  82. /** @defgroup FLASHEx_Private_Functions FLASHEx Private Functions
  83. * @{
  84. */
  85. void FLASH_PageErase(uint32_t Page);
  86. /**
  87. * @}
  88. */
  89. /**
  90. * @}
  91. */
  92. /**
  93. * @}
  94. */
  95. #ifdef __cplusplus
  96. }
  97. #endif
  98. #endif /* STM32WBxx_HAL_FLASH_EX_H */
  99. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/