meh

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Mar 17 14:27:45 2015 +0000
Revision:
96:487b796308b0
Parent:
92:4fc01daae5a5
Release 96 of the mbed library

Changes:
- IAR support for ble boards, lpc, ethernet stack
- RTC - attach function to redirect time functions
- Nucleo F103RB - cube driver
- k20xx - fixes for teensy and k20 platforms in sleep/deepsleep and usb
- STM32L0, Nucleo/Disco L053 - refactoring

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 84:0b3ab51c8877 1 /**
bogdanm 84:0b3ab51c8877 2 ******************************************************************************
bogdanm 84:0b3ab51c8877 3 * @file stm32l0xx_hal.h
bogdanm 84:0b3ab51c8877 4 * @author MCD Application Team
Kojto 96:487b796308b0 5 * @version V1.2.0
Kojto 96:487b796308b0 6 * @date 06-February-2015
bogdanm 84:0b3ab51c8877 7 * @brief This file contains all the functions prototypes for the HAL
bogdanm 84:0b3ab51c8877 8 * module driver.
bogdanm 84:0b3ab51c8877 9 ******************************************************************************
bogdanm 84:0b3ab51c8877 10 * @attention
bogdanm 84:0b3ab51c8877 11 *
Kojto 96:487b796308b0 12 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
bogdanm 84:0b3ab51c8877 13 *
bogdanm 84:0b3ab51c8877 14 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 84:0b3ab51c8877 15 * are permitted provided that the following conditions are met:
bogdanm 84:0b3ab51c8877 16 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 84:0b3ab51c8877 17 * this list of conditions and the following disclaimer.
bogdanm 84:0b3ab51c8877 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 84:0b3ab51c8877 19 * this list of conditions and the following disclaimer in the documentation
bogdanm 84:0b3ab51c8877 20 * and/or other materials provided with the distribution.
bogdanm 84:0b3ab51c8877 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 84:0b3ab51c8877 22 * may be used to endorse or promote products derived from this software
bogdanm 84:0b3ab51c8877 23 * without specific prior written permission.
bogdanm 84:0b3ab51c8877 24 *
bogdanm 84:0b3ab51c8877 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 84:0b3ab51c8877 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 84:0b3ab51c8877 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 84:0b3ab51c8877 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 84:0b3ab51c8877 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 84:0b3ab51c8877 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 84:0b3ab51c8877 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 84:0b3ab51c8877 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 84:0b3ab51c8877 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 84:0b3ab51c8877 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 84:0b3ab51c8877 35 *
bogdanm 84:0b3ab51c8877 36 ******************************************************************************
bogdanm 84:0b3ab51c8877 37 */
bogdanm 84:0b3ab51c8877 38
bogdanm 84:0b3ab51c8877 39 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 84:0b3ab51c8877 40 #ifndef __STM32L0xx_HAL_H
bogdanm 84:0b3ab51c8877 41 #define __STM32L0xx_HAL_H
bogdanm 84:0b3ab51c8877 42
bogdanm 84:0b3ab51c8877 43 #ifdef __cplusplus
bogdanm 84:0b3ab51c8877 44 extern "C" {
bogdanm 84:0b3ab51c8877 45 #endif
bogdanm 84:0b3ab51c8877 46
bogdanm 84:0b3ab51c8877 47 /* Includes ------------------------------------------------------------------*/
bogdanm 84:0b3ab51c8877 48 #include "stm32l0xx_hal_conf.h"
bogdanm 84:0b3ab51c8877 49
bogdanm 84:0b3ab51c8877 50 /** @addtogroup STM32L0xx_HAL_Driver
bogdanm 84:0b3ab51c8877 51 * @{
bogdanm 84:0b3ab51c8877 52 */
bogdanm 84:0b3ab51c8877 53
Kojto 96:487b796308b0 54 /** @defgroup HAL HAL
Kojto 96:487b796308b0 55 * @{
Kojto 96:487b796308b0 56 */
Kojto 96:487b796308b0 57 /** @defgroup HAL_Exported_Constants HAL Exported constants
bogdanm 84:0b3ab51c8877 58 * @{
bogdanm 84:0b3ab51c8877 59 */
bogdanm 84:0b3ab51c8877 60
Kojto 96:487b796308b0 61 /** @defgroup SYSCFG_BootMode Boot Mode
bogdanm 84:0b3ab51c8877 62 * @{
Kojto 96:487b796308b0 63 */
Kojto 96:487b796308b0 64 #define SYSCFG_BOOT_MAINFLASH ((uint32_t)0x00000000)
Kojto 96:487b796308b0 65 #define SYSCFG_BOOT_SYSTEMFLASH ((uint32_t)SYSCFG_CFGR1_MEM_MODE_0)
Kojto 96:487b796308b0 66 #define SYSCFG_BOOT_SRAM ((uint32_t)SYSCFG_CFGR1_BOOT_MODE)
Kojto 96:487b796308b0 67
Kojto 96:487b796308b0 68 /**
Kojto 96:487b796308b0 69 * @}
bogdanm 84:0b3ab51c8877 70 */
bogdanm 84:0b3ab51c8877 71
Kojto 96:487b796308b0 72 /** @defgroup DBGMCU_Low_Power_Config
bogdanm 84:0b3ab51c8877 73 * @{
bogdanm 84:0b3ab51c8877 74 */
bogdanm 84:0b3ab51c8877 75 #define DBGMCU_SLEEP DBGMCU_CR_DBG_SLEEP
bogdanm 84:0b3ab51c8877 76 #define DBGMCU_STOP DBGMCU_CR_DBG_STOP
bogdanm 84:0b3ab51c8877 77 #define DBGMCU_STANDBY DBGMCU_CR_DBG_STANDBY
Kojto 96:487b796308b0 78 #define IS_DBGMCU_PERIPH(__PERIPH__) ((((__PERIPH__) & (~(DBGMCU_CR_DBG))) == 0x00) && ((__PERIPH__) != 0x00))
Kojto 96:487b796308b0 79
bogdanm 84:0b3ab51c8877 80
bogdanm 84:0b3ab51c8877 81 /**
bogdanm 84:0b3ab51c8877 82 * @}
bogdanm 84:0b3ab51c8877 83 */
bogdanm 84:0b3ab51c8877 84
Kojto 96:487b796308b0 85 /** @defgroup HAL_SYSCFG_LCD_EXT_CAPA
bogdanm 84:0b3ab51c8877 86 * @{
Kojto 96:487b796308b0 87 */
Kojto 96:487b796308b0 88 #define SYSCFG_LCD_EXT_CAPA SYSCFG_CFGR2_CAPA /*!< Connection of internal Vlcd rail to external capacitors */
Kojto 96:487b796308b0 89 #define SYSCFG_VLCD_PB2_EXT_CAPA_ON SYSCFG_CFGR2_CAPA_0 /*!< Connection on PB2 */
Kojto 96:487b796308b0 90 #define SYSCFG_VLCD_PB12_EXT_CAPA_ON SYSCFG_CFGR2_CAPA_1 /*!< Connection on PB12 */
Kojto 96:487b796308b0 91 #define SYSCFG_VLCD_PE11_EXT_CAPA_ON SYSCFG_CFGR2_CAPA_2 /*!< Connection on PB0 */
Kojto 96:487b796308b0 92 #if defined (SYSCFG_CFGR2_CAPA_3)
Kojto 96:487b796308b0 93 #define SYSCFG_VLCD_PB0_EXT_CAPA_ON SYSCFG_CFGR2_CAPA_3 /*!< Connection on PE11 */
Kojto 96:487b796308b0 94 #endif
Kojto 96:487b796308b0 95 #if defined (SYSCFG_CFGR2_CAPA_4)
Kojto 96:487b796308b0 96 #define SYSCFG_VLCD_PE12_EXT_CAPA_ON SYSCFG_CFGR2_CAPA_4 /*!< Connection on PE12 */
Kojto 96:487b796308b0 97 #endif
bogdanm 84:0b3ab51c8877 98
bogdanm 84:0b3ab51c8877 99 /**
bogdanm 84:0b3ab51c8877 100 * @}
Kojto 96:487b796308b0 101 */
Kojto 96:487b796308b0 102
bogdanm 92:4fc01daae5a5 103 /** @defgroup HAL_SYSCFG_VREFINT_OUT_SELECT
bogdanm 84:0b3ab51c8877 104 * @{
bogdanm 84:0b3ab51c8877 105 */
bogdanm 84:0b3ab51c8877 106 #define SYSCFG_VREFINT_OUT_NONE ((uint32_t)0x00000000) /* no pad connected */
bogdanm 84:0b3ab51c8877 107 #define SYSCFG_VREFINT_OUT_PB0 SYSCFG_CFGR3_VREF_OUT_0 /* Selects PBO as output for the Vrefint */
bogdanm 84:0b3ab51c8877 108 #define SYSCFG_VREFINT_OUT_PB1 SYSCFG_CFGR3_VREF_OUT_1 /* Selects PB1 as output for the Vrefint */
bogdanm 84:0b3ab51c8877 109 #define SYSCFG_VREFINT_OUT_PB0_PB1 SYSCFG_CFGR3_VREF_OUT /* Selects PBO and PB1 as output for the Vrefint */
bogdanm 84:0b3ab51c8877 110
Kojto 96:487b796308b0 111 #define IS_SYSCFG_VREFINT_OUT_SELECT(OUTPUT) (((OUTPUT) == SYSCFG_VREFINT_OUT_NONE) || \
Kojto 96:487b796308b0 112 ((OUTPUT) == SYSCFG_VREFINT_OUT_PB0) || \
bogdanm 84:0b3ab51c8877 113 ((OUTPUT) == SYSCFG_VREFINT_OUT_PB1) || \
bogdanm 84:0b3ab51c8877 114 ((OUTPUT) == SYSCFG_VREFINT_OUT_PB0_PB1))
bogdanm 84:0b3ab51c8877 115 /**
bogdanm 84:0b3ab51c8877 116 * @}
bogdanm 84:0b3ab51c8877 117 */
bogdanm 84:0b3ab51c8877 118
bogdanm 92:4fc01daae5a5 119 /** @defgroup HAL_SYSCFG_flags_definition
bogdanm 84:0b3ab51c8877 120 * @{
bogdanm 84:0b3ab51c8877 121 */
Kojto 96:487b796308b0 122 #define SYSCFG_FLAG_VREFINT_READY SYSCFG_CFGR3_VREFINT_RDYF
bogdanm 84:0b3ab51c8877 123
Kojto 96:487b796308b0 124 #define IS_SYSCFG_FLAG(FLAG) ((FLAG) == SYSCFG_FLAG_VREFINT_READY))
bogdanm 84:0b3ab51c8877 125
bogdanm 84:0b3ab51c8877 126 /**
bogdanm 84:0b3ab51c8877 127 * @}
bogdanm 84:0b3ab51c8877 128 */
Kojto 96:487b796308b0 129 /**
Kojto 96:487b796308b0 130 * @}
Kojto 96:487b796308b0 131 */
Kojto 96:487b796308b0 132
Kojto 96:487b796308b0 133 /** @defgroup HAL_Exported_Macros HAL Exported Macros
Kojto 96:487b796308b0 134 * @{
Kojto 96:487b796308b0 135 */
bogdanm 84:0b3ab51c8877 136
bogdanm 84:0b3ab51c8877 137 /** @brief Freeze/Unfreeze Peripherals in Debug mode
bogdanm 84:0b3ab51c8877 138 */
Kojto 96:487b796308b0 139 #if defined (DBGMCU_APB1_FZ_DBG_TIM2_STOP)
Kojto 96:487b796308b0 140 /**
Kojto 96:487b796308b0 141 * @brief TIM2 Peripherals Debug mode
Kojto 96:487b796308b0 142 */
Kojto 96:487b796308b0 143 #define __HAL_DBGMCU_FREEZE_TIM2() SET_BIT(DBGMCU->APB1FZ,DBGMCU_APB1_FZ_DBG_TIM2_STOP)
Kojto 96:487b796308b0 144 #define __HAL_DBGMCU_UNFREEZE_TIM2() CLEAR_BIT(DBGMCU->APB1FZ,DBGMCU_APB1_FZ_DBG_TIM2_STOP)
Kojto 96:487b796308b0 145 #endif
Kojto 96:487b796308b0 146
Kojto 96:487b796308b0 147 #if defined (DBGMCU_APB1_FZ_DBG_TIM3_STOP)
Kojto 96:487b796308b0 148 /**
Kojto 96:487b796308b0 149 * @brief TIM3 Peripherals Debug mode
Kojto 96:487b796308b0 150 */
Kojto 96:487b796308b0 151 #define __HAL_DBGMCU_FREEZE_TIM3() SET_BIT(DBGMCU->APB1FZ,DBGMCU_APB1_FZ_DBG_TIM3_STOP)
Kojto 96:487b796308b0 152 #define __HAL_DBGMCU_UNFREEZE_TIM3() CLEAR_BIT(DBGMCU->APB1FZ,DBGMCU_APB1_FZ_DBG_TIM3_STOP)
Kojto 96:487b796308b0 153 #endif
Kojto 96:487b796308b0 154
Kojto 96:487b796308b0 155 #if defined (DBGMCU_APB1_FZ_DBG_TIM6_STOP)
Kojto 96:487b796308b0 156 /**
Kojto 96:487b796308b0 157 * @brief TIM6 Peripherals Debug mode
Kojto 96:487b796308b0 158 */
Kojto 96:487b796308b0 159 #define __HAL_DBGMCU_FREEZE_TIM6() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM6_STOP)
Kojto 96:487b796308b0 160 #define __HAL_DBGMCU_UNFREEZE_TIM6() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM6_STOP)
Kojto 96:487b796308b0 161 #endif
Kojto 96:487b796308b0 162
Kojto 96:487b796308b0 163 #if defined (DBGMCU_APB1_FZ_DBG_TIM7_STOP)
Kojto 96:487b796308b0 164 /**
Kojto 96:487b796308b0 165 * @brief TIM7 Peripherals Debug mode
Kojto 96:487b796308b0 166 */
Kojto 96:487b796308b0 167 #define __HAL_DBGMCU_FREEZE_TIM7() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM7_STOP)
Kojto 96:487b796308b0 168 #define __HAL_DBGMCU_UNFREEZE_TIM7() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM7_STOP)
Kojto 96:487b796308b0 169 #endif
Kojto 96:487b796308b0 170
Kojto 96:487b796308b0 171 #if defined (DBGMCU_APB1_FZ_DBG_RTC_STOP)
Kojto 96:487b796308b0 172 /**
Kojto 96:487b796308b0 173 * @brief RTC Peripherals Debug mode
Kojto 96:487b796308b0 174 */
Kojto 96:487b796308b0 175 #define __HAL_DBGMCU_FREEZE_RTC() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_RTC_STOP)
Kojto 96:487b796308b0 176 #define __HAL_DBGMCU_UNFREEZE_RTC() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_RTC_STOP)
Kojto 96:487b796308b0 177 #endif
Kojto 96:487b796308b0 178
Kojto 96:487b796308b0 179 #if defined (DBGMCU_APB1_FZ_DBG_WWDG_STOP)
Kojto 96:487b796308b0 180 /**
Kojto 96:487b796308b0 181 * @brief WWDG Peripherals Debug mode
Kojto 96:487b796308b0 182 */
Kojto 96:487b796308b0 183 #define __HAL_DBGMCU_FREEZE_WWDG() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_WWDG_STOP)
Kojto 96:487b796308b0 184 #define __HAL_DBGMCU_UNFREEZE_WWDG() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_WWDG_STOP)
Kojto 96:487b796308b0 185 #endif
bogdanm 84:0b3ab51c8877 186
Kojto 96:487b796308b0 187 #if defined (DBGMCU_APB1_FZ_DBG_IWDG_STOP)
Kojto 96:487b796308b0 188 /**
Kojto 96:487b796308b0 189 * @brief IWDG Peripherals Debug mode
Kojto 96:487b796308b0 190 */
Kojto 96:487b796308b0 191 #define __HAL_DBGMCU_FREEZE_IWDG() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_IWDG_STOP)
Kojto 96:487b796308b0 192 #define __HAL_DBGMCU_UNFREEZE_IWDG() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_IWDG_STOP)
Kojto 96:487b796308b0 193 #endif
Kojto 96:487b796308b0 194
Kojto 96:487b796308b0 195 #if defined (DBGMCU_APB1_FZ_DBG_I2C1_STOP)
Kojto 96:487b796308b0 196 /**
Kojto 96:487b796308b0 197 * @brief I2C1 Peripherals Debug mode
Kojto 96:487b796308b0 198 */
Kojto 96:487b796308b0 199 #define __HAL_DBGMCU_FREEZE_I2C1_TIMEOUT() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C1_STOP)
Kojto 96:487b796308b0 200 #define __HAL_DBGMCU_UNFREEZE_I2C1_TIMEOUT_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C1_STOP)
Kojto 96:487b796308b0 201 #endif
Kojto 96:487b796308b0 202
Kojto 96:487b796308b0 203 #if defined (DBGMCU_APB1_FZ_DBG_I2C2_STOP)
Kojto 96:487b796308b0 204 /**
Kojto 96:487b796308b0 205 * @brief I2C2 Peripherals Debug mode
Kojto 96:487b796308b0 206 */
Kojto 96:487b796308b0 207 #define __HAL_DBGMCU_FREEZE_I2C2_TIMEOUT_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C2_STOP)
Kojto 96:487b796308b0 208 #define __HAL_DBGMCU_UNFREEZE_I2C2_TIMEOUT_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C2_STOP)
Kojto 96:487b796308b0 209 #endif
Kojto 96:487b796308b0 210
Kojto 96:487b796308b0 211 #if defined (DBGMCU_APB1_FZ_DBG_I2C3_STOP)
Kojto 96:487b796308b0 212 /**
Kojto 96:487b796308b0 213 * @brief I2C3 Peripherals Debug mode
Kojto 96:487b796308b0 214 */
Kojto 96:487b796308b0 215 #define __HAL_DBGMCU_FREEZE_I2C3_TIMEOUT() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C3_STOP)
Kojto 96:487b796308b0 216 #define __HAL_DBGMCU_UNFREEZE_I2C3_TIMEOUT() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C3_STOP)
Kojto 96:487b796308b0 217 #endif
Kojto 96:487b796308b0 218
Kojto 96:487b796308b0 219 #if defined (DBGMCU_APB1_FZ_DBG_LPTIMER_STOP)
Kojto 96:487b796308b0 220 /**
Kojto 96:487b796308b0 221 * @brief LPTIMER Peripherals Debug mode
Kojto 96:487b796308b0 222 */
Kojto 96:487b796308b0 223 #define __HAL_DBGMCU_FREEZE_LPTIMER() SET_BIT(DBGMCU->APB1FZ ,DBGMCU_APB1_FZ_DBG_LPTIMER_STOP)
Kojto 96:487b796308b0 224 #define __HAL_DBGMCU_UNFREEZE_LPTIMER() CLEAR_BIT(DBGMCU->APB1FZ ,DBGMCU_APB1_FZ_DBG_LPTIMER_STOP)
Kojto 96:487b796308b0 225 #endif
Kojto 96:487b796308b0 226
Kojto 96:487b796308b0 227 #if defined (DBGMCU_APB2_FZ_DBG_TIM22_STOP)
Kojto 96:487b796308b0 228 /**
Kojto 96:487b796308b0 229 * @brief TIM22 Peripherals Debug mode
Kojto 96:487b796308b0 230 */
Kojto 96:487b796308b0 231 #define __HAL_DBGMCU_FREEZE_TIM22() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM22_STOP)
Kojto 96:487b796308b0 232 #define __HAL_DBGMCU_UNFREEZE_TIM22() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM22_STOP)
Kojto 96:487b796308b0 233 #endif
Kojto 96:487b796308b0 234
Kojto 96:487b796308b0 235 #if defined (DBGMCU_APB2_FZ_DBG_TIM21_STOP)
Kojto 96:487b796308b0 236 /**
Kojto 96:487b796308b0 237 * @brief TIM21 Peripherals Debug mode
Kojto 96:487b796308b0 238 */
Kojto 96:487b796308b0 239 #define __HAL_DBGMCU_FREEZE_TIM21() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM21_STOP)
Kojto 96:487b796308b0 240 #define __HAL_DBGMCU_UNFREEZE_TIM21() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM21_STOP)
Kojto 96:487b796308b0 241 #endif
bogdanm 84:0b3ab51c8877 242
bogdanm 84:0b3ab51c8877 243 /** @brief Main Flash memory mapped at 0x00000000
bogdanm 84:0b3ab51c8877 244 */
Kojto 96:487b796308b0 245 #define __HAL_SYSCFG_REMAPMEMORY_FLASH() CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_MEM_MODE)
bogdanm 84:0b3ab51c8877 246
bogdanm 84:0b3ab51c8877 247 /** @brief System Flash memory mapped at 0x00000000
bogdanm 84:0b3ab51c8877 248 */
Kojto 96:487b796308b0 249 #define __HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH() MODIFY_REG(SYSCFG->CFGR1, SYSCFG_CFGR1_MEM_MODE, SYSCFG_CFGR1_MEM_MODE_0)
Kojto 96:487b796308b0 250
bogdanm 84:0b3ab51c8877 251
bogdanm 84:0b3ab51c8877 252 /** @brief Embedded SRAM mapped at 0x00000000
Kojto 96:487b796308b0 253 */
Kojto 96:487b796308b0 254 #define __HAL_SYSCFG_REMAPMEMORY_SRAM() MODIFY_REG(SYSCFG->CFGR1, SYSCFG_CFGR1_MEM_MODE, SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1)
Kojto 96:487b796308b0 255
Kojto 96:487b796308b0 256 /** @brief Configuration of the DBG Low Power mode.
Kojto 96:487b796308b0 257 * @param __DBGLPMODE__: bit field to indicate in wich Low Power mode DBG is still active.
Kojto 96:487b796308b0 258 * This parameter can be a value of @ref HAL_DBGMCU_Low_Power_Config
bogdanm 84:0b3ab51c8877 259 */
Kojto 96:487b796308b0 260 #define __HAL_SYSCFG_DBG_LP_CONFIG(__DBGLPMODE__) do {assert_param(IS_DBGMCU_PERIPH(__DBGLPMODE__)); \
Kojto 96:487b796308b0 261 MODIFY_REG(DBGMCU->CR, DBGMCU_CR_DBG, (__DBGLPMODE__)); \
Kojto 96:487b796308b0 262 } while (0)
Kojto 96:487b796308b0 263 /**
Kojto 96:487b796308b0 264 * @brief Returns the boot mode as configured by user.
Kojto 96:487b796308b0 265 * @retval The boot mode as configured by user. The returned can be a value of @ref HAL_SYSCFG_BootMode
Kojto 96:487b796308b0 266 */
Kojto 96:487b796308b0 267 #define __HAL_SYSCFG_GET_BOOT_MODE() READ_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_BOOT_MODE)
Kojto 96:487b796308b0 268
bogdanm 84:0b3ab51c8877 269
bogdanm 84:0b3ab51c8877 270 /** @brief Check whether the specified SYSCFG flag is set or not.
bogdanm 84:0b3ab51c8877 271 * @param __FLAG__: specifies the flag to check.
Kojto 96:487b796308b0 272 * This parameter can a value of @ref HAL_SYSCFG_flags_definition
bogdanm 84:0b3ab51c8877 273 * @retval The new state of __FLAG__ (TRUE or FALSE).
bogdanm 84:0b3ab51c8877 274 */
bogdanm 84:0b3ab51c8877 275 #define __HAL_SYSCFG_GET_FLAG(__FLAG__) (((SYSCFG->CFGR3) & (__FLAG__)) == (__FLAG__))
bogdanm 84:0b3ab51c8877 276
bogdanm 84:0b3ab51c8877 277 /**
bogdanm 84:0b3ab51c8877 278 * @}
bogdanm 84:0b3ab51c8877 279 */
bogdanm 84:0b3ab51c8877 280
Kojto 96:487b796308b0 281 /** @defgroup HAL_Exported_Functions HAL Exported Functions
Kojto 96:487b796308b0 282 * @{
Kojto 96:487b796308b0 283 */
Kojto 96:487b796308b0 284 /** @defgroup HAL_Exported_Functions_Group1 Initialization and de-initialization functions
Kojto 96:487b796308b0 285 * @brief Initialization and de-initialization functions
Kojto 96:487b796308b0 286 * @{
Kojto 96:487b796308b0 287 */
bogdanm 84:0b3ab51c8877 288 HAL_StatusTypeDef HAL_Init(void);
bogdanm 84:0b3ab51c8877 289 HAL_StatusTypeDef HAL_DeInit(void);
bogdanm 84:0b3ab51c8877 290 void HAL_MspInit(void);
bogdanm 84:0b3ab51c8877 291 void HAL_MspDeInit(void);
bogdanm 84:0b3ab51c8877 292 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
bogdanm 84:0b3ab51c8877 293
Kojto 96:487b796308b0 294 /**
Kojto 96:487b796308b0 295 * @}
Kojto 96:487b796308b0 296 */
Kojto 96:487b796308b0 297
Kojto 96:487b796308b0 298 /** @defgroup HAL_Exported_Functions_Group2 Peripheral Control functions
Kojto 96:487b796308b0 299 * @brief Peripheral Control functions
Kojto 96:487b796308b0 300 * @{
Kojto 96:487b796308b0 301 */
bogdanm 84:0b3ab51c8877 302 void HAL_IncTick(void);
bogdanm 84:0b3ab51c8877 303 void HAL_Delay(__IO uint32_t Delay);
bogdanm 84:0b3ab51c8877 304 uint32_t HAL_GetTick(void);
bogdanm 84:0b3ab51c8877 305 void HAL_SuspendTick(void);
bogdanm 84:0b3ab51c8877 306 void HAL_ResumeTick(void);
bogdanm 84:0b3ab51c8877 307 uint32_t HAL_GetHalVersion(void);
bogdanm 84:0b3ab51c8877 308 uint32_t HAL_GetREVID(void);
bogdanm 84:0b3ab51c8877 309 uint32_t HAL_GetDEVID(void);
Kojto 96:487b796308b0 310 void HAL_DBGMCU_EnableDBGSleepMode(void);
Kojto 96:487b796308b0 311 void HAL_DBGMCU_DisableDBGSleepMode(void);
Kojto 96:487b796308b0 312 void HAL_DBGMCU_EnableDBGStopMode(void);
Kojto 96:487b796308b0 313 void HAL_DBGMCU_DisableDBGStopMode(void);
Kojto 96:487b796308b0 314 void HAL_DBGMCU_EnableDBGStandbyMode(void);
Kojto 96:487b796308b0 315 void HAL_DBGMCU_DisableDBGStandbyMode(void);
Kojto 96:487b796308b0 316 void HAL_DBGMCU_DBG_EnableLowPowerConfig(uint32_t Periph);
Kojto 96:487b796308b0 317 void HAL_DBGMCU_DBG_DisableLowPowerConfig(uint32_t Periph);
Kojto 96:487b796308b0 318 uint32_t HAL_SYSCFG_GetBootMode(void);
Kojto 96:487b796308b0 319 void HAL_SYSCFG_EnableVREFINT(void);
Kojto 96:487b796308b0 320 void HAL_SYSCFG_DisableVREFINT(void);
Kojto 96:487b796308b0 321 void HAL_SYSCFG_Enable_Lock_VREFINT(void);
Kojto 96:487b796308b0 322 void HAL_SYSCFG_Disable_Lock_VREFINT(void);
Kojto 96:487b796308b0 323 void HAL_SYSCFG_VREFINT_OutputSelect(uint32_t SYSCFG_Vrefint_OUTPUT);
Kojto 96:487b796308b0 324
Kojto 96:487b796308b0 325 /**
Kojto 96:487b796308b0 326 * @}
Kojto 96:487b796308b0 327 */
Kojto 96:487b796308b0 328 /**
Kojto 96:487b796308b0 329 * @}
Kojto 96:487b796308b0 330 */
bogdanm 84:0b3ab51c8877 331
bogdanm 84:0b3ab51c8877 332 /**
bogdanm 84:0b3ab51c8877 333 * @}
bogdanm 84:0b3ab51c8877 334 */
bogdanm 84:0b3ab51c8877 335
bogdanm 84:0b3ab51c8877 336 /**
bogdanm 84:0b3ab51c8877 337 * @}
bogdanm 84:0b3ab51c8877 338 */
bogdanm 84:0b3ab51c8877 339
bogdanm 84:0b3ab51c8877 340 #ifdef __cplusplus
bogdanm 84:0b3ab51c8877 341 }
bogdanm 84:0b3ab51c8877 342 #endif
bogdanm 84:0b3ab51c8877 343
bogdanm 84:0b3ab51c8877 344 #endif /* __STM32L0xx_HAL_H */
bogdanm 84:0b3ab51c8877 345
bogdanm 84:0b3ab51c8877 346 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Kojto 96:487b796308b0 347