mbed library sources modified for open wear
Dependents: openwear-lifelogger-example
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F103RB/stm32f10x_pwr.h@52:a51c77007319, 2013-12-02 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Dec 02 11:30:05 2013 +0000
- Revision:
- 52:a51c77007319
- Child:
- 70:c1fbde68b492
Synchronized with git revision 49df530ae72ce97ccc773d1f2c13b38e868e6abd
Full URL: https://github.com/mbedmicro/mbed/commit/49df530ae72ce97ccc773d1f2c13b38e868e6abd/
Add STMicroelectronics NUCLEO_F103RB target
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 52:a51c77007319 | 1 | /** |
mbed_official | 52:a51c77007319 | 2 | ****************************************************************************** |
mbed_official | 52:a51c77007319 | 3 | * @file stm32f10x_pwr.h |
mbed_official | 52:a51c77007319 | 4 | * @author MCD Application Team |
mbed_official | 52:a51c77007319 | 5 | * @version V3.5.0 |
mbed_official | 52:a51c77007319 | 6 | * @date 11-March-2011 |
mbed_official | 52:a51c77007319 | 7 | * @brief This file contains all the functions prototypes for the PWR firmware |
mbed_official | 52:a51c77007319 | 8 | * library. |
mbed_official | 52:a51c77007319 | 9 | ****************************************************************************** |
mbed_official | 52:a51c77007319 | 10 | * @attention |
mbed_official | 52:a51c77007319 | 11 | * |
mbed_official | 52:a51c77007319 | 12 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
mbed_official | 52:a51c77007319 | 13 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE |
mbed_official | 52:a51c77007319 | 14 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY |
mbed_official | 52:a51c77007319 | 15 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING |
mbed_official | 52:a51c77007319 | 16 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE |
mbed_official | 52:a51c77007319 | 17 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
mbed_official | 52:a51c77007319 | 18 | * |
mbed_official | 52:a51c77007319 | 19 | * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2> |
mbed_official | 52:a51c77007319 | 20 | ****************************************************************************** |
mbed_official | 52:a51c77007319 | 21 | */ |
mbed_official | 52:a51c77007319 | 22 | |
mbed_official | 52:a51c77007319 | 23 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 52:a51c77007319 | 24 | #ifndef __STM32F10x_PWR_H |
mbed_official | 52:a51c77007319 | 25 | #define __STM32F10x_PWR_H |
mbed_official | 52:a51c77007319 | 26 | |
mbed_official | 52:a51c77007319 | 27 | #ifdef __cplusplus |
mbed_official | 52:a51c77007319 | 28 | extern "C" { |
mbed_official | 52:a51c77007319 | 29 | #endif |
mbed_official | 52:a51c77007319 | 30 | |
mbed_official | 52:a51c77007319 | 31 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 52:a51c77007319 | 32 | #include "stm32f10x.h" |
mbed_official | 52:a51c77007319 | 33 | |
mbed_official | 52:a51c77007319 | 34 | /** @addtogroup STM32F10x_StdPeriph_Driver |
mbed_official | 52:a51c77007319 | 35 | * @{ |
mbed_official | 52:a51c77007319 | 36 | */ |
mbed_official | 52:a51c77007319 | 37 | |
mbed_official | 52:a51c77007319 | 38 | /** @addtogroup PWR |
mbed_official | 52:a51c77007319 | 39 | * @{ |
mbed_official | 52:a51c77007319 | 40 | */ |
mbed_official | 52:a51c77007319 | 41 | |
mbed_official | 52:a51c77007319 | 42 | /** @defgroup PWR_Exported_Types |
mbed_official | 52:a51c77007319 | 43 | * @{ |
mbed_official | 52:a51c77007319 | 44 | */ |
mbed_official | 52:a51c77007319 | 45 | |
mbed_official | 52:a51c77007319 | 46 | /** |
mbed_official | 52:a51c77007319 | 47 | * @} |
mbed_official | 52:a51c77007319 | 48 | */ |
mbed_official | 52:a51c77007319 | 49 | |
mbed_official | 52:a51c77007319 | 50 | /** @defgroup PWR_Exported_Constants |
mbed_official | 52:a51c77007319 | 51 | * @{ |
mbed_official | 52:a51c77007319 | 52 | */ |
mbed_official | 52:a51c77007319 | 53 | |
mbed_official | 52:a51c77007319 | 54 | /** @defgroup PVD_detection_level |
mbed_official | 52:a51c77007319 | 55 | * @{ |
mbed_official | 52:a51c77007319 | 56 | */ |
mbed_official | 52:a51c77007319 | 57 | |
mbed_official | 52:a51c77007319 | 58 | #define PWR_PVDLevel_2V2 ((uint32_t)0x00000000) |
mbed_official | 52:a51c77007319 | 59 | #define PWR_PVDLevel_2V3 ((uint32_t)0x00000020) |
mbed_official | 52:a51c77007319 | 60 | #define PWR_PVDLevel_2V4 ((uint32_t)0x00000040) |
mbed_official | 52:a51c77007319 | 61 | #define PWR_PVDLevel_2V5 ((uint32_t)0x00000060) |
mbed_official | 52:a51c77007319 | 62 | #define PWR_PVDLevel_2V6 ((uint32_t)0x00000080) |
mbed_official | 52:a51c77007319 | 63 | #define PWR_PVDLevel_2V7 ((uint32_t)0x000000A0) |
mbed_official | 52:a51c77007319 | 64 | #define PWR_PVDLevel_2V8 ((uint32_t)0x000000C0) |
mbed_official | 52:a51c77007319 | 65 | #define PWR_PVDLevel_2V9 ((uint32_t)0x000000E0) |
mbed_official | 52:a51c77007319 | 66 | #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLevel_2V2) || ((LEVEL) == PWR_PVDLevel_2V3)|| \ |
mbed_official | 52:a51c77007319 | 67 | ((LEVEL) == PWR_PVDLevel_2V4) || ((LEVEL) == PWR_PVDLevel_2V5)|| \ |
mbed_official | 52:a51c77007319 | 68 | ((LEVEL) == PWR_PVDLevel_2V6) || ((LEVEL) == PWR_PVDLevel_2V7)|| \ |
mbed_official | 52:a51c77007319 | 69 | ((LEVEL) == PWR_PVDLevel_2V8) || ((LEVEL) == PWR_PVDLevel_2V9)) |
mbed_official | 52:a51c77007319 | 70 | /** |
mbed_official | 52:a51c77007319 | 71 | * @} |
mbed_official | 52:a51c77007319 | 72 | */ |
mbed_official | 52:a51c77007319 | 73 | |
mbed_official | 52:a51c77007319 | 74 | /** @defgroup Regulator_state_is_STOP_mode |
mbed_official | 52:a51c77007319 | 75 | * @{ |
mbed_official | 52:a51c77007319 | 76 | */ |
mbed_official | 52:a51c77007319 | 77 | |
mbed_official | 52:a51c77007319 | 78 | #define PWR_Regulator_ON ((uint32_t)0x00000000) |
mbed_official | 52:a51c77007319 | 79 | #define PWR_Regulator_LowPower ((uint32_t)0x00000001) |
mbed_official | 52:a51c77007319 | 80 | #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_Regulator_ON) || \ |
mbed_official | 52:a51c77007319 | 81 | ((REGULATOR) == PWR_Regulator_LowPower)) |
mbed_official | 52:a51c77007319 | 82 | /** |
mbed_official | 52:a51c77007319 | 83 | * @} |
mbed_official | 52:a51c77007319 | 84 | */ |
mbed_official | 52:a51c77007319 | 85 | |
mbed_official | 52:a51c77007319 | 86 | /** @defgroup STOP_mode_entry |
mbed_official | 52:a51c77007319 | 87 | * @{ |
mbed_official | 52:a51c77007319 | 88 | */ |
mbed_official | 52:a51c77007319 | 89 | |
mbed_official | 52:a51c77007319 | 90 | #define PWR_STOPEntry_WFI ((uint8_t)0x01) |
mbed_official | 52:a51c77007319 | 91 | #define PWR_STOPEntry_WFE ((uint8_t)0x02) |
mbed_official | 52:a51c77007319 | 92 | #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPEntry_WFI) || ((ENTRY) == PWR_STOPEntry_WFE)) |
mbed_official | 52:a51c77007319 | 93 | |
mbed_official | 52:a51c77007319 | 94 | /** |
mbed_official | 52:a51c77007319 | 95 | * @} |
mbed_official | 52:a51c77007319 | 96 | */ |
mbed_official | 52:a51c77007319 | 97 | |
mbed_official | 52:a51c77007319 | 98 | /** @defgroup PWR_Flag |
mbed_official | 52:a51c77007319 | 99 | * @{ |
mbed_official | 52:a51c77007319 | 100 | */ |
mbed_official | 52:a51c77007319 | 101 | |
mbed_official | 52:a51c77007319 | 102 | #define PWR_FLAG_WU ((uint32_t)0x00000001) |
mbed_official | 52:a51c77007319 | 103 | #define PWR_FLAG_SB ((uint32_t)0x00000002) |
mbed_official | 52:a51c77007319 | 104 | #define PWR_FLAG_PVDO ((uint32_t)0x00000004) |
mbed_official | 52:a51c77007319 | 105 | #define IS_PWR_GET_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB) || \ |
mbed_official | 52:a51c77007319 | 106 | ((FLAG) == PWR_FLAG_PVDO)) |
mbed_official | 52:a51c77007319 | 107 | |
mbed_official | 52:a51c77007319 | 108 | #define IS_PWR_CLEAR_FLAG(FLAG) (((FLAG) == PWR_FLAG_WU) || ((FLAG) == PWR_FLAG_SB)) |
mbed_official | 52:a51c77007319 | 109 | /** |
mbed_official | 52:a51c77007319 | 110 | * @} |
mbed_official | 52:a51c77007319 | 111 | */ |
mbed_official | 52:a51c77007319 | 112 | |
mbed_official | 52:a51c77007319 | 113 | /** |
mbed_official | 52:a51c77007319 | 114 | * @} |
mbed_official | 52:a51c77007319 | 115 | */ |
mbed_official | 52:a51c77007319 | 116 | |
mbed_official | 52:a51c77007319 | 117 | /** @defgroup PWR_Exported_Macros |
mbed_official | 52:a51c77007319 | 118 | * @{ |
mbed_official | 52:a51c77007319 | 119 | */ |
mbed_official | 52:a51c77007319 | 120 | |
mbed_official | 52:a51c77007319 | 121 | /** |
mbed_official | 52:a51c77007319 | 122 | * @} |
mbed_official | 52:a51c77007319 | 123 | */ |
mbed_official | 52:a51c77007319 | 124 | |
mbed_official | 52:a51c77007319 | 125 | /** @defgroup PWR_Exported_Functions |
mbed_official | 52:a51c77007319 | 126 | * @{ |
mbed_official | 52:a51c77007319 | 127 | */ |
mbed_official | 52:a51c77007319 | 128 | |
mbed_official | 52:a51c77007319 | 129 | void PWR_DeInit(void); |
mbed_official | 52:a51c77007319 | 130 | void PWR_BackupAccessCmd(FunctionalState NewState); |
mbed_official | 52:a51c77007319 | 131 | void PWR_PVDCmd(FunctionalState NewState); |
mbed_official | 52:a51c77007319 | 132 | void PWR_PVDLevelConfig(uint32_t PWR_PVDLevel); |
mbed_official | 52:a51c77007319 | 133 | void PWR_WakeUpPinCmd(FunctionalState NewState); |
mbed_official | 52:a51c77007319 | 134 | void PWR_EnterSTOPMode(uint32_t PWR_Regulator, uint8_t PWR_STOPEntry); |
mbed_official | 52:a51c77007319 | 135 | void PWR_EnterSTANDBYMode(void); |
mbed_official | 52:a51c77007319 | 136 | FlagStatus PWR_GetFlagStatus(uint32_t PWR_FLAG); |
mbed_official | 52:a51c77007319 | 137 | void PWR_ClearFlag(uint32_t PWR_FLAG); |
mbed_official | 52:a51c77007319 | 138 | |
mbed_official | 52:a51c77007319 | 139 | #ifdef __cplusplus |
mbed_official | 52:a51c77007319 | 140 | } |
mbed_official | 52:a51c77007319 | 141 | #endif |
mbed_official | 52:a51c77007319 | 142 | |
mbed_official | 52:a51c77007319 | 143 | #endif /* __STM32F10x_PWR_H */ |
mbed_official | 52:a51c77007319 | 144 | /** |
mbed_official | 52:a51c77007319 | 145 | * @} |
mbed_official | 52:a51c77007319 | 146 | */ |
mbed_official | 52:a51c77007319 | 147 | |
mbed_official | 52:a51c77007319 | 148 | /** |
mbed_official | 52:a51c77007319 | 149 | * @} |
mbed_official | 52:a51c77007319 | 150 | */ |
mbed_official | 52:a51c77007319 | 151 | |
mbed_official | 52:a51c77007319 | 152 | /** |
mbed_official | 52:a51c77007319 | 153 | * @} |
mbed_official | 52:a51c77007319 | 154 | */ |
mbed_official | 52:a51c77007319 | 155 | |
mbed_official | 52:a51c77007319 | 156 | /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/ |