Einstein Filho
/
MANGUEBAJA2019_BOX
Mangue Baja Box
mbed/TARGET_NUCLEO_F103RB/stm32f10x_pwr.h@0:0dee8840a1c0, 2019-07-29 (annotated)
- Committer:
- einsteingustavo
- Date:
- Mon Jul 29 20:38:00 2019 +0000
- Revision:
- 0:0dee8840a1c0
Mangue Baja Box
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
einsteingustavo | 0:0dee8840a1c0 | 1 | /** |
einsteingustavo | 0:0dee8840a1c0 | 2 | ****************************************************************************** |
einsteingustavo | 0:0dee8840a1c0 | 3 | * @file stm32f10x_pwr.h |
einsteingustavo | 0:0dee8840a1c0 | 4 | * @author MCD Application Team |
einsteingustavo | 0:0dee8840a1c0 | 5 | * @version V3.6.1 |
einsteingustavo | 0:0dee8840a1c0 | 6 | * @date 05-March-2012 |
einsteingustavo | 0:0dee8840a1c0 | 7 | * @brief This file contains all the functions prototypes for the PWR firmware |
einsteingustavo | 0:0dee8840a1c0 | 8 | * library. |
einsteingustavo | 0:0dee8840a1c0 | 9 | ******************************************************************************* |
einsteingustavo | 0:0dee8840a1c0 | 10 | * Copyright (c) 2014, STMicroelectronics |
einsteingustavo | 0:0dee8840a1c0 | 11 | * All rights reserved. |
einsteingustavo | 0:0dee8840a1c0 | 12 | * |
einsteingustavo | 0:0dee8840a1c0 | 13 | * Redistribution and use in source and binary forms, with or without |
einsteingustavo | 0:0dee8840a1c0 | 14 | * modification, are permitted provided that the following conditions are met: |
einsteingustavo | 0:0dee8840a1c0 | 15 | * |
einsteingustavo | 0:0dee8840a1c0 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
einsteingustavo | 0:0dee8840a1c0 | 17 | * this list of conditions and the following disclaimer. |
einsteingustavo | 0:0dee8840a1c0 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
einsteingustavo | 0:0dee8840a1c0 | 19 | * this list of conditions and the following disclaimer in the documentation |
einsteingustavo | 0:0dee8840a1c0 | 20 | * and/or other materials provided with the distribution. |
einsteingustavo | 0:0dee8840a1c0 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
einsteingustavo | 0:0dee8840a1c0 | 22 | * may be used to endorse or promote products derived from this software |
einsteingustavo | 0:0dee8840a1c0 | 23 | * without specific prior written permission. |
einsteingustavo | 0:0dee8840a1c0 | 24 | * |
einsteingustavo | 0:0dee8840a1c0 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
einsteingustavo | 0:0dee8840a1c0 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
einsteingustavo | 0:0dee8840a1c0 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
einsteingustavo | 0:0dee8840a1c0 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
einsteingustavo | 0:0dee8840a1c0 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
einsteingustavo | 0:0dee8840a1c0 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
einsteingustavo | 0:0dee8840a1c0 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
einsteingustavo | 0:0dee8840a1c0 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
einsteingustavo | 0:0dee8840a1c0 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
einsteingustavo | 0:0dee8840a1c0 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
einsteingustavo | 0:0dee8840a1c0 | 35 | ******************************************************************************* |
einsteingustavo | 0:0dee8840a1c0 | 36 | */ |
einsteingustavo | 0:0dee8840a1c0 | 37 | |
einsteingustavo | 0:0dee8840a1c0 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
einsteingustavo | 0:0dee8840a1c0 | 39 | #ifndef __STM32F10x_PWR_H |
einsteingustavo | 0:0dee8840a1c0 | 40 | #define __STM32F10x_PWR_H |
einsteingustavo | 0:0dee8840a1c0 | 41 | |
einsteingustavo | 0:0dee8840a1c0 | 42 | #ifdef __cplusplus |
einsteingustavo | 0:0dee8840a1c0 | 43 | extern "C" { |
einsteingustavo | 0:0dee8840a1c0 | 44 | #endif |
einsteingustavo | 0:0dee8840a1c0 | 45 | |
einsteingustavo | 0:0dee8840a1c0 | 46 | /* Includes ------------------------------------------------------------------*/ |
einsteingustavo | 0:0dee8840a1c0 | 47 | #include "stm32f10x.h" |
einsteingustavo | 0:0dee8840a1c0 | 48 | |
einsteingustavo | 0:0dee8840a1c0 | 49 | /** @addtogroup STM32F10x_StdPeriph_Driver |
einsteingustavo | 0:0dee8840a1c0 | 50 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 51 | */ |
einsteingustavo | 0:0dee8840a1c0 | 52 | |
einsteingustavo | 0:0dee8840a1c0 | 53 | /** @addtogroup PWR |
einsteingustavo | 0:0dee8840a1c0 | 54 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 55 | */ |
einsteingustavo | 0:0dee8840a1c0 | 56 | |
einsteingustavo | 0:0dee8840a1c0 | 57 | /** @defgroup PWR_Exported_Types |
einsteingustavo | 0:0dee8840a1c0 | 58 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 59 | */ |
einsteingustavo | 0:0dee8840a1c0 | 60 | |
einsteingustavo | 0:0dee8840a1c0 | 61 | /** |
einsteingustavo | 0:0dee8840a1c0 | 62 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 63 | */ |
einsteingustavo | 0:0dee8840a1c0 | 64 | |
einsteingustavo | 0:0dee8840a1c0 | 65 | /** @defgroup PWR_Exported_Constants |
einsteingustavo | 0:0dee8840a1c0 | 66 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 67 | */ |
einsteingustavo | 0:0dee8840a1c0 | 68 | |
einsteingustavo | 0:0dee8840a1c0 | 69 | /** @defgroup PVD_detection_level |
einsteingustavo | 0:0dee8840a1c0 | 70 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 71 | */ |
einsteingustavo | 0:0dee8840a1c0 | 72 | |
einsteingustavo | 0:0dee8840a1c0 | 73 | #define PWR_PVDLevel_2V2 ((uint32_t)0x00000000) |
einsteingustavo | 0:0dee8840a1c0 | 74 | #define PWR_PVDLevel_2V3 ((uint32_t)0x00000020) |
einsteingustavo | 0:0dee8840a1c0 | 75 | #define PWR_PVDLevel_2V4 ((uint32_t)0x00000040) |
einsteingustavo | 0:0dee8840a1c0 | 76 | #define PWR_PVDLevel_2V5 ((uint32_t)0x00000060) |
einsteingustavo | 0:0dee8840a1c0 | 77 | #define PWR_PVDLevel_2V6 ((uint32_t)0x00000080) |
einsteingustavo | 0:0dee8840a1c0 | 78 | #define PWR_PVDLevel_2V7 ((uint32_t)0x000000A0) |
einsteingustavo | 0:0dee8840a1c0 | 79 | #define PWR_PVDLevel_2V8 ((uint32_t)0x000000C0) |
einsteingustavo | 0:0dee8840a1c0 | 80 | #define PWR_PVDLevel_2V9 ((uint32_t)0x000000E0) |
einsteingustavo | 0:0dee8840a1c0 | 81 | #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \ |
einsteingustavo | 0:0dee8840a1c0 | 82 | ((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \ |
einsteingustavo | 0:0dee8840a1c0 | 83 | ((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \ |
einsteingustavo | 0:0dee8840a1c0 | 84 | ((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9)) |
einsteingustavo | 0:0dee8840a1c0 | 85 | /** |
einsteingustavo | 0:0dee8840a1c0 | 86 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 87 | */ |
einsteingustavo | 0:0dee8840a1c0 | 88 | |
einsteingustavo | 0:0dee8840a1c0 | 89 | /** @defgroup Regulator_state_is_STOP_mode |
einsteingustavo | 0:0dee8840a1c0 | 90 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 91 | */ |
einsteingustavo | 0:0dee8840a1c0 | 92 | |
einsteingustavo | 0:0dee8840a1c0 | 93 | #define PWR_Regulator_ON ((uint32_t)0x00000000) |
einsteingustavo | 0:0dee8840a1c0 | 94 | #define PWR_Regulator_LowPower ((uint32_t)0x00000001) |
einsteingustavo | 0:0dee8840a1c0 | 95 | #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \ |
einsteingustavo | 0:0dee8840a1c0 | 96 | ((REGULATOR) == PWR_Regulator_LowPower)) |
einsteingustavo | 0:0dee8840a1c0 | 97 | /** |
einsteingustavo | 0:0dee8840a1c0 | 98 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 99 | */ |
einsteingustavo | 0:0dee8840a1c0 | 100 | |
einsteingustavo | 0:0dee8840a1c0 | 101 | /** @defgroup STOP_mode_entry |
einsteingustavo | 0:0dee8840a1c0 | 102 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 103 | */ |
einsteingustavo | 0:0dee8840a1c0 | 104 | |
einsteingustavo | 0:0dee8840a1c0 | 105 | #define PWR_STOPEntry_WFI ((uint8_t)0x01) |
einsteingustavo | 0:0dee8840a1c0 | 106 | #define PWR_STOPEntry_WFE ((uint8_t)0x02) |
einsteingustavo | 0:0dee8840a1c0 | 107 | #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE)) |
einsteingustavo | 0:0dee8840a1c0 | 108 | |
einsteingustavo | 0:0dee8840a1c0 | 109 | /** |
einsteingustavo | 0:0dee8840a1c0 | 110 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 111 | */ |
einsteingustavo | 0:0dee8840a1c0 | 112 | |
einsteingustavo | 0:0dee8840a1c0 | 113 | /** @defgroup PWR_Flag |
einsteingustavo | 0:0dee8840a1c0 | 114 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 115 | */ |
einsteingustavo | 0:0dee8840a1c0 | 116 | |
einsteingustavo | 0:0dee8840a1c0 | 117 | #define PWR_FLAG_WU ((uint32_t)0x00000001) |
einsteingustavo | 0:0dee8840a1c0 | 118 | #define PWR_FLAG_SB ((uint32_t)0x00000002) |
einsteingustavo | 0:0dee8840a1c0 | 119 | #define PWR_FLAG_PVDO ((uint32_t)0x00000004) |
einsteingustavo | 0:0dee8840a1c0 | 120 | #define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \ |
einsteingustavo | 0:0dee8840a1c0 | 121 | ((FLAG) == PWR_FLAG_PVDO)) |
einsteingustavo | 0:0dee8840a1c0 | 122 | |
einsteingustavo | 0:0dee8840a1c0 | 123 | #define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB)) |
einsteingustavo | 0:0dee8840a1c0 | 124 | /** |
einsteingustavo | 0:0dee8840a1c0 | 125 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 126 | */ |
einsteingustavo | 0:0dee8840a1c0 | 127 | |
einsteingustavo | 0:0dee8840a1c0 | 128 | /** |
einsteingustavo | 0:0dee8840a1c0 | 129 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 130 | */ |
einsteingustavo | 0:0dee8840a1c0 | 131 | |
einsteingustavo | 0:0dee8840a1c0 | 132 | /** @defgroup PWR_Exported_Macros |
einsteingustavo | 0:0dee8840a1c0 | 133 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 134 | */ |
einsteingustavo | 0:0dee8840a1c0 | 135 | |
einsteingustavo | 0:0dee8840a1c0 | 136 | /** |
einsteingustavo | 0:0dee8840a1c0 | 137 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 138 | */ |
einsteingustavo | 0:0dee8840a1c0 | 139 | |
einsteingustavo | 0:0dee8840a1c0 | 140 | /** @defgroup PWR_Exported_Functions |
einsteingustavo | 0:0dee8840a1c0 | 141 | * @{ |
einsteingustavo | 0:0dee8840a1c0 | 142 | */ |
einsteingustavo | 0:0dee8840a1c0 | 143 | |
einsteingustavo | 0:0dee8840a1c0 | 144 | void PWR_DeInit(void); |
einsteingustavo | 0:0dee8840a1c0 | 145 | void PWR_BackupAccessCmd(FunctionalState NewState); |
einsteingustavo | 0:0dee8840a1c0 | 146 | void PWR_PVDCmd(FunctionalState NewState); |
einsteingustavo | 0:0dee8840a1c0 | 147 | void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel); |
einsteingustavo | 0:0dee8840a1c0 | 148 | void PWR_WakeUpPinCmd(FunctionalState NewState); |
einsteingustavo | 0:0dee8840a1c0 | 149 | void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry); |
einsteingustavo | 0:0dee8840a1c0 | 150 | void PWR_EnterSTANDBYMode(void); |
einsteingustavo | 0:0dee8840a1c0 | 151 | FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG); |
einsteingustavo | 0:0dee8840a1c0 | 152 | void PWR_ClearFlag(uint32_t PWR_FLAG); |
einsteingustavo | 0:0dee8840a1c0 | 153 | |
einsteingustavo | 0:0dee8840a1c0 | 154 | #ifdef __cplusplus |
einsteingustavo | 0:0dee8840a1c0 | 155 | } |
einsteingustavo | 0:0dee8840a1c0 | 156 | #endif |
einsteingustavo | 0:0dee8840a1c0 | 157 | |
einsteingustavo | 0:0dee8840a1c0 | 158 | #endif /* __STM32F10x_PWR_H */ |
einsteingustavo | 0:0dee8840a1c0 | 159 | /** |
einsteingustavo | 0:0dee8840a1c0 | 160 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 161 | */ |
einsteingustavo | 0:0dee8840a1c0 | 162 | |
einsteingustavo | 0:0dee8840a1c0 | 163 | /** |
einsteingustavo | 0:0dee8840a1c0 | 164 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 165 | */ |
einsteingustavo | 0:0dee8840a1c0 | 166 | |
einsteingustavo | 0:0dee8840a1c0 | 167 | /** |
einsteingustavo | 0:0dee8840a1c0 | 168 | * @} |
einsteingustavo | 0:0dee8840a1c0 | 169 | */ |
einsteingustavo | 0:0dee8840a1c0 | 170 | |
einsteingustavo | 0:0dee8840a1c0 | 171 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
einsteingustavo | 0:0dee8840a1c0 | 172 |