my fork

Dependents:   Nucleo_blueNRG

Fork of mbed by mbed official

Committer:
filartrix
Date:
Wed Apr 08 14:12:53 2015 +0000
Revision:
97:4298809c7c9e
Parent:
93:e188a91d3eaa
First reale BlueNRG module for nucleo 401 board

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
Kojto 93:e188a91d3eaa 5 * @version V1.2.0
Kojto 93:e188a91d3eaa 6 * @date 11-December-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
Kojto 93:e188a91d3eaa 157 #if defined(STM32F091xC) || defined(STM32F098xx)
bogdanm 92:4fc01daae5a5 158 /** @defgroup HAL_IRDA_ENV_SEL HAL IRDA Enveloppe Selection
Kojto 93:e188a91d3eaa 159 * @note Applicable on STM32F09x
bogdanm 85:024bf7f99721 160 * @{
bogdanm 85:024bf7f99721 161 */
bogdanm 92:4fc01daae5a5 162 #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 163 #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 164 #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 165
bogdanm 92:4fc01daae5a5 166 #define IS_HAL_SYSCFG_IRDA_ENV_SEL(SEL) (((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_TIM16) || \
bogdanm 92:4fc01daae5a5 167 ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART1) || \
bogdanm 92:4fc01daae5a5 168 ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART4))
bogdanm 92:4fc01daae5a5 169 /**
bogdanm 92:4fc01daae5a5 170 * @}
bogdanm 92:4fc01daae5a5 171 */
Kojto 93:e188a91d3eaa 172 #endif /* STM32F091xC || STM32F098xx */
bogdanm 92:4fc01daae5a5 173
bogdanm 92:4fc01daae5a5 174
bogdanm 92:4fc01daae5a5 175 /** @defgroup HAL_FastModePlus_I2C HAL FastModePlus I2C
bogdanm 92:4fc01daae5a5 176 * @{
bogdanm 92:4fc01daae5a5 177 */
bogdanm 92:4fc01daae5a5 178 #if defined(SYSCFG_CFGR1_I2C_FMP_PB6)
bogdanm 85:024bf7f99721 179 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB6 (SYSCFG_CFGR1_I2C_FMP_PB6) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 180 0: PB6 pin operates in standard mode
bogdanm 85:024bf7f99721 181 1: I2C FM+ mode enabled on PB6 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 182 #endif /* SYSCFG_CFGR1_I2C_FMP_PB6 */
bogdanm 92:4fc01daae5a5 183
bogdanm 92:4fc01daae5a5 184 #if defined(SYSCFG_CFGR1_I2C_FMP_PB7)
bogdanm 85:024bf7f99721 185 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB7 (SYSCFG_CFGR1_I2C_FMP_PB7) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 186 0: PB7 pin operates in standard mode
bogdanm 85:024bf7f99721 187 1: I2C FM+ mode enabled on PB7 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 188 #endif /* SYSCFG_CFGR1_I2C_FMP_PB7 */
bogdanm 92:4fc01daae5a5 189
bogdanm 92:4fc01daae5a5 190 #if defined(SYSCFG_CFGR1_I2C_FMP_PB8)
bogdanm 85:024bf7f99721 191 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB8 (SYSCFG_CFGR1_I2C_FMP_PB8) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 192 0: PB8 pin operates in standard mode
bogdanm 85:024bf7f99721 193 1: I2C FM+ mode enabled on PB8 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 194 #endif /* SYSCFG_CFGR1_I2C_FMP_PB8 */
bogdanm 92:4fc01daae5a5 195
bogdanm 92:4fc01daae5a5 196 #if defined(SYSCFG_CFGR1_I2C_FMP_PB9)
bogdanm 85:024bf7f99721 197 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB9 (SYSCFG_CFGR1_I2C_FMP_PB9) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 198 0: PB9 pin operates in standard mode
bogdanm 92:4fc01daae5a5 199 1: I2C FM+ mode enabled on PB9 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 200 #endif /* SYSCFG_CFGR1_I2C_FMP_PB9 */
bogdanm 92:4fc01daae5a5 201
bogdanm 92:4fc01daae5a5 202 #if defined(SYSCFG_CFGR1_I2C_FMP_I2C1)
bogdanm 85:024bf7f99721 203 #define HAL_SYSCFG_FASTMODEPLUS_I2C1 (SYSCFG_CFGR1_I2C_FMP_I2C1) /*!< I2C1 fast mode Plus driving capability activation
bogdanm 85:024bf7f99721 204 0: FM+ mode is not enabled on I2C1 pins selected through AF selection bits
bogdanm 85:024bf7f99721 205 1: FM+ mode is enabled on I2C1 pins selected through AF selection bits */
bogdanm 92:4fc01daae5a5 206 #endif /* SYSCFG_CFGR1_I2C_FMP_I2C1 */
bogdanm 85:024bf7f99721 207
bogdanm 92:4fc01daae5a5 208 #if defined(SYSCFG_CFGR1_I2C_FMP_I2C2)
bogdanm 85:024bf7f99721 209 #define HAL_SYSCFG_FASTMODEPLUS_I2C2 (SYSCFG_CFGR1_I2C_FMP_I2C2) /*!< I2C2 fast mode Plus driving capability activation
bogdanm 85:024bf7f99721 210 0: FM+ mode is not enabled on I2C2 pins selected through AF selection bits
bogdanm 85:024bf7f99721 211 1: FM+ mode is enabled on I2C2 pins selected through AF selection bits */
bogdanm 92:4fc01daae5a5 212 #endif /* SYSCFG_CFGR1_I2C_FMP_I2C2 */
bogdanm 85:024bf7f99721 213
bogdanm 92:4fc01daae5a5 214 #if defined(SYSCFG_CFGR1_I2C_FMP_PA9)
Kojto 93:e188a91d3eaa 215 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PA9 (SYSCFG_CFGR1_I2C_FMP_PA9) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 216 0: PA9 pin operates in standard mode
bogdanm 85:024bf7f99721 217 1: FM+ mode is enabled on PA9 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 218 #endif /* SYSCFG_CFGR1_I2C_FMP_PA9 */
bogdanm 92:4fc01daae5a5 219
bogdanm 92:4fc01daae5a5 220 #if defined(SYSCFG_CFGR1_I2C_FMP_PA10)
Kojto 93:e188a91d3eaa 221 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PA10 (SYSCFG_CFGR1_I2C_FMP_PA10) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
bogdanm 85:024bf7f99721 222 0: PA10 pin operates in standard mode
bogdanm 85:024bf7f99721 223 1: FM+ mode is enabled on PA10 pin, and the Speed control is bypassed */
bogdanm 92:4fc01daae5a5 224 #endif /* SYSCFG_CFGR1_I2C_FMP_PA10 */
bogdanm 92:4fc01daae5a5 225
Kojto 93:e188a91d3eaa 226 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F042x6) || defined(STM32F048xx)
bogdanm 92:4fc01daae5a5 227 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
bogdanm 92:4fc01daae5a5 228 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
Kojto 93:e188a91d3eaa 229 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PA9) || \
Kojto 93:e188a91d3eaa 230 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PA10) || \
bogdanm 92:4fc01daae5a5 231 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 232 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 233 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 234 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 92:4fc01daae5a5 235 #elif defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
bogdanm 92:4fc01daae5a5 236 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
bogdanm 92:4fc01daae5a5 237 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
bogdanm 92:4fc01daae5a5 238 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 239 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 240 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 241 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 242 #elif defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx) || defined(STM32F070x6) || defined(STM32F070xB) || defined(STM32F030x6)
bogdanm 92:4fc01daae5a5 243 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
Kojto 93:e188a91d3eaa 244 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PA9) || \
Kojto 93:e188a91d3eaa 245 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PA10) || \
bogdanm 92:4fc01daae5a5 246 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
bogdanm 92:4fc01daae5a5 247 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
bogdanm 92:4fc01daae5a5 248 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
bogdanm 92:4fc01daae5a5 249 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
bogdanm 92:4fc01daae5a5 250 #else
bogdanm 92:4fc01daae5a5 251 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((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 85:024bf7f99721 255 #endif
bogdanm 85:024bf7f99721 256
bogdanm 85:024bf7f99721 257 /**
bogdanm 85:024bf7f99721 258 * @}
bogdanm 85:024bf7f99721 259 */
bogdanm 85:024bf7f99721 260
bogdanm 92:4fc01daae5a5 261 #if defined(STM32F091xC) || defined (STM32F098xx)
bogdanm 92:4fc01daae5a5 262 /** @defgroup HAL_ISR_Wrapper HAL ISR Wrapper
Kojto 93:e188a91d3eaa 263 * @brief ISR Wrapper
Kojto 93:e188a91d3eaa 264 * @note applicable on STM32F09x
bogdanm 92:4fc01daae5a5 265 * @{
bogdanm 92:4fc01daae5a5 266 */
Kojto 93:e188a91d3eaa 267 #define HAL_SYSCFG_ITLINE0 ((uint32_t) 0x00000000) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 268 #define HAL_SYSCFG_ITLINE1 ((uint32_t) 0x00000001) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 269 #define HAL_SYSCFG_ITLINE2 ((uint32_t) 0x00000002) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 270 #define HAL_SYSCFG_ITLINE3 ((uint32_t) 0x00000003) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 271 #define HAL_SYSCFG_ITLINE4 ((uint32_t) 0x00000004) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 272 #define HAL_SYSCFG_ITLINE5 ((uint32_t) 0x00000005) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 273 #define HAL_SYSCFG_ITLINE6 ((uint32_t) 0x00000006) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 274 #define HAL_SYSCFG_ITLINE7 ((uint32_t) 0x00000007) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 275 #define HAL_SYSCFG_ITLINE8 ((uint32_t) 0x00000008) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 276 #define HAL_SYSCFG_ITLINE9 ((uint32_t) 0x00000009) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 277 #define HAL_SYSCFG_ITLINE10 ((uint32_t) 0x0000000A) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 278 #define HAL_SYSCFG_ITLINE11 ((uint32_t) 0x0000000B) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 279 #define HAL_SYSCFG_ITLINE12 ((uint32_t) 0x0000000C) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 280 #define HAL_SYSCFG_ITLINE13 ((uint32_t) 0x0000000D) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 281 #define HAL_SYSCFG_ITLINE14 ((uint32_t) 0x0000000E) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 282 #define HAL_SYSCFG_ITLINE15 ((uint32_t) 0x0000000F) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 283 #define HAL_SYSCFG_ITLINE16 ((uint32_t) 0x00000010) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 284 #define HAL_SYSCFG_ITLINE17 ((uint32_t) 0x00000011) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 285 #define HAL_SYSCFG_ITLINE18 ((uint32_t) 0x00000012) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 286 #define HAL_SYSCFG_ITLINE19 ((uint32_t) 0x00000013) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 287 #define HAL_SYSCFG_ITLINE20 ((uint32_t) 0x00000014) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 288 #define HAL_SYSCFG_ITLINE21 ((uint32_t) 0x00000015) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 289 #define HAL_SYSCFG_ITLINE22 ((uint32_t) 0x00000016) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 290 #define HAL_SYSCFG_ITLINE23 ((uint32_t) 0x00000017) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 291 #define HAL_SYSCFG_ITLINE24 ((uint32_t) 0x00000018) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 292 #define HAL_SYSCFG_ITLINE25 ((uint32_t) 0x00000019) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 293 #define HAL_SYSCFG_ITLINE26 ((uint32_t) 0x0000001A) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 294 #define HAL_SYSCFG_ITLINE27 ((uint32_t) 0x0000001B) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 295 #define HAL_SYSCFG_ITLINE28 ((uint32_t) 0x0000001C) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 296 #define HAL_SYSCFG_ITLINE29 ((uint32_t) 0x0000001D) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 297 #define HAL_SYSCFG_ITLINE30 ((uint32_t) 0x0000001E) /*!< Internal define for macro handling */
Kojto 93:e188a91d3eaa 298 #define HAL_SYSCFG_ITLINE31 ((uint32_t) 0x0000001F) /*!< Internal define for macro handling */
bogdanm 92:4fc01daae5a5 299
Kojto 93:e188a91d3eaa 300 #define HAL_ITLINE_EWDG ((uint32_t) ((HAL_SYSCFG_ITLINE0 << 0x18) | SYSCFG_ITLINE0_SR_EWDG)) /*!< EWDG has expired .... */
bogdanm 92:4fc01daae5a5 301 #if defined(STM32F091xC)
Kojto 93:e188a91d3eaa 302 #define HAL_ITLINE_PVDOUT ((uint32_t) ((HAL_SYSCFG_ITLINE1 << 0x18) | SYSCFG_ITLINE1_SR_PVDOUT)) /*!< Power voltage detection Interrupt .... */
bogdanm 92:4fc01daae5a5 303 #endif
Kojto 93:e188a91d3eaa 304 #define HAL_ITLINE_VDDIO2 ((uint32_t) ((HAL_SYSCFG_ITLINE1 << 0x18) | SYSCFG_ITLINE1_SR_VDDIO2)) /*!< VDDIO2 Interrupt .... */
Kojto 93:e188a91d3eaa 305 #define HAL_ITLINE_RTC_WAKEUP ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18) | SYSCFG_ITLINE2_SR_RTC_WAKEUP)) /*!< RTC WAKEUP -> exti[20] Interrupt */
Kojto 93:e188a91d3eaa 306 #define HAL_ITLINE_RTC_TSTAMP ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18) | SYSCFG_ITLINE2_SR_RTC_TSTAMP)) /*!< RTC Time Stamp -> exti[19] interrupt */
Kojto 93:e188a91d3eaa 307 #define HAL_ITLINE_RTC_ALRA ((uint32_t) ((HAL_SYSCFG_ITLINE2 << 0x18) | SYSCFG_ITLINE2_SR_RTC_ALRA)) /*!< RTC Alarm -> exti[17] interrupt .... */
Kojto 93:e188a91d3eaa 308 #define HAL_ITLINE_FLASH_ITF ((uint32_t) ((HAL_SYSCFG_ITLINE3 << 0x18) | SYSCFG_ITLINE3_SR_FLASH_ITF)) /*!< Flash ITF Interrupt */
Kojto 93:e188a91d3eaa 309 #define HAL_ITLINE_CRS ((uint32_t) ((HAL_SYSCFG_ITLINE4 << 0x18) | SYSCFG_ITLINE4_SR_CRS)) /*!< CRS Interrupt */
Kojto 93:e188a91d3eaa 310 #define HAL_ITLINE_CLK_CTRL ((uint32_t) ((HAL_SYSCFG_ITLINE4 << 0x18) | SYSCFG_ITLINE4_SR_CLK_CTRL)) /*!< CLK Control Interrupt */
Kojto 93:e188a91d3eaa 311 #define HAL_ITLINE_EXTI0 ((uint32_t) ((HAL_SYSCFG_ITLINE5 << 0x18) | SYSCFG_ITLINE5_SR_EXTI0)) /*!< External Interrupt 0 */
Kojto 93:e188a91d3eaa 312 #define HAL_ITLINE_EXTI1 ((uint32_t) ((HAL_SYSCFG_ITLINE5 << 0x18) | SYSCFG_ITLINE5_SR_EXTI1)) /*!< External Interrupt 1 */
Kojto 93:e188a91d3eaa 313 #define HAL_ITLINE_EXTI2 ((uint32_t) ((HAL_SYSCFG_ITLINE6 << 0x18) | SYSCFG_ITLINE6_SR_EXTI2)) /*!< External Interrupt 2 */
Kojto 93:e188a91d3eaa 314 #define HAL_ITLINE_EXTI3 ((uint32_t) ((HAL_SYSCFG_ITLINE6 << 0x18) | SYSCFG_ITLINE6_SR_EXTI3)) /*!< External Interrupt 3 */
Kojto 93:e188a91d3eaa 315 #define HAL_ITLINE_EXTI4 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI4)) /*!< EXTI4 Interrupt */
Kojto 93:e188a91d3eaa 316 #define HAL_ITLINE_EXTI5 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI5)) /*!< EXTI5 Interrupt */
Kojto 93:e188a91d3eaa 317 #define HAL_ITLINE_EXTI6 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI6)) /*!< EXTI6 Interrupt */
Kojto 93:e188a91d3eaa 318 #define HAL_ITLINE_EXTI7 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI7)) /*!< EXTI7 Interrupt */
Kojto 93:e188a91d3eaa 319 #define HAL_ITLINE_EXTI8 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI8)) /*!< EXTI8 Interrupt */
Kojto 93:e188a91d3eaa 320 #define HAL_ITLINE_EXTI9 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI9)) /*!< EXTI9 Interrupt */
Kojto 93:e188a91d3eaa 321 #define HAL_ITLINE_EXTI10 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI10)) /*!< EXTI10 Interrupt */
Kojto 93:e188a91d3eaa 322 #define HAL_ITLINE_EXTI11 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI11)) /*!< EXTI11 Interrupt */
Kojto 93:e188a91d3eaa 323 #define HAL_ITLINE_EXTI12 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI12)) /*!< EXTI12 Interrupt */
Kojto 93:e188a91d3eaa 324 #define HAL_ITLINE_EXTI13 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI13)) /*!< EXTI13 Interrupt */
Kojto 93:e188a91d3eaa 325 #define HAL_ITLINE_EXTI14 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI14)) /*!< EXTI14 Interrupt */
Kojto 93:e188a91d3eaa 326 #define HAL_ITLINE_EXTI15 ((uint32_t) ((HAL_SYSCFG_ITLINE7 << 0x18) | SYSCFG_ITLINE7_SR_EXTI15)) /*!< EXTI15 Interrupt */
Kojto 93:e188a91d3eaa 327 #define HAL_ITLINE_TSC_EOA ((uint32_t) ((HAL_SYSCFG_ITLINE8 << 0x18) | SYSCFG_ITLINE8_SR_TSC_EOA)) /*!< Touch control EOA Interrupt */
Kojto 93:e188a91d3eaa 328 #define HAL_ITLINE_TSC_MCE ((uint32_t) ((HAL_SYSCFG_ITLINE8 << 0x18) | SYSCFG_ITLINE8_SR_TSC_MCE)) /*!< Touch control MCE Interrupt */
Kojto 93:e188a91d3eaa 329 #define HAL_ITLINE_DMA1_CH1 ((uint32_t) ((HAL_SYSCFG_ITLINE9 << 0x18) | SYSCFG_ITLINE9_SR_DMA1_CH1)) /*!< DMA1 Channel 1 Interrupt */
Kojto 93:e188a91d3eaa 330 #define HAL_ITLINE_DMA1_CH2 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA1_CH2)) /*!< DMA1 Channel 2 Interrupt */
Kojto 93:e188a91d3eaa 331 #define HAL_ITLINE_DMA1_CH3 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA1_CH3)) /*!< DMA1 Channel 3 Interrupt */
Kojto 93:e188a91d3eaa 332 #define HAL_ITLINE_DMA2_CH1 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA2_CH1)) /*!< DMA2 Channel 1 Interrupt */
Kojto 93:e188a91d3eaa 333 #define HAL_ITLINE_DMA2_CH2 ((uint32_t) ((HAL_SYSCFG_ITLINE10 << 0x18) | SYSCFG_ITLINE10_SR_DMA2_CH2)) /*!< DMA2 Channel 2 Interrupt */
Kojto 93:e188a91d3eaa 334 #define HAL_ITLINE_DMA1_CH4 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH4)) /*!< DMA1 Channel 4 Interrupt */
Kojto 93:e188a91d3eaa 335 #define HAL_ITLINE_DMA1_CH5 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH5)) /*!< DMA1 Channel 5 Interrupt */
Kojto 93:e188a91d3eaa 336 #define HAL_ITLINE_DMA1_CH6 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH6)) /*!< DMA1 Channel 6 Interrupt */
Kojto 93:e188a91d3eaa 337 #define HAL_ITLINE_DMA1_CH7 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA1_CH7)) /*!< DMA1 Channel 7 Interrupt */
Kojto 93:e188a91d3eaa 338 #define HAL_ITLINE_DMA2_CH3 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA2_CH3)) /*!< DMA2 Channel 3 Interrupt */
Kojto 93:e188a91d3eaa 339 #define HAL_ITLINE_DMA2_CH4 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA2_CH4)) /*!< DMA2 Channel 4 Interrupt */
Kojto 93:e188a91d3eaa 340 #define HAL_ITLINE_DMA2_CH5 ((uint32_t) ((HAL_SYSCFG_ITLINE11 << 0x18) | SYSCFG_ITLINE11_SR_DMA2_CH5)) /*!< DMA2 Channel 5 Interrupt */
Kojto 93:e188a91d3eaa 341 #define HAL_ITLINE_ADC ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18) | SYSCFG_ITLINE12_SR_ADC)) /*!< ADC Interrupt */
Kojto 93:e188a91d3eaa 342 #define HAL_ITLINE_COMP1 ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18) | SYSCFG_ITLINE12_SR_COMP1)) /*!< COMP1 Interrupt -> exti[21] */
Kojto 93:e188a91d3eaa 343 #define HAL_ITLINE_COMP2 ((uint32_t) ((HAL_SYSCFG_ITLINE12 << 0x18) | SYSCFG_ITLINE12_SR_COMP2)) /*!< COMP2 Interrupt -> exti[21] */
Kojto 93:e188a91d3eaa 344 #define HAL_ITLINE_TIM1_BRK ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_BRK)) /*!< TIM1 BRK Interrupt */
Kojto 93:e188a91d3eaa 345 #define HAL_ITLINE_TIM1_UPD ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_UPD)) /*!< TIM1 UPD Interrupt */
Kojto 93:e188a91d3eaa 346 #define HAL_ITLINE_TIM1_TRG ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_TRG)) /*!< TIM1 TRG Interrupt */
Kojto 93:e188a91d3eaa 347 #define HAL_ITLINE_TIM1_CCU ((uint32_t) ((HAL_SYSCFG_ITLINE13 << 0x18) | SYSCFG_ITLINE13_SR_TIM1_CCU)) /*!< TIM1 CCU Interrupt */
Kojto 93:e188a91d3eaa 348 #define HAL_ITLINE_TIM1_CC ((uint32_t) ((HAL_SYSCFG_ITLINE14 << 0x18) | SYSCFG_ITLINE14_SR_TIM1_CC)) /*!< TIM1 CC Interrupt */
Kojto 93:e188a91d3eaa 349 #define HAL_ITLINE_TIM2 ((uint32_t) ((HAL_SYSCFG_ITLINE15 << 0x18) | SYSCFG_ITLINE15_SR_TIM2_GLB)) /*!< TIM2 Interrupt */
Kojto 93:e188a91d3eaa 350 #define HAL_ITLINE_TIM3 ((uint32_t) ((HAL_SYSCFG_ITLINE16 << 0x18) | SYSCFG_ITLINE16_SR_TIM3_GLB)) /*!< TIM3 Interrupt */
Kojto 93:e188a91d3eaa 351 #define HAL_ITLINE_DAC ((uint32_t) ((HAL_SYSCFG_ITLINE17 << 0x18) | SYSCFG_ITLINE17_SR_DAC)) /*!< DAC Interrupt */
Kojto 93:e188a91d3eaa 352 #define HAL_ITLINE_TIM6 ((uint32_t) ((HAL_SYSCFG_ITLINE17 << 0x18) | SYSCFG_ITLINE17_SR_TIM6_GLB)) /*!< TIM6 Interrupt */
Kojto 93:e188a91d3eaa 353 #define HAL_ITLINE_TIM7 ((uint32_t) ((HAL_SYSCFG_ITLINE18 << 0x18) | SYSCFG_ITLINE18_SR_TIM7_GLB)) /*!< TIM7 Interrupt */
Kojto 93:e188a91d3eaa 354 #define HAL_ITLINE_TIM14 ((uint32_t) ((HAL_SYSCFG_ITLINE19 << 0x18) | SYSCFG_ITLINE19_SR_TIM14_GLB)) /*!< TIM14 Interrupt */
Kojto 93:e188a91d3eaa 355 #define HAL_ITLINE_TIM15 ((uint32_t) ((HAL_SYSCFG_ITLINE20 << 0x18) | SYSCFG_ITLINE20_SR_TIM15_GLB)) /*!< TIM15 Interrupt */
Kojto 93:e188a91d3eaa 356 #define HAL_ITLINE_TIM16 ((uint32_t) ((HAL_SYSCFG_ITLINE21 << 0x18) | SYSCFG_ITLINE21_SR_TIM16_GLB)) /*!< TIM16 Interrupt */
Kojto 93:e188a91d3eaa 357 #define HAL_ITLINE_TIM17 ((uint32_t) ((HAL_SYSCFG_ITLINE22 << 0x18) | SYSCFG_ITLINE22_SR_TIM17_GLB)) /*!< TIM17 Interrupt */
Kojto 93:e188a91d3eaa 358 #define HAL_ITLINE_I2C1 ((uint32_t) ((HAL_SYSCFG_ITLINE23 << 0x18) | SYSCFG_ITLINE23_SR_I2C1_GLB)) /*!< I2C1 Interrupt -> exti[23] */
Kojto 93:e188a91d3eaa 359 #define HAL_ITLINE_I2C2 ((uint32_t) ((HAL_SYSCFG_ITLINE24 << 0x18) | SYSCFG_ITLINE24_SR_I2C2_GLB)) /*!< I2C2 Interrupt */
Kojto 93:e188a91d3eaa 360 #define HAL_ITLINE_SPI1 ((uint32_t) ((HAL_SYSCFG_ITLINE25 << 0x18) | SYSCFG_ITLINE25_SR_SPI1)) /*!< I2C1 Interrupt -> exti[23] */
Kojto 93:e188a91d3eaa 361 #define HAL_ITLINE_SPI2 ((uint32_t) ((HAL_SYSCFG_ITLINE26 << 0x18) | SYSCFG_ITLINE26_SR_SPI2)) /*!< SPI1 Interrupt */
bogdanm 92:4fc01daae5a5 362 #define HAL_ITLINE_USART1 ((uint32_t) ((HAL_SYSCFG_ITLINE27 << 0x18) | SYSCFG_ITLINE27_SR_USART1_GLB)) /*!< USART1 GLB Interrupt -> exti[25] */
bogdanm 92:4fc01daae5a5 363 #define HAL_ITLINE_USART2 ((uint32_t) ((HAL_SYSCFG_ITLINE28 << 0x18) | SYSCFG_ITLINE28_SR_USART2_GLB)) /*!< USART2 GLB Interrupt -> exti[26] */
Kojto 93:e188a91d3eaa 364 #define HAL_ITLINE_USART3 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART3_GLB)) /*!< USART3 Interrupt .... */
Kojto 93:e188a91d3eaa 365 #define HAL_ITLINE_USART4 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART4_GLB)) /*!< USART4 Interrupt .... */
Kojto 93:e188a91d3eaa 366 #define HAL_ITLINE_USART5 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART5_GLB)) /*!< USART5 Interrupt .... */
Kojto 93:e188a91d3eaa 367 #define HAL_ITLINE_USART6 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART6_GLB)) /*!< USART6 Interrupt .... */
Kojto 93:e188a91d3eaa 368 #define HAL_ITLINE_USART7 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART7_GLB)) /*!< USART7 Interrupt .... */
Kojto 93:e188a91d3eaa 369 #define HAL_ITLINE_USART8 ((uint32_t) ((HAL_SYSCFG_ITLINE29 << 0x18) | SYSCFG_ITLINE29_SR_USART8_GLB)) /*!< USART8 Interrupt .... */
Kojto 93:e188a91d3eaa 370 #define HAL_ITLINE_CAN ((uint32_t) ((HAL_SYSCFG_ITLINE30 << 0x18) | SYSCFG_ITLINE30_SR_CAN)) /*!< CAN Interrupt */
Kojto 93:e188a91d3eaa 371 #define HAL_ITLINE_CEC ((uint32_t) ((HAL_SYSCFG_ITLINE30 << 0x18) | SYSCFG_ITLINE30_SR_CEC)) /*!< CEC Interrupt -> exti[27] */
bogdanm 92:4fc01daae5a5 372 /**
bogdanm 92:4fc01daae5a5 373 * @}
bogdanm 92:4fc01daae5a5 374 */
bogdanm 92:4fc01daae5a5 375 #endif /* STM32F091xC || STM32F098xx */
bogdanm 92:4fc01daae5a5 376
bogdanm 92:4fc01daae5a5 377 /**
bogdanm 92:4fc01daae5a5 378 * @}
bogdanm 92:4fc01daae5a5 379 */
bogdanm 85:024bf7f99721 380
bogdanm 85:024bf7f99721 381 /* Exported macros -----------------------------------------------------------*/
bogdanm 92:4fc01daae5a5 382 /** @defgroup HAL_Exported_Macros HAL Exported Macros
bogdanm 92:4fc01daae5a5 383 * @{
bogdanm 92:4fc01daae5a5 384 */
bogdanm 85:024bf7f99721 385
bogdanm 92:4fc01daae5a5 386 /** @defgroup HAL_Freeze_Unfreeze_Peripherals HAL Freeze Unfreeze Peripherals
bogdanm 92:4fc01daae5a5 387 * @brief Freeze/Unfreeze Peripherals in Debug mode
bogdanm 92:4fc01daae5a5 388 * @{
bogdanm 85:024bf7f99721 389 */
bogdanm 92:4fc01daae5a5 390
bogdanm 92:4fc01daae5a5 391 #if defined(DBGMCU_APB1_FZ_DBG_CAN_STOP)
bogdanm 92:4fc01daae5a5 392 #define __HAL_FREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN_STOP))
bogdanm 92:4fc01daae5a5 393 #define __HAL_UNFREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN_STOP))
bogdanm 92:4fc01daae5a5 394 #endif /* DBGMCU_APB1_FZ_DBG_CAN_STOP */
bogdanm 85:024bf7f99721 395
bogdanm 92:4fc01daae5a5 396 #if defined(DBGMCU_APB1_FZ_DBG_RTC_STOP)
bogdanm 85:024bf7f99721 397 #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
bogdanm 85:024bf7f99721 398 #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
bogdanm 92:4fc01daae5a5 399 #endif /* DBGMCU_APB1_FZ_DBG_RTC_STOP */
bogdanm 85:024bf7f99721 400
bogdanm 92:4fc01daae5a5 401 #if defined(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)
bogdanm 92:4fc01daae5a5 402 #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
bogdanm 92:4fc01daae5a5 403 #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
bogdanm 92:4fc01daae5a5 404 #endif /* DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT */
bogdanm 85:024bf7f99721 405
bogdanm 92:4fc01daae5a5 406 #if defined(DBGMCU_APB1_FZ_DBG_IWDG_STOP)
bogdanm 85:024bf7f99721 407 #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
bogdanm 85:024bf7f99721 408 #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
bogdanm 92:4fc01daae5a5 409 #endif /* DBGMCU_APB1_FZ_DBG_IWDG_STOP */
bogdanm 85:024bf7f99721 410
bogdanm 92:4fc01daae5a5 411 #if defined(DBGMCU_APB1_FZ_DBG_WWDG_STOP)
bogdanm 92:4fc01daae5a5 412 #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
bogdanm 92:4fc01daae5a5 413 #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
bogdanm 92:4fc01daae5a5 414 #endif /* DBGMCU_APB1_FZ_DBG_WWDG_STOP */
bogdanm 92:4fc01daae5a5 415
bogdanm 92:4fc01daae5a5 416 #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP)
bogdanm 85:024bf7f99721 417 #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
bogdanm 85:024bf7f99721 418 #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
bogdanm 92:4fc01daae5a5 419 #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */
bogdanm 85:024bf7f99721 420
bogdanm 92:4fc01daae5a5 421 #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP)
bogdanm 92:4fc01daae5a5 422 #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
bogdanm 92:4fc01daae5a5 423 #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
bogdanm 92:4fc01daae5a5 424 #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */
bogdanm 92:4fc01daae5a5 425
bogdanm 92:4fc01daae5a5 426 #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP)
bogdanm 85:024bf7f99721 427 #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
bogdanm 85:024bf7f99721 428 #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
bogdanm 92:4fc01daae5a5 429 #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */
bogdanm 85:024bf7f99721 430
bogdanm 92:4fc01daae5a5 431 #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP)
bogdanm 85:024bf7f99721 432 #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
bogdanm 85:024bf7f99721 433 #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
bogdanm 92:4fc01daae5a5 434 #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */
bogdanm 85:024bf7f99721 435
bogdanm 92:4fc01daae5a5 436 #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP)
bogdanm 92:4fc01daae5a5 437 #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
bogdanm 92:4fc01daae5a5 438 #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
bogdanm 92:4fc01daae5a5 439 #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
bogdanm 85:024bf7f99721 440
bogdanm 92:4fc01daae5a5 441 #if defined(DBGMCU_APB2_FZ_DBG_TIM1_STOP)
bogdanm 85:024bf7f99721 442 #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
bogdanm 85:024bf7f99721 443 #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
bogdanm 92:4fc01daae5a5 444 #endif /* DBGMCU_APB2_FZ_DBG_TIM1_STOP */
bogdanm 85:024bf7f99721 445
bogdanm 92:4fc01daae5a5 446 #if defined(DBGMCU_APB2_FZ_DBG_TIM15_STOP)
bogdanm 85:024bf7f99721 447 #define __HAL_FREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM15_STOP))
bogdanm 85:024bf7f99721 448 #define __HAL_UNFREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM15_STOP))
bogdanm 92:4fc01daae5a5 449 #endif /* DBGMCU_APB2_FZ_DBG_TIM15_STOP */
bogdanm 85:024bf7f99721 450
bogdanm 92:4fc01daae5a5 451 #if defined(DBGMCU_APB2_FZ_DBG_TIM16_STOP)
bogdanm 85:024bf7f99721 452 #define __HAL_FREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM16_STOP))
bogdanm 85:024bf7f99721 453 #define __HAL_UNFREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM16_STOP))
bogdanm 92:4fc01daae5a5 454 #endif /* DBGMCU_APB2_FZ_DBG_TIM16_STOP */
bogdanm 85:024bf7f99721 455
bogdanm 92:4fc01daae5a5 456 #if defined(DBGMCU_APB2_FZ_DBG_TIM17_STOP)
bogdanm 85:024bf7f99721 457 #define __HAL_FREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM17_STOP))
bogdanm 85:024bf7f99721 458 #define __HAL_UNFREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM17_STOP))
bogdanm 92:4fc01daae5a5 459 #endif /* DBGMCU_APB2_FZ_DBG_TIM17_STOP */
bogdanm 85:024bf7f99721 460
bogdanm 92:4fc01daae5a5 461 /**
bogdanm 92:4fc01daae5a5 462 * @}
bogdanm 92:4fc01daae5a5 463 */
bogdanm 92:4fc01daae5a5 464
bogdanm 92:4fc01daae5a5 465 /** @defgroup Memory_Mapping_Selection Memory Mapping Selection
bogdanm 92:4fc01daae5a5 466 * @{
bogdanm 92:4fc01daae5a5 467 */
bogdanm 92:4fc01daae5a5 468 #if defined(SYSCFG_CFGR1_MEM_MODE)
bogdanm 85:024bf7f99721 469 /** @brief Main Flash memory mapped at 0x00000000
bogdanm 85:024bf7f99721 470 */
bogdanm 85:024bf7f99721 471 #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE))
bogdanm 92:4fc01daae5a5 472 #endif /* SYSCFG_CFGR1_MEM_MODE */
bogdanm 85:024bf7f99721 473
bogdanm 92:4fc01daae5a5 474 #if defined(SYSCFG_CFGR1_MEM_MODE_0)
bogdanm 85:024bf7f99721 475 /** @brief System Flash memory mapped at 0x00000000
bogdanm 85:024bf7f99721 476 */
bogdanm 85:024bf7f99721 477 #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
bogdanm 85:024bf7f99721 478 SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_0; \
bogdanm 85:024bf7f99721 479 }while(0)
bogdanm 92:4fc01daae5a5 480 #endif /* SYSCFG_CFGR1_MEM_MODE_0 */
bogdanm 85:024bf7f99721 481
bogdanm 92:4fc01daae5a5 482 #if defined(SYSCFG_CFGR1_MEM_MODE_0) && defined(SYSCFG_CFGR1_MEM_MODE_1)
bogdanm 85:024bf7f99721 483 /** @brief Embedded SRAM mapped at 0x00000000
bogdanm 85:024bf7f99721 484 */
bogdanm 85:024bf7f99721 485 #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
bogdanm 85:024bf7f99721 486 SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1); \
bogdanm 92:4fc01daae5a5 487 }while(0)
bogdanm 92:4fc01daae5a5 488 #endif /* SYSCFG_CFGR1_MEM_MODE_0 && SYSCFG_CFGR1_MEM_MODE_1 */
bogdanm 92:4fc01daae5a5 489 /**
bogdanm 92:4fc01daae5a5 490 * @}
bogdanm 92:4fc01daae5a5 491 */
bogdanm 85:024bf7f99721 492
bogdanm 92:4fc01daae5a5 493 #if defined(SYSCFG_CFGR1_DMA_RMP)
bogdanm 92:4fc01daae5a5 494 /** @defgroup HAL_DMA_remap HAL DMA remap
bogdanm 92:4fc01daae5a5 495 * @brief DMA remapping enable/disable macros
bogdanm 92:4fc01daae5a5 496 * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_remapping
bogdanm 92:4fc01daae5a5 497 * @{
bogdanm 85:024bf7f99721 498 */
bogdanm 85:024bf7f99721 499 #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
bogdanm 85:024bf7f99721 500 SYSCFG->CFGR1 |= (__DMA_REMAP__); \
bogdanm 85:024bf7f99721 501 }while(0)
bogdanm 85:024bf7f99721 502 #define __HAL_REMAPDMA_CHANNEL_DISABLE(__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 92:4fc01daae5a5 505 /**
bogdanm 92:4fc01daae5a5 506 * @}
bogdanm 92:4fc01daae5a5 507 */
bogdanm 92:4fc01daae5a5 508 #endif /* SYSCFG_CFGR1_DMA_RMP */
bogdanm 85:024bf7f99721 509
bogdanm 92:4fc01daae5a5 510 #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
bogdanm 92:4fc01daae5a5 511 /** @defgroup HAL_Pin_remap HAL Pin remap
bogdanm 92:4fc01daae5a5 512 * @brief Pin remapping enable/disable macros
bogdanm 92:4fc01daae5a5 513 * @param __PIN_REMAP__: This parameter can be a value of @ref HAL_Pin_remapping
bogdanm 92:4fc01daae5a5 514 * @{
bogdanm 85:024bf7f99721 515 */
bogdanm 85:024bf7f99721 516 #define __HAL_REMAP_PIN_ENABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
bogdanm 85:024bf7f99721 517 SYSCFG->CFGR1 |= (__PIN_REMAP__); \
bogdanm 85:024bf7f99721 518 }while(0)
bogdanm 92:4fc01daae5a5 519 #define __HAL_REMAP_PIN_DISABLE(__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 /**
bogdanm 92:4fc01daae5a5 523 * @}
bogdanm 92:4fc01daae5a5 524 */
bogdanm 92:4fc01daae5a5 525 #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
bogdanm 85:024bf7f99721 526
bogdanm 92:4fc01daae5a5 527 /** @defgroup HAL_Fast_mode_plus_driving_cap HAL Fast mode plus driving cap
bogdanm 92:4fc01daae5a5 528 * @brief Fast mode Plus driving capability enable/disable macros
bogdanm 85:024bf7f99721 529 * @param __FASTMODEPLUS__: This parameter can be a value of @ref HAL_FastModePlus_I2C
bogdanm 92:4fc01daae5a5 530 * @{
bogdanm 85:024bf7f99721 531 */
bogdanm 85:024bf7f99721 532 #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
bogdanm 85:024bf7f99721 533 SYSCFG->CFGR1 |= (__FASTMODEPLUS__); \
bogdanm 85:024bf7f99721 534 }while(0)
bogdanm 85:024bf7f99721 535
bogdanm 85:024bf7f99721 536 #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
bogdanm 85:024bf7f99721 537 SYSCFG->CFGR1 &= ~(__FASTMODEPLUS__); \
bogdanm 85:024bf7f99721 538 }while(0)
bogdanm 92:4fc01daae5a5 539 /**
bogdanm 92:4fc01daae5a5 540 * @}
bogdanm 92:4fc01daae5a5 541 */
bogdanm 92:4fc01daae5a5 542
bogdanm 92:4fc01daae5a5 543 #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
bogdanm 92:4fc01daae5a5 544 /** @defgroup Cortex_Lockup_Enable Cortex Lockup Enable
bogdanm 92:4fc01daae5a5 545 * @{
bogdanm 92:4fc01daae5a5 546 */
bogdanm 85:024bf7f99721 547 /** @brief SYSCFG Break Lockup lock
bogdanm 85:024bf7f99721 548 * Enables and locks the connection of Cortex-M0 LOCKUP (Hardfault) output to TIM1/15/16/17 Break input
bogdanm 85:024bf7f99721 549 * @note The selected configuration is locked and can be unlocked by system reset
bogdanm 85:024bf7f99721 550 */
bogdanm 85:024bf7f99721 551 #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_LOCKUP_LOCK); \
bogdanm 85:024bf7f99721 552 SYSCFG->CFGR2 |= SYSCFG_CFGR2_LOCKUP_LOCK; \
bogdanm 85:024bf7f99721 553 }while(0)
bogdanm 92:4fc01daae5a5 554 /**
bogdanm 92:4fc01daae5a5 555 * @}
bogdanm 92:4fc01daae5a5 556 */
bogdanm 92:4fc01daae5a5 557 #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */
bogdanm 85:024bf7f99721 558
bogdanm 92:4fc01daae5a5 559 #if defined(SYSCFG_CFGR2_PVD_LOCK)
bogdanm 92:4fc01daae5a5 560 /** @defgroup PVD_Lock_Enable PVD Lock
bogdanm 92:4fc01daae5a5 561 * @{
bogdanm 92:4fc01daae5a5 562 */
bogdanm 85:024bf7f99721 563 /** @brief SYSCFG Break PVD lock
bogdanm 85:024bf7f99721 564 * 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 565 * @note The selected configuration is locked and can be unlocked by system reset
bogdanm 85:024bf7f99721 566 */
bogdanm 85:024bf7f99721 567 #define __HAL_SYSCFG_BREAK_PVD_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_PVD_LOCK); \
bogdanm 85:024bf7f99721 568 SYSCFG->CFGR2 |= SYSCFG_CFGR2_PVD_LOCK; \
bogdanm 85:024bf7f99721 569 }while(0)
bogdanm 92:4fc01daae5a5 570 /**
bogdanm 92:4fc01daae5a5 571 * @}
bogdanm 92:4fc01daae5a5 572 */
bogdanm 92:4fc01daae5a5 573 #endif /* SYSCFG_CFGR2_PVD_LOCK */
bogdanm 85:024bf7f99721 574
bogdanm 92:4fc01daae5a5 575 #if defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK)
bogdanm 92:4fc01daae5a5 576 /** @defgroup SRAM_Parity_Lock SRAM Parity Lock
bogdanm 92:4fc01daae5a5 577 * @{
bogdanm 92:4fc01daae5a5 578 */
bogdanm 85:024bf7f99721 579 /** @brief SYSCFG Break SRAM PARITY lock
bogdanm 85:024bf7f99721 580 * Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1/8/15/16/17
bogdanm 85:024bf7f99721 581 * @note The selected configuration is locked and can be unlocked by system reset
bogdanm 85:024bf7f99721 582 */
bogdanm 85:024bf7f99721 583 #define __HAL_SYSCFG_BREAK_SRAMPARITY_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_SRAM_PARITY_LOCK); \
bogdanm 85:024bf7f99721 584 SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PARITY_LOCK; \
bogdanm 85:024bf7f99721 585 }while(0)
bogdanm 92:4fc01daae5a5 586 /**
bogdanm 92:4fc01daae5a5 587 * @}
bogdanm 92:4fc01daae5a5 588 */
bogdanm 92:4fc01daae5a5 589 #endif /* SYSCFG_CFGR2_SRAM_PARITY_LOCK */
bogdanm 85:024bf7f99721 590
bogdanm 92:4fc01daae5a5 591 #if defined(SYSCFG_CFGR2_SRAM_PEF)
bogdanm 92:4fc01daae5a5 592 /** @defgroup HAL_SYSCFG_Parity_check_on_RAM HAL SYSCFG Parity check on RAM
bogdanm 85:024bf7f99721 593 * @brief Parity check on RAM disable macro
bogdanm 85:024bf7f99721 594 * @note Disabling the parity check on RAM locks the configuration bit.
bogdanm 85:024bf7f99721 595 * To re-enable the parity check on RAM perform a system reset.
bogdanm 92:4fc01daae5a5 596 * @{
bogdanm 85:024bf7f99721 597 */
bogdanm 85:024bf7f99721 598 #define __HAL_SYSCFG_RAM_PARITYCHECK_DISABLE() (SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PEF)
bogdanm 92:4fc01daae5a5 599 /**
bogdanm 92:4fc01daae5a5 600 * @}
bogdanm 92:4fc01daae5a5 601 */
bogdanm 92:4fc01daae5a5 602 #endif /* SYSCFG_CFGR2_SRAM_PEF */
bogdanm 85:024bf7f99721 603
bogdanm 85:024bf7f99721 604
bogdanm 92:4fc01daae5a5 605 #if defined(STM32F091xC) || defined (STM32F098xx)
bogdanm 92:4fc01daae5a5 606 /** @defgroup HAL_ISR_wrapper_check HAL ISR wrapper check
bogdanm 92:4fc01daae5a5 607 * @brief ISR wrapper check
Kojto 93:e188a91d3eaa 608 * @note This feature is applicable on STM32F09x
Kojto 93:e188a91d3eaa 609 * @note Allow to determine interrupt source per line.
bogdanm 92:4fc01daae5a5 610 * @{
bogdanm 92:4fc01daae5a5 611 */
bogdanm 92:4fc01daae5a5 612 #define __HAL_GET_PENDING_IT(__SOURCE__) (SYSCFG->IT_LINE_SR[((__SOURCE__) >> 0x18)] & ((__SOURCE__) & 0x00FFFFFF))
bogdanm 92:4fc01daae5a5 613 /**
bogdanm 92:4fc01daae5a5 614 * @}
bogdanm 92:4fc01daae5a5 615 */
bogdanm 92:4fc01daae5a5 616 #endif /* (STM32F091xC) || defined (STM32F098xx)*/
bogdanm 85:024bf7f99721 617
bogdanm 92:4fc01daae5a5 618 #if defined(STM32F091xC) || defined (STM32F098xx)
bogdanm 92:4fc01daae5a5 619 /** @defgroup HAL_SYSCFG_IRDA_modulation_envelope_selection HAL SYSCFG IRDA modulation envelope selection
bogdanm 92:4fc01daae5a5 620 * @brief selection of the modulation envelope signal macro, using bits [7:6] of SYS_CTRL(CFGR1) register
Kojto 93:e188a91d3eaa 621 * @note This feature is applicable on STM32F09x
bogdanm 92:4fc01daae5a5 622 * @param __SOURCE__: This parameter can be a value of @ref HAL_IRDA_ENV_SEL
bogdanm 92:4fc01daae5a5 623 * @{
bogdanm 92:4fc01daae5a5 624 */
bogdanm 92:4fc01daae5a5 625 #define __HAL_SYSCFG_IRDA_ENV_SELECTION(__SOURCE__) do {assert_param(IS_HAL_SYSCFG_IRDA_ENV_SEL((__SOURCE__))); \
bogdanm 92:4fc01daae5a5 626 SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_IRDA_ENV_SEL); \
bogdanm 92:4fc01daae5a5 627 SYSCFG->CFGR1 |= (__SOURCE__); \
bogdanm 92:4fc01daae5a5 628 }while(0)
bogdanm 92:4fc01daae5a5 629
bogdanm 92:4fc01daae5a5 630 #define __HAL_SYSCFG_GET_IRDA_ENV_SELECTION() ((SYSCFG->CFGR1) & 0x000000C0)
bogdanm 92:4fc01daae5a5 631 /**
bogdanm 92:4fc01daae5a5 632 * @}
bogdanm 92:4fc01daae5a5 633 */
bogdanm 92:4fc01daae5a5 634 #endif /* (STM32F091xC) || defined (STM32F098xx)*/
bogdanm 92:4fc01daae5a5 635
bogdanm 92:4fc01daae5a5 636 /**
bogdanm 92:4fc01daae5a5 637 * @}
bogdanm 92:4fc01daae5a5 638 */
bogdanm 92:4fc01daae5a5 639 /* Exported functions --------------------------------------------------------*/
bogdanm 92:4fc01daae5a5 640 /** @addtogroup HAL_Exported_Functions HAL Exported Functions
bogdanm 92:4fc01daae5a5 641 * @{
bogdanm 92:4fc01daae5a5 642 */
bogdanm 92:4fc01daae5a5 643
bogdanm 92:4fc01daae5a5 644 /** @addtogroup HAL_Exported_Functions_Group1 Initialization and de-initialization Functions
bogdanm 92:4fc01daae5a5 645 * @brief Initialization and de-initialization functions
bogdanm 92:4fc01daae5a5 646 * @{
bogdanm 92:4fc01daae5a5 647 */
bogdanm 92:4fc01daae5a5 648 /* Initialization and de-initialization functions ******************************/
bogdanm 85:024bf7f99721 649 HAL_StatusTypeDef HAL_Init(void);
bogdanm 85:024bf7f99721 650 HAL_StatusTypeDef HAL_DeInit(void);
bogdanm 85:024bf7f99721 651 void HAL_MspInit(void);
bogdanm 85:024bf7f99721 652 void HAL_MspDeInit(void);
bogdanm 85:024bf7f99721 653 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
bogdanm 92:4fc01daae5a5 654 /**
bogdanm 92:4fc01daae5a5 655 * @}
bogdanm 92:4fc01daae5a5 656 */
bogdanm 85:024bf7f99721 657
bogdanm 92:4fc01daae5a5 658 /** @addtogroup HAL_Exported_Functions_Group2 HAL Control functions
bogdanm 92:4fc01daae5a5 659 * @brief HAL Control functions
bogdanm 92:4fc01daae5a5 660 * @{
bogdanm 92:4fc01daae5a5 661 */
bogdanm 85:024bf7f99721 662 /* Peripheral Control functions **********************************************/
bogdanm 85:024bf7f99721 663 void HAL_IncTick(void);
bogdanm 85:024bf7f99721 664 void HAL_Delay(__IO uint32_t Delay);
bogdanm 85:024bf7f99721 665 uint32_t HAL_GetTick(void);
bogdanm 85:024bf7f99721 666 void HAL_SuspendTick(void);
bogdanm 85:024bf7f99721 667 void HAL_ResumeTick(void);
bogdanm 85:024bf7f99721 668 uint32_t HAL_GetHalVersion(void);
bogdanm 85:024bf7f99721 669 uint32_t HAL_GetREVID(void);
bogdanm 85:024bf7f99721 670 uint32_t HAL_GetDEVID(void);
bogdanm 85:024bf7f99721 671 void HAL_EnableDBGStopMode(void);
bogdanm 85:024bf7f99721 672 void HAL_DisableDBGStopMode(void);
bogdanm 85:024bf7f99721 673 void HAL_EnableDBGStandbyMode(void);
bogdanm 85:024bf7f99721 674 void HAL_DisableDBGStandbyMode(void);
bogdanm 92:4fc01daae5a5 675 /**
bogdanm 92:4fc01daae5a5 676 * @}
bogdanm 92:4fc01daae5a5 677 */
bogdanm 85:024bf7f99721 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 92:4fc01daae5a5 685 */
bogdanm 92:4fc01daae5a5 686
bogdanm 92:4fc01daae5a5 687 /**
bogdanm 92:4fc01daae5a5 688 * @}
bogdanm 85:024bf7f99721 689 */
bogdanm 85:024bf7f99721 690
bogdanm 85:024bf7f99721 691 #ifdef __cplusplus
bogdanm 85:024bf7f99721 692 }
bogdanm 85:024bf7f99721 693 #endif
bogdanm 85:024bf7f99721 694
bogdanm 85:024bf7f99721 695 #endif /* __STM32F0xx_HAL_H */
bogdanm 85:024bf7f99721 696
bogdanm 85:024bf7f99721 697 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/