meh

Fork of mbed by mbed official

Committer:
ricardobtez
Date:
Tue Apr 05 23:51:21 2016 +0000
Revision:
118:16969dd821af
Parent:
92:4fc01daae5a5
Child:
93:e188a91d3eaa
dgdgr

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 85:024bf7f99721 1 /**
bogdanm 85:024bf7f99721 2 ******************************************************************************
bogdanm 85:024bf7f99721 3 * @file stm32f0xx_hal.h
bogdanm 85:024bf7f99721 4 * @author MCD Application Team
bogdanm 92:4fc01daae5a5 5 * @version V1.1.0
bogdanm 92:4fc01daae5a5 6 * @date 03-Oct-2014
bogdanm 85:024bf7f99721 7 * @brief This file contains all the functions prototypes for the HAL
bogdanm 85:024bf7f99721 8 * module driver.
bogdanm 85:024bf7f99721 9 ******************************************************************************
bogdanm 85:024bf7f99721 10 * @attention
bogdanm 85:024bf7f99721 11 *
bogdanm 85:024bf7f99721 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
bogdanm 85:024bf7f99721 13 *
bogdanm 85:024bf7f99721 14 * Redistribution and use in source and binary forms, with or without modification,
bogdanm 85:024bf7f99721 15 * are permitted provided that the following conditions are met:
bogdanm 85:024bf7f99721 16 * 1. Redistributions of source code must retain the above copyright notice,
bogdanm 85:024bf7f99721 17 * this list of conditions and the following disclaimer.
bogdanm 85:024bf7f99721 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
bogdanm 85:024bf7f99721 19 * this list of conditions and the following disclaimer in the documentation
bogdanm 85:024bf7f99721 20 * and/or other materials provided with the distribution.
bogdanm 85:024bf7f99721 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bogdanm 85:024bf7f99721 22 * may be used to endorse or promote products derived from this software
bogdanm 85:024bf7f99721 23 * without specific prior written permission.
bogdanm 85:024bf7f99721 24 *
bogdanm 85:024bf7f99721 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bogdanm 85:024bf7f99721 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bogdanm 85:024bf7f99721 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bogdanm 85:024bf7f99721 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bogdanm 85:024bf7f99721 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bogdanm 85:024bf7f99721 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bogdanm 85:024bf7f99721 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bogdanm 85:024bf7f99721 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bogdanm 85:024bf7f99721 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bogdanm 85:024bf7f99721 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bogdanm 85:024bf7f99721 35 *
bogdanm 85:024bf7f99721 36 ******************************************************************************
bogdanm 85:024bf7f99721 37 */
bogdanm 85:024bf7f99721 38
bogdanm 85:024bf7f99721 39 /* Define to prevent recursive inclusion -------------------------------------*/
bogdanm 85:024bf7f99721 40 #ifndef __STM32F0xx_HAL_H
bogdanm 85:024bf7f99721 41 #define __STM32F0xx_HAL_H
bogdanm 85:024bf7f99721 42
bogdanm 85:024bf7f99721 43 #ifdef __cplusplus
bogdanm 85:024bf7f99721 44 extern "C" {
bogdanm 85:024bf7f99721 45 #endif
bogdanm 85:024bf7f99721 46
bogdanm 85:024bf7f99721 47 /* Includes ------------------------------------------------------------------*/
bogdanm 85:024bf7f99721 48 #include "stm32f0xx_hal_conf.h"
bogdanm 85:024bf7f99721 49
bogdanm 85:024bf7f99721 50 /** @addtogroup STM32F0xx_HAL_Driver
bogdanm 85:024bf7f99721 51 * @{
bogdanm 85:024bf7f99721 52 */
bogdanm 85:024bf7f99721 53
bogdanm 85:024bf7f99721 54 /** @addtogroup HAL
bogdanm 85:024bf7f99721 55 * @{
bogdanm 85:024bf7f99721 56 */
bogdanm 85:024bf7f99721 57
bogdanm 85:024bf7f99721 58 /* Exported types ------------------------------------------------------------*/
bogdanm 85:024bf7f99721 59 /* Exported constants --------------------------------------------------------*/
bogdanm 92:4fc01daae5a5 60 /** @defgroup HAL_Exported_Constants HAL Exported Constants
bogdanm 92:4fc01daae5a5 61 * @{
bogdanm 92:4fc01daae5a5 62 */
bogdanm 92:4fc01daae5a5 63
bogdanm 92:4fc01daae5a5 64 #if defined(SYSCFG_CFGR1_DMA_RMP)
bogdanm 92:4fc01daae5a5 65 /** @defgroup HAL_DMA_remapping HAL DMA remapping
bogdanm 85:024bf7f99721 66 * Elements values convention: 0xYYYYYYYY
bogdanm 85:024bf7f99721 67 * - YYYYYYYY : Position in the SYSCFG register CFGR1
bogdanm 92:4fc01daae5a5 68 * @{
bogdanm 85:024bf7f99721 69 */
bogdanm 85:024bf7f99721 70 #define HAL_REMAPDMA_ADC_DMA_CH2 ((uint32_t)SYSCFG_CFGR1_ADC_DMA_RMP) /*!< ADC DMA remap
bogdanm 85:024bf7f99721 71 0: No remap (ADC DMA requests mapped on DMA channel 1
bogdanm 85:024bf7f99721 72 1: Remap (ADC DMA requests mapped on DMA channel 2 */
bogdanm 85:024bf7f99721 73 #define HAL_REMAPDMA_USART1_TX_DMA_CH4 ((uint32_t)SYSCFG_CFGR1_USART1TX_DMA_RMP) /*!< USART1 TX DMA remap
bogdanm 85:024bf7f99721 74 0: No remap (USART1_TX DMA request mapped on DMA channel 2
bogdanm 85:024bf7f99721 75 1: Remap (USART1_TX DMA request mapped on DMA channel 4 */
bogdanm 85:024bf7f99721 76 #define HAL_REMAPDMA_USART1_RX_DMA_CH5 ((uint32_t)SYSCFG_CFGR1_USART1RX_DMA_RMP) /*!< USART1 RX DMA remap
bogdanm 85:024bf7f99721 77 0: No remap (USART1_RX DMA request mapped on DMA channel 3
bogdanm 85:024bf7f99721 78 1: Remap (USART1_RX DMA request mapped on DMA channel 5 */
bogdanm 85:024bf7f99721 79 #define HAL_REMAPDMA_TIM16_DMA_CH4 ((uint32_t)SYSCFG_CFGR1_TIM16_DMA_RMP) /*!< TIM16 DMA request remap
bogdanm 85:024bf7f99721 80 0: No remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA channel 3)
bogdanm 85:024bf7f99721 81 1: Remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA channel 4) */
bogdanm 85:024bf7f99721 82 #define HAL_REMAPDMA_TIM17_DMA_CH2 ((uint32_t)SYSCFG_CFGR1_TIM17_DMA_RMP) /*!< TIM17 DMA request remap
bogdanm 85:024bf7f99721 83 0: No remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA channel 1
bogdanm 85:024bf7f99721 84 1: Remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA channel 2) */
bogdanm 85:024bf7f99721 85
bogdanm 85:024bf7f99721 86 #if defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx)
bogdanm 85:024bf7f99721 87 #define HAL_REMAPDMA_TIM16_DMA_CH6 ((uint32_t)SYSCFG_CFGR1_TIM16_DMA_RMP2) /*!< TIM16 alternate DMA request remapping bit. Available on STM32F07x devices only
bogdanm 85:024bf7f99721 88 0: No alternate remap (TIM16 DMA requestsmapped according to TIM16_DMA_RMP bit)
bogdanm 85:024bf7f99721 89 1: Alternate remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA channel 6) */
bogdanm 85:024bf7f99721 90 #define HAL_REMAPDMA_TIM17_DMA_CH7 ((uint32_t)SYSCFG_CFGR1_TIM17_DMA_RMP2) /*!< TIM17 alternate DMA request remapping bit. Available on STM32F07x devices only
bogdanm 85:024bf7f99721 91 0: No alternate remap (TIM17 DMA requestsmapped according to TIM17_DMA_RMP bit)
bogdanm 85:024bf7f99721 92 1: Alternate remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA channel 7) */
bogdanm 85:024bf7f99721 93 #define HAL_REMAPDMA_SPI2_DMA_CH67 ((uint32_t)SYSCFG_CFGR1_SPI2_DMA_RMP) /*!< SPI2 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 94 0: No remap (SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 4 and 5 respectively)
bogdanm 85:024bf7f99721 95 1: 1: Remap (SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 6 and 7 respectively) */
bogdanm 85:024bf7f99721 96 #define HAL_REMAPDMA_USART2_DMA_CH67 ((uint32_t)SYSCFG_CFGR1_USART2_DMA_RMP) /*!< USART2 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 97 0: No remap (USART2_RX and USART2_TX DMA requests mapped on DMA channel 5 and 4 respectively)
bogdanm 85:024bf7f99721 98 1: 1: Remap (USART2_RX and USART2_TX DMA requests mapped on DMA channel 6 and 7 respectively) */
bogdanm 85:024bf7f99721 99 #define HAL_REMAPDMA_USART3_DMA_CH32 ((uint32_t)SYSCFG_CFGR1_USART3_DMA_RMP) /*!< USART3 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 100 0: No remap (USART3_RX and USART3_TX DMA requests mapped on DMA channel 6 and 7 respectively)
bogdanm 85:024bf7f99721 101 1: 1: Remap (USART3_RX and USART3_TX DMA requests mapped on DMA channel 3 and 2 respectively) */
bogdanm 85:024bf7f99721 102 #define HAL_REMAPDMA_I2C1_DMA_CH76 ((uint32_t)SYSCFG_CFGR1_I2C1_DMA_RMP) /*!< I2C1 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 103 0: No remap (I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 3 and 2 respectively)
bogdanm 85:024bf7f99721 104 1: Remap (I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 7 and 6 respectively) */
bogdanm 85:024bf7f99721 105 #define HAL_REMAPDMA_TIM1_DMA_CH6 ((uint32_t)SYSCFG_CFGR1_TIM1_DMA_RMP) /*!< TIM1 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 106 0: No remap (TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 2, 3 and 4 respectively)
bogdanm 85:024bf7f99721 107 1: Remap (TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 6 */
bogdanm 85:024bf7f99721 108 #define HAL_REMAPDMA_TIM2_DMA_CH7 ((uint32_t)SYSCFG_CFGR1_TIM2_DMA_RMP) /*!< TIM2 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 109 0: No remap (TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 3 and 4 respectively)
bogdanm 85:024bf7f99721 110 1: Remap (TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 7 */
bogdanm 85:024bf7f99721 111 #define HAL_REMAPDMA_TIM3_DMA_CH6 ((uint32_t)SYSCFG_CFGR1_TIM3_DMA_RMP) /*!< TIM3 DMA request remapping bit. Available on STM32F07x devices only.
bogdanm 85:024bf7f99721 112 0: No remap (TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 4)
bogdanm 85:024bf7f99721 113 1: Remap (TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 6) */
bogdanm 85:024bf7f99721 114 #endif
bogdanm 85:024bf7f99721 115
bogdanm 85:024bf7f99721 116 #if defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx)
bogdanm 85:024bf7f99721 117 #define IS_HAL_REMAPDMA(RMP) (((RMP) == HAL_REMAPDMA_ADC_DMA_CH2) || \
bogdanm 85:024bf7f99721 118 ((RMP) == HAL_REMAPDMA_USART1_TX_DMA_CH4) || \
bogdanm 85:024bf7f99721 119 ((RMP) == HAL_REMAPDMA_USART1_RX_DMA_CH5) || \
bogdanm 85:024bf7f99721 120 ((RMP) == HAL_REMAPDMA_TIM16_DMA_CH4) || \
bogdanm 85:024bf7f99721 121 ((RMP) == HAL_REMAPDMA_TIM17_DMA_CH2) || \
bogdanm 85:024bf7f99721 122 ((RMP) == HAL_REMAPDMA_TIM16_DMA_CH6) || \
bogdanm 85:024bf7f99721 123 ((RMP) == HAL_REMAPDMA_TIM17_DMA_CH7) || \
bogdanm 85:024bf7f99721 124 ((RMP) == HAL_REMAPDMA_SPI2_DMA_CH67) || \
bogdanm 85:024bf7f99721 125 ((RMP) == HAL_REMAPDMA_USART2_DMA_CH67) || \
bogdanm 85:024bf7f99721 126 ((RMP) == HAL_REMAPDMA_USART3_DMA_CH32) || \
bogdanm 85:024bf7f99721 127 ((RMP) == HAL_REMAPDMA_I2C1_DMA_CH76) || \
bogdanm 85:024bf7f99721 128 ((RMP) == HAL_REMAPDMA_TIM1_DMA_CH6) || \
bogdanm 85:024bf7f99721 129 ((RMP) == HAL_REMAPDMA_TIM2_DMA_CH7) || \
bogdanm 85:024bf7f99721 130 ((RMP) == HAL_REMAPDMA_TIM3_DMA_CH6))
bogdanm 85:024bf7f99721 131 #else
bogdanm 85:024bf7f99721 132 #define IS_HAL_REMAPDMA(RMP) (((RMP) == HAL_REMAPDMA_ADC_DMA_CH2) || \
bogdanm 85:024bf7f99721 133 ((RMP) == HAL_REMAPDMA_USART1_TX_DMA_CH4) || \
bogdanm 85:024bf7f99721 134 ((RMP) == HAL_REMAPDMA_USART1_RX_DMA_CH5) || \
bogdanm 85:024bf7f99721 135 ((RMP) == HAL_REMAPDMA_TIM16_DMA_CH4) || \
bogdanm 85:024bf7f99721 136 ((RMP) == HAL_REMAPDMA_TIM17_DMA_CH2))
bogdanm 85:024bf7f99721 137 #endif
bogdanm 85:024bf7f99721 138 /**
bogdanm 85:024bf7f99721 139 * @}
bogdanm 85:024bf7f99721 140 */
bogdanm 92:4fc01daae5a5 141 #endif /* SYSCFG_CFGR1_DMA_RMP */
bogdanm 85:024bf7f99721 142
bogdanm 92:4fc01daae5a5 143 #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
bogdanm 92:4fc01daae5a5 144 /** @defgroup HAL_Pin_remapping HAL Pin remapping
bogdanm 85:024bf7f99721 145 * @{
bogdanm 85:024bf7f99721 146 */
bogdanm 85:024bf7f99721 147 #define HAL_REMAP_PA11_PA12 (SYSCFG_CFGR1_PA11_PA12_RMP) /*!< PA11 and PA12 remapping bit for small packages (28 and 20 pins).
bogdanm 85:024bf7f99721 148 0: No remap (pin pair PA9/10 mapped on the pins)
bogdanm 85:024bf7f99721 149 1: Remap (pin pair PA11/12 mapped instead of PA9/10) */
bogdanm 85:024bf7f99721 150
bogdanm 85:024bf7f99721 151 #define IS_HAL_REMAP_PIN(RMP) ((RMP) == HAL_REMAP_PA11_PA12)
bogdanm 85:024bf7f99721 152 /**
bogdanm 85:024bf7f99721 153 * @}
bogdanm 85:024bf7f99721 154 */
bogdanm 92:4fc01daae5a5 155 #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
bogdanm 85:024bf7f99721 156
bogdanm 92:4fc01daae5a5 157 #if defined(STM32F091xC)
bogdanm 92:4fc01daae5a5 158 /** @defgroup HAL_IRDA_ENV_SEL HAL IRDA Enveloppe Selection
bogdanm 85:024bf7f99721 159 * @{
bogdanm 85:024bf7f99721 160 */
bogdanm 92:4fc01daae5a5 161 #define HAL_SYSCFG_IRDA_ENV_SEL_TIM16 (SYSCFG_CFGR1_IRDA_ENV_SEL_0 & SYSCFG_CFGR1_IRDA_ENV_SEL_1) /* 00: Timer16 is selected as IRDA Modulation enveloppe source */
bogdanm 92:4fc01daae5a5 162 #define HAL_SYSCFG_IRDA_ENV_SEL_USART1 (SYSCFG_CFGR1_IRDA_ENV_SEL_0) /* 01: USART1 is selected as IRDA Modulation enveloppe source */
bogdanm 92:4fc01daae5a5 163 #define HAL_SYSCFG_IRDA_ENV_SEL_USART4 (SYSCFG_CFGR1_IRDA_ENV_SEL_1) /* 10: USART4 is selected as IRDA Modulation enveloppe source */
bogdanm 92:4fc01daae5a5 164
bogdanm 92:4fc01daae5a5 165 #define IS_HAL_SYSCFG_IRDA_ENV_SEL(SEL) (((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_TIM16) || \
bogdanm 92:4fc01daae5a5 166 ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART1) || \
bogdanm 92:4fc01daae5a5 167 ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART4))
bogdanm 92:4fc01daae5a5 168 /**
bogdanm 92:4fc01daae5a5 169 * @}
bogdanm 92:4fc01daae5a5 170 */
bogdanm 92:4fc01daae5a5 171 #endif /* STM32F091xC */
bogdanm 92:4fc01daae5a5 172
bogdanm 92:4fc01daae5a5 173
bogdanm 92:4fc01daae5a5 174 /** @defgroup HAL_FastModePlus_I2C HAL FastModePlus I2C
bogdanm 92:4fc01daae5a5 175 * @{
bogdanm 92:4fc01daae5a5 176 */
bogdanm 92:4fc01daae5a5 177 #if defined(SYSCFG_CFGR1_I2C_FMP_PB6)
bogdanm 85:024bf7f99721 178 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB6 (SYSCFG_CFGR1_I2C_FMP_PB6) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 179 0: PB6 pin operates in standard mode
bogdanm 85:024bf7f99721 180 1: I2C FM+ mode enabled on PB6 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 181 #endif /* SYSCFG_CFGR1_I2C_FMP_PB6 */
bogdanm 92:4fc01daae5a5 182
bogdanm 92:4fc01daae5a5 183 #if defined(SYSCFG_CFGR1_I2C_FMP_PB7)
bogdanm 85:024bf7f99721 184 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB7 (SYSCFG_CFGR1_I2C_FMP_PB7) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 185 0: PB7 pin operates in standard mode
bogdanm 85:024bf7f99721 186 1: I2C FM+ mode enabled on PB7 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 187 #endif /* SYSCFG_CFGR1_I2C_FMP_PB7 */
bogdanm 92:4fc01daae5a5 188
bogdanm 92:4fc01daae5a5 189 #if defined(SYSCFG_CFGR1_I2C_FMP_PB8)
bogdanm 85:024bf7f99721 190 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB8 (SYSCFG_CFGR1_I2C_FMP_PB8) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 191 0: PB8 pin operates in standard mode
bogdanm 85:024bf7f99721 192 1: I2C FM+ mode enabled on PB8 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 193 #endif /* SYSCFG_CFGR1_I2C_FMP_PB8 */
bogdanm 92:4fc01daae5a5 194
bogdanm 92:4fc01daae5a5 195 #if defined(SYSCFG_CFGR1_I2C_FMP_PB9)
bogdanm 85:024bf7f99721 196 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB9 (SYSCFG_CFGR1_I2C_FMP_PB9) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 197 0: PB9 pin operates in standard mode
bogdanm 92:4fc01daae5a5 198 1: I2C FM+ mode enabled on PB9 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 199 #endif /* SYSCFG_CFGR1_I2C_FMP_PB9 */
bogdanm 92:4fc01daae5a5 200
bogdanm 92:4fc01daae5a5 201 #if defined(SYSCFG_CFGR1_I2C_FMP_I2C1)
bogdanm 85:024bf7f99721 202 #define HAL_SYSCFG_FASTMODEPLUS_I2C1 (SYSCFG_CFGR1_I2C_FMP_I2C1) /*!< I2C1 fast mode Plus driving capability activation
bogdanm 85:024bf7f99721 203 0: FM+ mode is not enabled on I2C1 pins selected through AF selection bits
bogdanm 85:024bf7f99721 204 1: FM+ mode is enabled on I2C1 pins selected through AF selection bits */
bogdanm 92:4fc01daae5a5 205 #endif /* SYSCFG_CFGR1_I2C_FMP_I2C1 */
bogdanm 85:024bf7f99721 206
bogdanm 92:4fc01daae5a5 207 #if defined(SYSCFG_CFGR1_I2C_FMP_I2C2)
bogdanm 85:024bf7f99721 208 #define HAL_SYSCFG_FASTMODEPLUS_I2C2 (SYSCFG_CFGR1_I2C_FMP_I2C2) /*!< I2C2 fast mode Plus driving capability activation
bogdanm 85:024bf7f99721 209 0: FM+ mode is not enabled on I2C2 pins selected through AF selection bits
bogdanm 85:024bf7f99721 210 1: FM+ mode is enabled on I2C2 pins selected through AF selection bits */
bogdanm 92:4fc01daae5a5 211 #endif /* SYSCFG_CFGR1_I2C_FMP_I2C2 */
bogdanm 85:024bf7f99721 212
bogdanm 92:4fc01daae5a5 213 #if defined(SYSCFG_CFGR1_I2C_FMP_PA9)
bogdanm 85:024bf7f99721 214 #define HAL_SYSCFG_FASTMODEPLUS_I2C2_PA9 (SYSCFG_CFGR1_I2C_FMP_PA9) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 215 0: PA9 pin operates in standard mode
bogdanm 85:024bf7f99721 216 1: FM+ mode is enabled on PA9 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 217 #endif /* SYSCFG_CFGR1_I2C_FMP_PA9 */
bogdanm 92:4fc01daae5a5 218
bogdanm 92:4fc01daae5a5 219 #if defined(SYSCFG_CFGR1_I2C_FMP_PA10)
bogdanm 85:024bf7f99721 220 #define HAL_SYSCFG_FASTMODEPLUS_I2C2_PA10 (SYSCFG_CFGR1_I2C_FMP_PA10) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 221 0: PA10 pin operates in standard mode
bogdanm 85:024bf7f99721 222 1: FM+ mode is enabled on PA10 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 223 #endif /* SYSCFG_CFGR1_I2C_FMP_PA10 */
bogdanm 92:4fc01daae5a5 224
bogdanm 92:4fc01daae5a5 225 #if defined(STM32F091xC)|| defined(STM32F098xx)
bogdanm 92:4fc01daae5a5 226 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
bogdanm 92:4fc01daae5a5 227 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
bogdanm 92:4fc01daae5a5 228 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2_PA9) || \
bogdanm 92:4fc01daae5a5 229 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2_PA10) || \
bogdanm 92:4fc01daae5a5 230 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 231 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 232 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 233 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 92:4fc01daae5a5 234 #elif defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
bogdanm 92:4fc01daae5a5 235 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
bogdanm 92:4fc01daae5a5 236 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
bogdanm 92:4fc01daae5a5 237 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 238 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 239 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 240 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 92:4fc01daae5a5 241 #elif defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx)
bogdanm 92:4fc01daae5a5 242 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
bogdanm 92:4fc01daae5a5 243 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2_PA9) || \
bogdanm 92:4fc01daae5a5 244 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2_PA10) || \
bogdanm 92:4fc01daae5a5 245 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 246 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 247 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 248 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 92:4fc01daae5a5 249 #elif defined(STM32F042x6) || defined(STM32F048xx)
bogdanm 92:4fc01daae5a5 250 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
bogdanm 92:4fc01daae5a5 251 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 252 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 253 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 254 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 92:4fc01daae5a5 255 #else
bogdanm 92:4fc01daae5a5 256 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 257 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 258 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 259 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 85:024bf7f99721 260 #endif
bogdanm 85:024bf7f99721 261
bogdanm 85:024bf7f99721 262 /**
bogdanm 85:024bf7f99721 263 * @}
bogdanm 85:024bf7f99721 264 */
bogdanm 85:024bf7f99721 265
bogdanm 92:4fc01daae5a5 266 #if defined(STM32F091xC) || defined (STM32F098xx)
bogdanm 92:4fc01daae5a5 267 /** @defgroup HAL_ISR_Wrapper HAL ISR Wrapper
bogdanm 92:4fc01daae5a5 268 * @{
bogdanm 92:4fc01daae5a5 269 */
bogdanm 92:4fc01daae5a5 270 #define HAL_SYSCFG_ITLINE0 ((uint32_t) 0x00000000)
bogdanm 92:4fc01daae5a5 271 #define HAL_SYSCFG_ITLINE1 ((uint32_t) 0x00000001)
bogdanm 92:4fc01daae5a5 272 #define HAL_SYSCFG_ITLINE2 ((uint32_t) 0x00000002)
bogdanm 92:4fc01daae5a5 273 #define HAL_SYSCFG_ITLINE3 ((uint32_t) 0x00000003)
bogdanm 92:4fc01daae5a5 274 #define HAL_SYSCFG_ITLINE4 ((uint32_t) 0x00000004)
bogdanm 92:4fc01daae5a5 275 #define HAL_SYSCFG_ITLINE5 ((uint32_t) 0x00000005)
bogdanm 92:4fc01daae5a5 276 #define HAL_SYSCFG_ITLINE6 ((uint32_t) 0x00000006)
bogdanm 92:4fc01daae5a5 277 #define HAL_SYSCFG_ITLINE7 ((uint32_t) 0x00000007)
bogdanm 92:4fc01daae5a5 278 #define HAL_SYSCFG_ITLINE8 ((uint32_t) 0x00000008)
bogdanm 92:4fc01daae5a5 279 #define HAL_SYSCFG_ITLINE9 ((uint32_t) 0x00000009)
bogdanm 92:4fc01daae5a5 280 #define HAL_SYSCFG_ITLINE10 ((uint32_t) 0x0000000A)
bogdanm 92:4fc01daae5a5 281 #define HAL_SYSCFG_ITLINE11 ((uint32_t) 0x0000000B)
bogdanm 92:4fc01daae5a5 282 #define HAL_SYSCFG_ITLINE12 ((uint32_t) 0x0000000C)
bogdanm 92:4fc01daae5a5 283 #define HAL_SYSCFG_ITLINE13 ((uint32_t) 0x0000000D)
bogdanm 92:4fc01daae5a5 284 #define HAL_SYSCFG_ITLINE14 ((uint32_t) 0x0000000E)
bogdanm 92:4fc01daae5a5 285 #define HAL_SYSCFG_ITLINE15 ((uint32_t) 0x0000000F)
bogdanm 92:4fc01daae5a5 286 #define HAL_SYSCFG_ITLINE16 ((uint32_t) 0x00000010)
bogdanm 92:4fc01daae5a5 287 #define HAL_SYSCFG_ITLINE17 ((uint32_t) 0x00000011)
bogdanm 92:4fc01daae5a5 288 #define HAL_SYSCFG_ITLINE18 ((uint32_t) 0x00000012)
bogdanm 92:4fc01daae5a5 289 #define HAL_SYSCFG_ITLINE19 ((uint32_t) 0x00000013)
bogdanm 92:4fc01daae5a5 290 #define HAL_SYSCFG_ITLINE20 ((uint32_t) 0x00000014)
bogdanm 92:4fc01daae5a5 291 #define HAL_SYSCFG_ITLINE21 ((uint32_t) 0x00000015)
bogdanm 92:4fc01daae5a5 292 #define HAL_SYSCFG_ITLINE22 ((uint32_t) 0x00000016)
bogdanm 92:4fc01daae5a5 293 #define HAL_SYSCFG_ITLINE23 ((uint32_t) 0x00000017)
bogdanm 92:4fc01daae5a5 294 #define HAL_SYSCFG_ITLINE24 ((uint32_t) 0x00000018)
bogdanm 92:4fc01daae5a5 295 #define HAL_SYSCFG_ITLINE25 ((uint32_t) 0x00000019)
bogdanm 92:4fc01daae5a5 296 #define HAL_SYSCFG_ITLINE26 ((uint32_t) 0x0000001A)
bogdanm 92:4fc01daae5a5 297 #define HAL_SYSCFG_ITLINE27 ((uint32_t) 0x0000001B)
bogdanm 92:4fc01daae5a5 298 #define HAL_SYSCFG_ITLINE28 ((uint32_t) 0x0000001C)
bogdanm 92:4fc01daae5a5 299 #define HAL_SYSCFG_ITLINE29 ((uint32_t) 0x0000001D)
bogdanm 92:4fc01daae5a5 300 #define HAL_SYSCFG_ITLINE30 ((uint32_t) 0x0000001E)
bogdanm 92:4fc01daae5a5 301 #define HAL_SYSCFG_ITLINE31 ((uint32_t) 0x0000001F)
bogdanm 92:4fc01daae5a5 302
bogdanm 92:4fc01daae5a5 303 #define HAL_ITLINE_EWDG ((uint32_t) ((HAL_SYSCFG_ITLINE0 << 0x18) | SYSCFG_ITLINE0_SR_EWDG)) /* EWDG has expired .... */
bogdanm 92:4fc01daae5a5 304 #if defined(STM32F091xC)
bogdanm 92:4fc01daae5a5 305 #define HAL_ITLINE_PVDOUT ((uint32_t) ((HAL_SYSCFG_ITLINE1 << 0x18) | SYSCFG_ITLINE1_SR_PVDOUT)) /* Power voltage detection Interrupt .... */
bogdanm 92:4fc01daae5a5 306 #endif
bogdanm 92:4fc01daae5a5 307 #define HAL_ITLINE_VDDIO2 ((uint32_t) ((HAL_SYSCFG_ITLINE1 << 0x18) | SYSCFG_ITLINE1_SR_VDDIO2)) /* VDDIO2 Interrupt .... */
bogdanm 92:4fc01daae5a5 308 #define HAL_ITLINE_RTC_WAKEUP ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18) | SYSCFG_ITLINE2_SR_RTC_WAKEUP)) /* RTC WAKEUP -> exti[20] Interrupt */
bogdanm 92:4fc01daae5a5 309 #define HAL_ITLINE_RTC_TSTAMP ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18) | SYSCFG_ITLINE2_SR_RTC_TSTAMP)) /* RTC Time Stamp -> exti[19] interrupt */
bogdanm 92:4fc01daae5a5 310 #define HAL_ITLINE_RTC_ALRA ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18) | SYSCFG_ITLINE2_SR_RTC_ALRA)) /* RTC Alarm -> exti[17] interrupt .... */
bogdanm 92:4fc01daae5a5 311 #define HAL_ITLINE_FLASH_ITF ((uint32_t) ((HAL_SYSCFG_ITLINE3 << 0x18) | SYSCFG_ITLINE3_SR_FLASH_ITF)) /* Flash ITF Interrupt */
bogdanm 92:4fc01daae5a5 312 #define HAL_ITLINE_CRS ((uint32_t) ((HAL_SYSCFG_ITLINE4 << 0x18) | SYSCFG_ITLINE4_SR_CRS)) /* CRS Interrupt */
bogdanm 92:4fc01daae5a5 313 #define HAL_ITLINE_CLK_CTRL ((uint32_t) ((HAL_SYSCFG_ITLINE4 << 0x18) | SYSCFG_ITLINE4_SR_CLK_CTRL)) /* CLK Control Interrupt */
bogdanm 92:4fc01daae5a5 314 #define HAL_ITLINE_EXTI0 ((uint32_t) ((HAL_SYSCFG_ITLINE5 << 0x18) | SYSCFG_ITLINE5_SR_EXTI0)) /* External Interrupt 0 */
bogdanm 92:4fc01daae5a5 315 #define HAL_ITLINE_EXTI1 ((uint32_t) ((HAL_SYSCFG_ITLINE5 << 0x18) | SYSCFG_ITLINE5_SR_EXTI1)) /* External Interrupt 1 */
bogdanm 92:4fc01daae5a5 316 #define HAL_ITLINE_EXTI2 ((uint32_t) ((HAL_SYSCFG_ITLINE6 << 0x18) | SYSCFG_ITLINE6_SR_EXTI2)) /* External Interrupt 2 */
bogdanm 92:4fc01daae5a5 317 #define HAL_ITLINE_EXTI3 ((uint32_t) ((HAL_SYSCFG_ITLINE6 << 0x18) | SYSCFG_ITLINE6_SR_EXTI3)) /* External Interrupt 3 */
bogdanm 92:4fc01daae5a5 318 #define HAL_ITLINE_EXTI4 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI4)) /* EXTI4 Interrupt */
bogdanm 92:4fc01daae5a5 319 #define HAL_ITLINE_EXTI5 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI5)) /* EXTI5 Interrupt */
bogdanm 92:4fc01daae5a5 320 #define HAL_ITLINE_EXTI6 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI6)) /* EXTI6 Interrupt */
bogdanm 92:4fc01daae5a5 321 #define HAL_ITLINE_EXTI7 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI7)) /* EXTI7 Interrupt */
bogdanm 92:4fc01daae5a5 322 #define HAL_ITLINE_EXTI8 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI8)) /* EXTI8 Interrupt */
bogdanm 92:4fc01daae5a5 323 #define HAL_ITLINE_EXTI9 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI9)) /* EXTI9 Interrupt */
bogdanm 92:4fc01daae5a5 324 #define HAL_ITLINE_EXTI10 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI10)) /* EXTI10 Interrupt */
bogdanm 92:4fc01daae5a5 325 #define HAL_ITLINE_EXTI11 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI11)) /* EXTI11 Interrupt */
bogdanm 92:4fc01daae5a5 326 #define HAL_ITLINE_EXTI12 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI12)) /* EXTI12 Interrupt */
bogdanm 92:4fc01daae5a5 327 #define HAL_ITLINE_EXTI13 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI13)) /* EXTI13 Interrupt */
bogdanm 92:4fc01daae5a5 328 #define HAL_ITLINE_EXTI14 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI14)) /* EXTI14 Interrupt */
bogdanm 92:4fc01daae5a5 329 #define HAL_ITLINE_EXTI15 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI15)) /* EXTI15 Interrupt */
bogdanm 92:4fc01daae5a5 330 #define HAL_ITLINE_TSC_EOA ((uint32_t) ((HAL_SYSCFG_ITLINE8 << 0x18) | SYSCFG_ITLINE8_SR_TSC_EOA)) /* Touch control EOA Interrupt */
bogdanm 92:4fc01daae5a5 331 #define HAL_ITLINE_TSC_MCE ((uint32_t) ((HAL_SYSCFG_ITLINE8 << 0x18) | SYSCFG_ITLINE8_SR_TSC_MCE)) /* Touch control MCE Interrupt */
bogdanm 92:4fc01daae5a5 332 #define HAL_ITLINE_DMA1_CH1 ((uint32_t) ((HAL_SYSCFG_ITLINE9 << 0x18) | SYSCFG_ITLINE9_SR_DMA1_CH1)) /* DMA1 Channel 1 Interrupt */
bogdanm 92:4fc01daae5a5 333 #define HAL_ITLINE_DMA1_CH2 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA1_CH2)) /* DMA1 Channel 2 Interrupt */
bogdanm 92:4fc01daae5a5 334 #define HAL_ITLINE_DMA1_CH3 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA1_CH3)) /* DMA1 Channel 3 Interrupt */
bogdanm 92:4fc01daae5a5 335 #define HAL_ITLINE_DMA2_CH1 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA2_CH1)) /* DMA2 Channel 1 Interrupt */
bogdanm 92:4fc01daae5a5 336 #define HAL_ITLINE_DMA2_CH2 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA2_CH2)) /* DMA2 Channel 2 Interrupt */
bogdanm 92:4fc01daae5a5 337 #define HAL_ITLINE_DMA1_CH4 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH4)) /* DMA1 Channel 4 Interrupt */
bogdanm 92:4fc01daae5a5 338 #define HAL_ITLINE_DMA1_CH5 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH5)) /* DMA1 Channel 5 Interrupt */
bogdanm 92:4fc01daae5a5 339 #define HAL_ITLINE_DMA1_CH6 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH6)) /* DMA1 Channel 6 Interrupt */
bogdanm 92:4fc01daae5a5 340 #define HAL_ITLINE_DMA1_CH7 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH7)) /* DMA1 Channel 7 Interrupt */
bogdanm 92:4fc01daae5a5 341 #define HAL_ITLINE_DMA2_CH3 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA2_CH3)) /* DMA2 Channel 3 Interrupt */
bogdanm 92:4fc01daae5a5 342 #define HAL_ITLINE_DMA2_CH4 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA2_CH4)) /* DMA2 Channel 4 Interrupt */
bogdanm 92:4fc01daae5a5 343 #define HAL_ITLINE_DMA2_CH5 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA2_CH5)) /* DMA2 Channel 5 Interrupt */
bogdanm 92:4fc01daae5a5 344 #define HAL_ITLINE_ADC ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18) | SYSCFG_ITLINE12_SR_ADC)) /* ADC Interrupt */
bogdanm 92:4fc01daae5a5 345 #define HAL_ITLINE_COMP1 ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18) | SYSCFG_ITLINE12_SR_COMP1)) /* COMP1 Interrupt -> exti[21] */
bogdanm 92:4fc01daae5a5 346 #define HAL_ITLINE_COMP2 ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18) | SYSCFG_ITLINE12_SR_COMP2)) /* COMP2 Interrupt -> exti[21] */
bogdanm 92:4fc01daae5a5 347 #define HAL_ITLINE_TIM1_BRK ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_BRK)) /* TIM1 BRK Interrupt */
bogdanm 92:4fc01daae5a5 348 #define HAL_ITLINE_TIM1_UPD ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_UPD)) /* TIM1 UPD Interrupt */
bogdanm 92:4fc01daae5a5 349 #define HAL_ITLINE_TIM1_TRG ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_TRG)) /* TIM1 TRG Interrupt */
bogdanm 92:4fc01daae5a5 350 #define HAL_ITLINE_TIM1_CCU ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_CCU)) /* TIM1 CCU Interrupt */
bogdanm 92:4fc01daae5a5 351 #define HAL_ITLINE_TIM1_CC ((uint32_t) ((HAL_SYSCFG_ITLINE14 << 0x18) | SYSCFG_ITLINE14_SR_TIM1_CC)) /* TIM1 CC Interrupt */
bogdanm 92:4fc01daae5a5 352 #define HAL_ITLINE_TIM2 ((uint32_t) ((HAL_SYSCFG_ITLINE15 << 0x18) | SYSCFG_ITLINE15_SR_TIM2_GLB)) /* TIM2 Interrupt */
bogdanm 92:4fc01daae5a5 353 #define HAL_ITLINE_TIM3 ((uint32_t) ((HAL_SYSCFG_ITLINE16 << 0x18) | SYSCFG_ITLINE16_SR_TIM3_GLB)) /* TIM3 Interrupt */
bogdanm 92:4fc01daae5a5 354 #define HAL_ITLINE_DAC ((uint32_t) ((HAL_SYSCFG_ITLINE17 << 0x18) | SYSCFG_ITLINE17_SR_DAC)) /* DAC Interrupt */
bogdanm 92:4fc01daae5a5 355 #define HAL_ITLINE_TIM6 ((uint32_t) ((HAL_SYSCFG_ITLINE17 << 0x18) | SYSCFG_ITLINE17_SR_TIM6_GLB)) /* TIM6 Interrupt */
bogdanm 92:4fc01daae5a5 356 #define HAL_ITLINE_TIM7 ((uint32_t) ((HAL_SYSCFG_ITLINE18 << 0x18) | SYSCFG_ITLINE18_SR_TIM7_GLB)) /* TIM7 Interrupt */
bogdanm 92:4fc01daae5a5 357 #define HAL_ITLINE_TIM14 ((uint32_t) ((HAL_SYSCFG_ITLINE19 << 0x18) | SYSCFG_ITLINE19_SR_TIM14_GLB)) /* TIM14 Interrupt */
bogdanm 92:4fc01daae5a5 358 #define HAL_ITLINE_TIM15 ((uint32_t) ((HAL_SYSCFG_ITLINE20 << 0x18) | SYSCFG_ITLINE20_SR_TIM15_GLB)) /* TIM15 Interrupt */
bogdanm 92:4fc01daae5a5 359 #define HAL_ITLINE_TIM16 ((uint32_t) ((HAL_SYSCFG_ITLINE21 << 0x18) | SYSCFG_ITLINE21_SR_TIM16_GLB)) /* TIM16 Interrupt */
bogdanm 92:4fc01daae5a5 360 #define HAL_ITLINE_TIM17 ((uint32_t) ((HAL_SYSCFG_ITLINE22 << 0x18) | SYSCFG_ITLINE22_SR_TIM17_GLB)) /* TIM17 Interrupt */
bogdanm 92:4fc01daae5a5 361 #define HAL_ITLINE_I2C1 ((uint32_t) ((HAL_SYSCFG_ITLINE23 << 0x18) | SYSCFG_ITLINE23_SR_I2C1_GLB)) /* I2C1 Interrupt -> exti[23] */
bogdanm 92:4fc01daae5a5 362 #define HAL_ITLINE_I2C2 ((uint32_t) ((HAL_SYSCFG_ITLINE24 << 0x18) | SYSCFG_ITLINE24_SR_I2C2_GLB)) /* I2C2 Interrupt */
bogdanm 92:4fc01daae5a5 363 #define HAL_ITLINE_SPI1 ((uint32_t) ((HAL_SYSCFG_ITLINE25 << 0x18) | SYSCFG_ITLINE25_SR_SPI1)) /* I2C1 Interrupt -> exti[23] */
bogdanm 92:4fc01daae5a5 364 #define HAL_ITLINE_SPI2 ((uint32_t) ((HAL_SYSCFG_ITLINE26 << 0x18) | SYSCFG_ITLINE26_SR_SPI2)) /* SPI1 Interrupt */
bogdanm 92:4fc01daae5a5 365 #define HAL_ITLINE_USART1 ((uint32_t) ((HAL_SYSCFG_ITLINE27 << 0x18) | SYSCFG_ITLINE27_SR_USART1_GLB)) /*!< USART1 GLB Interrupt -> exti[25] */
bogdanm 92:4fc01daae5a5 366 #define HAL_ITLINE_USART2 ((uint32_t) ((HAL_SYSCFG_ITLINE28 << 0x18) | SYSCFG_ITLINE28_SR_USART2_GLB)) /*!< USART2 GLB Interrupt -> exti[26] */
bogdanm 92:4fc01daae5a5 367 #define HAL_ITLINE_USART3 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART3_GLB)) /* USART3 Interrupt .... */
bogdanm 92:4fc01daae5a5 368 #define HAL_ITLINE_USART4 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART4_GLB)) /* USART4 Interrupt .... */
bogdanm 92:4fc01daae5a5 369 #define HAL_ITLINE_USART5 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART5_GLB)) /* USART5 Interrupt .... */
bogdanm 92:4fc01daae5a5 370 #define HAL_ITLINE_USART6 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART6_GLB)) /* USART6 Interrupt .... */
bogdanm 92:4fc01daae5a5 371 #define HAL_ITLINE_USART7 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART7_GLB)) /* USART7 Interrupt .... */
bogdanm 92:4fc01daae5a5 372 #define HAL_ITLINE_USART8 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART8_GLB)) /* USART8 Interrupt .... */
bogdanm 92:4fc01daae5a5 373 #define HAL_ITLINE_CAN ((uint32_t) ((HAL_SYSCFG_ITLINE30 << 0x18) | SYSCFG_ITLINE30_SR_CAN)) /* CAN Interrupt */
bogdanm 92:4fc01daae5a5 374 #define HAL_ITLINE_CEC ((uint32_t) ((HAL_SYSCFG_ITLINE30 << 0x18) | SYSCFG_ITLINE30_SR_CEC)) /* CEC Interrupt -> exti[27] */
bogdanm 92:4fc01daae5a5 375 /**
bogdanm 92:4fc01daae5a5 376 * @}
bogdanm 92:4fc01daae5a5 377 */
bogdanm 92:4fc01daae5a5 378 #endif /* STM32F091xC || STM32F098xx */
bogdanm 92:4fc01daae5a5 379
bogdanm 92:4fc01daae5a5 380 /**
bogdanm 92:4fc01daae5a5 381 * @}
bogdanm 92:4fc01daae5a5 382 */
bogdanm 85:024bf7f99721 383
bogdanm 85:024bf7f99721 384 /* Exported macros -----------------------------------------------------------*/
bogdanm 92:4fc01daae5a5 385 /** @defgroup HAL_Exported_Macros HAL Exported Macros
bogdanm 92:4fc01daae5a5 386 * @{
bogdanm 92:4fc01daae5a5 387 */
bogdanm 85:024bf7f99721 388
bogdanm 92:4fc01daae5a5 389 /** @defgroup HAL_Freeze_Unfreeze_Peripherals HAL Freeze Unfreeze Peripherals
bogdanm 92:4fc01daae5a5 390 * @brief Freeze/Unfreeze Peripherals in Debug mode
bogdanm 92:4fc01daae5a5 391 * @{
bogdanm 85:024bf7f99721 392 */
bogdanm 92:4fc01daae5a5 393
bogdanm 92:4fc01daae5a5 394 #if defined(DBGMCU_APB1_FZ_DBG_CAN_STOP)
bogdanm 92:4fc01daae5a5 395 #define __HAL_FREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN_STOP))
bogdanm 92:4fc01daae5a5 396 #define __HAL_UNFREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN_STOP))
bogdanm 92:4fc01daae5a5 397 #endif /* DBGMCU_APB1_FZ_DBG_CAN_STOP */
bogdanm 85:024bf7f99721 398
bogdanm 92:4fc01daae5a5 399 #if defined(DBGMCU_APB1_FZ_DBG_RTC_STOP)
bogdanm 85:024bf7f99721 400 #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
bogdanm 85:024bf7f99721 401 #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
bogdanm 92:4fc01daae5a5 402 #endif /* DBGMCU_APB1_FZ_DBG_RTC_STOP */
bogdanm 85:024bf7f99721 403
bogdanm 92:4fc01daae5a5 404 #if defined(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)
bogdanm 92:4fc01daae5a5 405 #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
bogdanm 92:4fc01daae5a5 406 #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
bogdanm 92:4fc01daae5a5 407 #endif /* DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT */
bogdanm 85:024bf7f99721 408
bogdanm 92:4fc01daae5a5 409 #if defined(DBGMCU_APB1_FZ_DBG_IWDG_STOP)
bogdanm 85:024bf7f99721 410 #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
bogdanm 85:024bf7f99721 411 #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
bogdanm 92:4fc01daae5a5 412 #endif /* DBGMCU_APB1_FZ_DBG_IWDG_STOP */
bogdanm 85:024bf7f99721 413
bogdanm 92:4fc01daae5a5 414 #if defined(DBGMCU_APB1_FZ_DBG_WWDG_STOP)
bogdanm 92:4fc01daae5a5 415 #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
bogdanm 92:4fc01daae5a5 416 #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
bogdanm 92:4fc01daae5a5 417 #endif /* DBGMCU_APB1_FZ_DBG_WWDG_STOP */
bogdanm 92:4fc01daae5a5 418
bogdanm 92:4fc01daae5a5 419 #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP)
bogdanm 85:024bf7f99721 420 #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
bogdanm 85:024bf7f99721 421 #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
bogdanm 92:4fc01daae5a5 422 #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */
bogdanm 85:024bf7f99721 423
bogdanm 92:4fc01daae5a5 424 #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP)
bogdanm 92:4fc01daae5a5 425 #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
bogdanm 92:4fc01daae5a5 426 #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
bogdanm 92:4fc01daae5a5 427 #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */
bogdanm 92:4fc01daae5a5 428
bogdanm 92:4fc01daae5a5 429 #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP)
bogdanm 85:024bf7f99721 430 #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
bogdanm 85:024bf7f99721 431 #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
bogdanm 92:4fc01daae5a5 432 #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */
bogdanm 85:024bf7f99721 433
bogdanm 92:4fc01daae5a5 434 #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP)
bogdanm 85:024bf7f99721 435 #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
bogdanm 85:024bf7f99721 436 #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
bogdanm 92:4fc01daae5a5 437 #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */
bogdanm 85:024bf7f99721 438
bogdanm 92:4fc01daae5a5 439 #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP)
bogdanm 92:4fc01daae5a5 440 #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
bogdanm 92:4fc01daae5a5 441 #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
bogdanm 92:4fc01daae5a5 442 #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
bogdanm 85:024bf7f99721 443
bogdanm 92:4fc01daae5a5 444 #if defined(DBGMCU_APB2_FZ_DBG_TIM1_STOP)
bogdanm 85:024bf7f99721 445 #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
bogdanm 85:024bf7f99721 446 #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
bogdanm 92:4fc01daae5a5 447 #endif /* DBGMCU_APB2_FZ_DBG_TIM1_STOP */
bogdanm 85:024bf7f99721 448
bogdanm 92:4fc01daae5a5 449 #if defined(DBGMCU_APB2_FZ_DBG_TIM15_STOP)
bogdanm 85:024bf7f99721 450 #define __HAL_FREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM15_STOP))
bogdanm 85:024bf7f99721 451 #define __HAL_UNFREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM15_STOP))
bogdanm 92:4fc01daae5a5 452 #endif /* DBGMCU_APB2_FZ_DBG_TIM15_STOP */
bogdanm 85:024bf7f99721 453
bogdanm 92:4fc01daae5a5 454 #if defined(DBGMCU_APB2_FZ_DBG_TIM16_STOP)
bogdanm 85:024bf7f99721 455 #define __HAL_FREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM16_STOP))
bogdanm 85:024bf7f99721 456 #define __HAL_UNFREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM16_STOP))
bogdanm 92:4fc01daae5a5 457 #endif /* DBGMCU_APB2_FZ_DBG_TIM16_STOP */
bogdanm 85:024bf7f99721 458
bogdanm 92:4fc01daae5a5 459 #if defined(DBGMCU_APB2_FZ_DBG_TIM17_STOP)
bogdanm 85:024bf7f99721 460 #define __HAL_FREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM17_STOP))
bogdanm 85:024bf7f99721 461 #define __HAL_UNFREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM17_STOP))
bogdanm 92:4fc01daae5a5 462 #endif /* DBGMCU_APB2_FZ_DBG_TIM17_STOP */
bogdanm 85:024bf7f99721 463
bogdanm 92:4fc01daae5a5 464 /**
bogdanm 92:4fc01daae5a5 465 * @}
bogdanm 92:4fc01daae5a5 466 */
bogdanm 92:4fc01daae5a5 467
bogdanm 92:4fc01daae5a5 468 /** @defgroup Memory_Mapping_Selection Memory Mapping Selection
bogdanm 92:4fc01daae5a5 469 * @{
bogdanm 92:4fc01daae5a5 470 */
bogdanm 92:4fc01daae5a5 471 #if defined(SYSCFG_CFGR1_MEM_MODE)
bogdanm 85:024bf7f99721 472 /** @brief Main Flash memory mapped at 0x00000000
bogdanm 85:024bf7f99721 473 */
bogdanm 85:024bf7f99721 474 #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE))
bogdanm 92:4fc01daae5a5 475 #endif /* SYSCFG_CFGR1_MEM_MODE */
bogdanm 85:024bf7f99721 476
bogdanm 92:4fc01daae5a5 477 #if defined(SYSCFG_CFGR1_MEM_MODE_0)
bogdanm 85:024bf7f99721 478 /** @brief System Flash memory mapped at 0x00000000
bogdanm 85:024bf7f99721 479 */
bogdanm 85:024bf7f99721 480 #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
bogdanm 85:024bf7f99721 481 SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_0; \
bogdanm 85:024bf7f99721 482 }while(0)
bogdanm 92:4fc01daae5a5 483 #endif /* SYSCFG_CFGR1_MEM_MODE_0 */
bogdanm 85:024bf7f99721 484
bogdanm 92:4fc01daae5a5 485 #if defined(SYSCFG_CFGR1_MEM_MODE_0) && defined(SYSCFG_CFGR1_MEM_MODE_1)
bogdanm 85:024bf7f99721 486 /** @brief Embedded SRAM mapped at 0x00000000
bogdanm 85:024bf7f99721 487 */
bogdanm 85:024bf7f99721 488 #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
bogdanm 85:024bf7f99721 489 SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1); \
bogdanm 92:4fc01daae5a5 490 }while(0)
bogdanm 92:4fc01daae5a5 491 #endif /* SYSCFG_CFGR1_MEM_MODE_0 && SYSCFG_CFGR1_MEM_MODE_1 */
bogdanm 92:4fc01daae5a5 492 /**
bogdanm 92:4fc01daae5a5 493 * @}
bogdanm 92:4fc01daae5a5 494 */
bogdanm 85:024bf7f99721 495
bogdanm 92:4fc01daae5a5 496 #if defined(SYSCFG_CFGR1_DMA_RMP)
bogdanm 92:4fc01daae5a5 497 /** @defgroup HAL_DMA_remap HAL DMA remap
bogdanm 92:4fc01daae5a5 498 * @brief DMA remapping enable/disable macros
bogdanm 92:4fc01daae5a5 499 * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_remapping
bogdanm 92:4fc01daae5a5 500 * @{
bogdanm 85:024bf7f99721 501 */
bogdanm 85:024bf7f99721 502 #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
bogdanm 85:024bf7f99721 503 SYSCFG->CFGR1 |= (__DMA_REMAP__); \
bogdanm 85:024bf7f99721 504 }while(0)
bogdanm 85:024bf7f99721 505 #define __HAL_REMAPDMA_CHANNEL_DISABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
bogdanm 85:024bf7f99721 506 SYSCFG->CFGR1 &= ~(__DMA_REMAP__); \
bogdanm 85:024bf7f99721 507 }while(0)
bogdanm 92:4fc01daae5a5 508 /**
bogdanm 92:4fc01daae5a5 509 * @}
bogdanm 92:4fc01daae5a5 510 */
bogdanm 92:4fc01daae5a5 511 #endif /* SYSCFG_CFGR1_DMA_RMP */
bogdanm 85:024bf7f99721 512
bogdanm 92:4fc01daae5a5 513 #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
bogdanm 92:4fc01daae5a5 514 /** @defgroup HAL_Pin_remap HAL Pin remap
bogdanm 92:4fc01daae5a5 515 * @brief Pin remapping enable/disable macros
bogdanm 92:4fc01daae5a5 516 * @param __PIN_REMAP__: This parameter can be a value of @ref HAL_Pin_remapping
bogdanm 92:4fc01daae5a5 517 * @{
bogdanm 85:024bf7f99721 518 */
bogdanm 85:024bf7f99721 519 #define __HAL_REMAP_PIN_ENABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
bogdanm 85:024bf7f99721 520 SYSCFG->CFGR1 |= (__PIN_REMAP__); \
bogdanm 85:024bf7f99721 521 }while(0)
bogdanm 92:4fc01daae5a5 522 #define __HAL_REMAP_PIN_DISABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
bogdanm 85:024bf7f99721 523 SYSCFG->CFGR1 &= ~(__PIN_REMAP__); \
bogdanm 85:024bf7f99721 524 }while(0)
bogdanm 92:4fc01daae5a5 525 /**
bogdanm 92:4fc01daae5a5 526 * @}
bogdanm 92:4fc01daae5a5 527 */
bogdanm 92:4fc01daae5a5 528 #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
bogdanm 85:024bf7f99721 529
bogdanm 92:4fc01daae5a5 530 /** @defgroup HAL_Fast_mode_plus_driving_cap HAL Fast mode plus driving cap
bogdanm 92:4fc01daae5a5 531 * @brief Fast mode Plus driving capability enable/disable macros
bogdanm 85:024bf7f99721 532 * @param __FASTMODEPLUS__: This parameter can be a value of @ref HAL_FastModePlus_I2C
bogdanm 92:4fc01daae5a5 533 * @{
bogdanm 85:024bf7f99721 534 */
bogdanm 85:024bf7f99721 535 #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
bogdanm 85:024bf7f99721 536 SYSCFG->CFGR1 |= (__FASTMODEPLUS__); \
bogdanm 85:024bf7f99721 537 }while(0)
bogdanm 85:024bf7f99721 538
bogdanm 85:024bf7f99721 539 #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
bogdanm 85:024bf7f99721 540 SYSCFG->CFGR1 &= ~(__FASTMODEPLUS__); \
bogdanm 85:024bf7f99721 541 }while(0)
bogdanm 92:4fc01daae5a5 542 /**
bogdanm 92:4fc01daae5a5 543 * @}
bogdanm 92:4fc01daae5a5 544 */
bogdanm 92:4fc01daae5a5 545
bogdanm 92:4fc01daae5a5 546 #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
bogdanm 92:4fc01daae5a5 547 /** @defgroup Cortex_Lockup_Enable Cortex Lockup Enable
bogdanm 92:4fc01daae5a5 548 * @{
bogdanm 92:4fc01daae5a5 549 */
bogdanm 85:024bf7f99721 550 /** @brief SYSCFG Break Lockup lock
bogdanm 85:024bf7f99721 551 * Enables and locks the connection of Cortex-M0 LOCKUP (Hardfault) output to TIM1/15/16/17 Break input
bogdanm 85:024bf7f99721 552 * @note The selected configuration is locked and can be unlocked by system reset
bogdanm 85:024bf7f99721 553 */
bogdanm 85:024bf7f99721 554 #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_LOCKUP_LOCK); \
bogdanm 85:024bf7f99721 555 SYSCFG->CFGR2 |= SYSCFG_CFGR2_LOCKUP_LOCK; \
bogdanm 85:024bf7f99721 556 }while(0)
bogdanm 92:4fc01daae5a5 557 /**
bogdanm 92:4fc01daae5a5 558 * @}
bogdanm 92:4fc01daae5a5 559 */
bogdanm 92:4fc01daae5a5 560 #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */
bogdanm 85:024bf7f99721 561
bogdanm 92:4fc01daae5a5 562 #if defined(SYSCFG_CFGR2_PVD_LOCK)
bogdanm 92:4fc01daae5a5 563 /** @defgroup PVD_Lock_Enable PVD Lock
bogdanm 92:4fc01daae5a5 564 * @{
bogdanm 92:4fc01daae5a5 565 */
bogdanm 85:024bf7f99721 566 /** @brief SYSCFG Break PVD lock
bogdanm 85:024bf7f99721 567 * Enables and locks the PVD connection with Timer1/8/15/16/17 Break Input, , as well as the PVDE and PLS[2:0] in the PWR_CR register
bogdanm 85:024bf7f99721 568 * @note The selected configuration is locked and can be unlocked by system reset
bogdanm 85:024bf7f99721 569 */
bogdanm 85:024bf7f99721 570 #define __HAL_SYSCFG_BREAK_PVD_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_PVD_LOCK); \
bogdanm 85:024bf7f99721 571 SYSCFG->CFGR2 |= SYSCFG_CFGR2_PVD_LOCK; \
bogdanm 85:024bf7f99721 572 }while(0)
bogdanm 92:4fc01daae5a5 573 /**
bogdanm 92:4fc01daae5a5 574 * @}
bogdanm 92:4fc01daae5a5 575 */
bogdanm 92:4fc01daae5a5 576 #endif /* SYSCFG_CFGR2_PVD_LOCK */
bogdanm 85:024bf7f99721 577
bogdanm 92:4fc01daae5a5 578 #if defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK)
bogdanm 92:4fc01daae5a5 579 /** @defgroup SRAM_Parity_Lock SRAM Parity Lock
bogdanm 92:4fc01daae5a5 580 * @{
bogdanm 92:4fc01daae5a5 581 */
bogdanm 85:024bf7f99721 582 /** @brief SYSCFG Break SRAM PARITY lock
bogdanm 85:024bf7f99721 583 * Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1/8/15/16/17
bogdanm 85:024bf7f99721 584 * @note The selected configuration is locked and can be unlocked by system reset
bogdanm 85:024bf7f99721 585 */
bogdanm 85:024bf7f99721 586 #define __HAL_SYSCFG_BREAK_SRAMPARITY_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_SRAM_PARITY_LOCK); \
bogdanm 85:024bf7f99721 587 SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PARITY_LOCK; \
bogdanm 85:024bf7f99721 588 }while(0)
bogdanm 92:4fc01daae5a5 589 /**
bogdanm 92:4fc01daae5a5 590 * @}
bogdanm 92:4fc01daae5a5 591 */
bogdanm 92:4fc01daae5a5 592 #endif /* SYSCFG_CFGR2_SRAM_PARITY_LOCK */
bogdanm 85:024bf7f99721 593
bogdanm 92:4fc01daae5a5 594 #if defined(SYSCFG_CFGR2_SRAM_PEF)
bogdanm 92:4fc01daae5a5 595 /** @defgroup HAL_SYSCFG_Parity_check_on_RAM HAL SYSCFG Parity check on RAM
bogdanm 85:024bf7f99721 596 * @brief Parity check on RAM disable macro
bogdanm 85:024bf7f99721 597 * @note Disabling the parity check on RAM locks the configuration bit.
bogdanm 85:024bf7f99721 598 * To re-enable the parity check on RAM perform a system reset.
bogdanm 92:4fc01daae5a5 599 * @{
bogdanm 85:024bf7f99721 600 */
bogdanm 85:024bf7f99721 601 #define __HAL_SYSCFG_RAM_PARITYCHECK_DISABLE() (SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PEF)
bogdanm 92:4fc01daae5a5 602 /**
bogdanm 92:4fc01daae5a5 603 * @}
bogdanm 92:4fc01daae5a5 604 */
bogdanm 92:4fc01daae5a5 605 #endif /* SYSCFG_CFGR2_SRAM_PEF */
bogdanm 85:024bf7f99721 606
bogdanm 85:024bf7f99721 607
bogdanm 92:4fc01daae5a5 608 #if defined(STM32F091xC) || defined (STM32F098xx)
bogdanm 92:4fc01daae5a5 609 /** @defgroup HAL_ISR_wrapper_check HAL ISR wrapper check
bogdanm 92:4fc01daae5a5 610 * @brief ISR wrapper check
bogdanm 92:4fc01daae5a5 611 * @note Allow to determine interrupt source per line.
bogdanm 92:4fc01daae5a5 612 * @{
bogdanm 92:4fc01daae5a5 613 */
bogdanm 92:4fc01daae5a5 614 #define __HAL_GET_PENDING_IT(__SOURCE__) (SYSCFG->IT_LINE_SR[((__SOURCE__) >> 0x18)] & ((__SOURCE__) & 0x00FFFFFF))
bogdanm 92:4fc01daae5a5 615 /**
bogdanm 92:4fc01daae5a5 616 * @}
bogdanm 92:4fc01daae5a5 617 */
bogdanm 92:4fc01daae5a5 618 #endif /* (STM32F091xC) || defined (STM32F098xx)*/
bogdanm 85:024bf7f99721 619
bogdanm 92:4fc01daae5a5 620 #if defined(STM32F091xC) || defined (STM32F098xx)
bogdanm 92:4fc01daae5a5 621 /** @defgroup HAL_SYSCFG_IRDA_modulation_envelope_selection HAL SYSCFG IRDA modulation envelope selection
bogdanm 92:4fc01daae5a5 622 * @brief selection of the modulation envelope signal macro, using bits [7:6] of SYS_CTRL(CFGR1) register
bogdanm 92:4fc01daae5a5 623 * @param __SOURCE__: This parameter can be a value of @ref HAL_IRDA_ENV_SEL
bogdanm 92:4fc01daae5a5 624 * @{
bogdanm 92:4fc01daae5a5 625 */
bogdanm 92:4fc01daae5a5 626 #define __HAL_SYSCFG_IRDA_ENV_SELECTION(__SOURCE__) do {assert_param(IS_HAL_SYSCFG_IRDA_ENV_SEL((__SOURCE__))); \
bogdanm 92:4fc01daae5a5 627 SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_IRDA_ENV_SEL); \
bogdanm 92:4fc01daae5a5 628 SYSCFG->CFGR1 |= (__SOURCE__); \
bogdanm 92:4fc01daae5a5 629 }while(0)
bogdanm 92:4fc01daae5a5 630
bogdanm 92:4fc01daae5a5 631 #define __HAL_SYSCFG_GET_IRDA_ENV_SELECTION() ((SYSCFG->CFGR1) & 0x000000C0)
bogdanm 92:4fc01daae5a5 632 /**
bogdanm 92:4fc01daae5a5 633 * @}
bogdanm 92:4fc01daae5a5 634 */
bogdanm 92:4fc01daae5a5 635 #endif /* (STM32F091xC) || defined (STM32F098xx)*/
bogdanm 92:4fc01daae5a5 636
bogdanm 92:4fc01daae5a5 637 /**
bogdanm 92:4fc01daae5a5 638 * @}
bogdanm 92:4fc01daae5a5 639 */
bogdanm 92:4fc01daae5a5 640 /* Exported functions --------------------------------------------------------*/
bogdanm 92:4fc01daae5a5 641 /** @addtogroup HAL_Exported_Functions HAL Exported Functions
bogdanm 92:4fc01daae5a5 642 * @{
bogdanm 92:4fc01daae5a5 643 */
bogdanm 92:4fc01daae5a5 644
bogdanm 92:4fc01daae5a5 645 /** @addtogroup HAL_Exported_Functions_Group1 Initialization and de-initialization Functions
bogdanm 92:4fc01daae5a5 646 * @brief Initialization and de-initialization functions
bogdanm 92:4fc01daae5a5 647 * @{
bogdanm 92:4fc01daae5a5 648 */
bogdanm 92:4fc01daae5a5 649 /* Initialization and de-initialization functions ******************************/
bogdanm 85:024bf7f99721 650 HAL_StatusTypeDef HAL_Init(void);
bogdanm 85:024bf7f99721 651 HAL_StatusTypeDef HAL_DeInit(void);
bogdanm 85:024bf7f99721 652 void HAL_MspInit(void);
bogdanm 85:024bf7f99721 653 void HAL_MspDeInit(void);
bogdanm 85:024bf7f99721 654 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
bogdanm 92:4fc01daae5a5 655 /**
bogdanm 92:4fc01daae5a5 656 * @}
bogdanm 92:4fc01daae5a5 657 */
bogdanm 85:024bf7f99721 658
bogdanm 92:4fc01daae5a5 659 /** @addtogroup HAL_Exported_Functions_Group2 HAL Control functions
bogdanm 92:4fc01daae5a5 660 * @brief HAL Control functions
bogdanm 92:4fc01daae5a5 661 * @{
bogdanm 92:4fc01daae5a5 662 */
bogdanm 85:024bf7f99721 663 /* Peripheral Control functions **********************************************/
bogdanm 85:024bf7f99721 664 void HAL_IncTick(void);
bogdanm 85:024bf7f99721 665 void HAL_Delay(__IO uint32_t Delay);
bogdanm 85:024bf7f99721 666 uint32_t HAL_GetTick(void);
bogdanm 85:024bf7f99721 667 void HAL_SuspendTick(void);
bogdanm 85:024bf7f99721 668 void HAL_ResumeTick(void);
bogdanm 85:024bf7f99721 669 uint32_t HAL_GetHalVersion(void);
bogdanm 85:024bf7f99721 670 uint32_t HAL_GetREVID(void);
bogdanm 85:024bf7f99721 671 uint32_t HAL_GetDEVID(void);
bogdanm 85:024bf7f99721 672 void HAL_EnableDBGStopMode(void);
bogdanm 85:024bf7f99721 673 void HAL_DisableDBGStopMode(void);
bogdanm 85:024bf7f99721 674 void HAL_EnableDBGStandbyMode(void);
bogdanm 85:024bf7f99721 675 void HAL_DisableDBGStandbyMode(void);
bogdanm 92:4fc01daae5a5 676 /**
bogdanm 92:4fc01daae5a5 677 * @}
bogdanm 92:4fc01daae5a5 678 */
bogdanm 85:024bf7f99721 679
bogdanm 85:024bf7f99721 680 /**
bogdanm 85:024bf7f99721 681 * @}
bogdanm 85:024bf7f99721 682 */
bogdanm 85:024bf7f99721 683
bogdanm 85:024bf7f99721 684 /**
bogdanm 85:024bf7f99721 685 * @}
bogdanm 92:4fc01daae5a5 686 */
bogdanm 92:4fc01daae5a5 687
bogdanm 92:4fc01daae5a5 688 /**
bogdanm 92:4fc01daae5a5 689 * @}
bogdanm 85:024bf7f99721 690 */
bogdanm 85:024bf7f99721 691
bogdanm 85:024bf7f99721 692 #ifdef __cplusplus
bogdanm 85:024bf7f99721 693 }
bogdanm 85:024bf7f99721 694 #endif
bogdanm 85:024bf7f99721 695
bogdanm 85:024bf7f99721 696 #endif /* __STM32F0xx_HAL_H */
bogdanm 85:024bf7f99721 697
bogdanm 85:024bf7f99721 698 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/