stm32f2xx_hal_pwr_ex.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /**
  2. ******************************************************************************
  3. * @file stm32f2xx_hal_pwr_ex.h
  4. * @author MCD Application Team
  5. * @brief Header file of PWR HAL Extension 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 __STM32F2xx_HAL_PWR_EX_H
  21. #define __STM32F2xx_HAL_PWR_EX_H
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32f2xx_hal_def.h"
  27. /** @addtogroup STM32F2xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup PWREx
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* Exported constants --------------------------------------------------------*/
  35. /** @defgroup PWREx_Exported_Constants PWR Exported Constants
  36. * @{
  37. */
  38. /**
  39. * @}
  40. */
  41. /* Exported macro ------------------------------------------------------------*/
  42. /** @defgroup PWREx_Exported_Constants PWR Exported Constants
  43. * @{
  44. */
  45. /**
  46. * @}
  47. */
  48. /* Exported functions --------------------------------------------------------*/
  49. /** @addtogroup PWREx_Exported_Functions PWR Exported Functions
  50. * @{
  51. */
  52. /** @addtogroup PWREx_Exported_Functions_Group1
  53. * @{
  54. */
  55. void HAL_PWREx_EnableFlashPowerDown(void);
  56. void HAL_PWREx_DisableFlashPowerDown(void);
  57. HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void);
  58. HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void);
  59. /**
  60. * @}
  61. */
  62. /**
  63. * @}
  64. */
  65. /* Private types -------------------------------------------------------------*/
  66. /* Private variables ---------------------------------------------------------*/
  67. /* Private constants ---------------------------------------------------------*/
  68. /** @defgroup PWREx_Private_Constants PWR Private Constants
  69. * @{
  70. */
  71. /** @defgroup PWREx_register_alias_address PWR Register alias address
  72. * @{
  73. */
  74. /* ------------- PWR registers bit address in the alias region ---------------*/
  75. /* --- CR Register ---*/
  76. /* Alias word address of FPDS bit */
  77. #define FPDS_BIT_NUMBER POSITION_VAL(PWR_CR_FPDS)
  78. #define CR_FPDS_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (FPDS_BIT_NUMBER * 4U))
  79. /**
  80. * @}
  81. */
  82. /** @defgroup PWREx_CSR_register_alias PWR CSR Register alias address
  83. * @{
  84. */
  85. /* --- CSR Register ---*/
  86. /* Alias word address of BRE bit */
  87. #define BRE_BIT_NUMBER POSITION_VAL(PWR_CSR_BRE)
  88. #define CSR_BRE_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (BRE_BIT_NUMBER * 4U))
  89. /**
  90. * @}
  91. */
  92. /**
  93. * @}
  94. */
  95. /* Private macros ------------------------------------------------------------*/
  96. /** @defgroup PWREx_Private_Macros PWR Private Macros
  97. * @{
  98. */
  99. /** @defgroup PWREx_IS_PWR_Definitions PWR Private macros to check input parameters
  100. * @{
  101. */
  102. /**
  103. * @}
  104. */
  105. /**
  106. * @}
  107. */
  108. /**
  109. * @}
  110. */
  111. /**
  112. * @}
  113. */
  114. #ifdef __cplusplus
  115. }
  116. #endif
  117. #endif /* __STM32F2xx_HAL_PWR_EX_H */
  118. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/