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