Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Feb 03 15:31:20 2015 +0000
Revision:
93:e188a91d3eaa
Child:
108:34e6b704fe68
Release 93 of the mbed library

Main changes:

- Renesas RZ_A1H bugfixes - i2c, ticker
- new targets - Nucleo F303RE, Nucleo F070RB, BLE SMURFS,
Dragonfly 411RE,
- BusXXX - is connected method, plus operators addition
- LPC8xx - I2c fixes
- timestamp_t reverted to uint32_t
- RTX - fixes regarding stack (alignment, magic word)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 93:e188a91d3eaa 1 /**
Kojto 93:e188a91d3eaa 2 ******************************************************************************
Kojto 93:e188a91d3eaa 3 * @file stm32f0xx_hal.h
Kojto 93:e188a91d3eaa 4 * @author MCD Application Team
Kojto 93:e188a91d3eaa 5 * @version V1.2.0
Kojto 93:e188a91d3eaa 6 * @date 11-December-2014
Kojto 93:e188a91d3eaa 7 * @brief This file contains all the functions prototypes for the HAL
Kojto 93:e188a91d3eaa 8 * module driver.
Kojto 93:e188a91d3eaa 9 ******************************************************************************
Kojto 93:e188a91d3eaa 10 * @attention
Kojto 93:e188a91d3eaa 11 *
Kojto 93:e188a91d3eaa 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
Kojto 93:e188a91d3eaa 13 *
Kojto 93:e188a91d3eaa 14 * Redistribution and use in source and binary forms, with or without modification,
Kojto 93:e188a91d3eaa 15 * are permitted provided that the following conditions are met:
Kojto 93:e188a91d3eaa 16 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 93:e188a91d3eaa 17 * this list of conditions and the following disclaimer.
Kojto 93:e188a91d3eaa 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 93:e188a91d3eaa 19 * this list of conditions and the following disclaimer in the documentation
Kojto 93:e188a91d3eaa 20 * and/or other materials provided with the distribution.
Kojto 93:e188a91d3eaa 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 93:e188a91d3eaa 22 * may be used to endorse or promote products derived from this software
Kojto 93:e188a91d3eaa 23 * without specific prior written permission.
Kojto 93:e188a91d3eaa 24 *
Kojto 93:e188a91d3eaa 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 93:e188a91d3eaa 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 93:e188a91d3eaa 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 93:e188a91d3eaa 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 93:e188a91d3eaa 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 93:e188a91d3eaa 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 93:e188a91d3eaa 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 93:e188a91d3eaa 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 93:e188a91d3eaa 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 93:e188a91d3eaa 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 93:e188a91d3eaa 35 *
Kojto 93:e188a91d3eaa 36 ******************************************************************************
Kojto 93:e188a91d3eaa 37 */
Kojto 93:e188a91d3eaa 38
Kojto 93:e188a91d3eaa 39 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 93:e188a91d3eaa 40 #ifndef __STM32F0xx_HAL_H
Kojto 93:e188a91d3eaa 41 #define __STM32F0xx_HAL_H
Kojto 93:e188a91d3eaa 42
Kojto 93:e188a91d3eaa 43 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 44 extern "C" {
Kojto 93:e188a91d3eaa 45 #endif
Kojto 93:e188a91d3eaa 46
Kojto 93:e188a91d3eaa 47 /* Includes ------------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 48 #include "stm32f0xx_hal_conf.h"
Kojto 93:e188a91d3eaa 49
Kojto 93:e188a91d3eaa 50 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 93:e188a91d3eaa 51 * @{
Kojto 93:e188a91d3eaa 52 */
Kojto 93:e188a91d3eaa 53
Kojto 93:e188a91d3eaa 54 /** @addtogroup HAL
Kojto 93:e188a91d3eaa 55 * @{
Kojto 93:e188a91d3eaa 56 */
Kojto 93:e188a91d3eaa 57
Kojto 93:e188a91d3eaa 58 /* Exported types ------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 59 /* Exported constants --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 60 /** @defgroup HAL_Exported_Constants HAL Exported Constants
Kojto 93:e188a91d3eaa 61 * @{
Kojto 93:e188a91d3eaa 62 */
Kojto 93:e188a91d3eaa 63
Kojto 93:e188a91d3eaa 64 #if defined(SYSCFG_CFGR1_DMA_RMP)
Kojto 93:e188a91d3eaa 65 /** @defgroup HAL_DMA_remapping HAL DMA remapping
Kojto 93:e188a91d3eaa 66 * Elements values convention: 0xYYYYYYYY
Kojto 93:e188a91d3eaa 67 * - YYYYYYYY : Position in the SYSCFG register CFGR1
Kojto 93:e188a91d3eaa 68 * @{
Kojto 93:e188a91d3eaa 69 */
Kojto 93:e188a91d3eaa 70 #define HAL_REMAPDMA_ADC_DMA_CH2 ((uint32_t)SYSCFG_CFGR1_ADC_DMA_RMP) /*!< ADC DMA remap
Kojto 93:e188a91d3eaa 71 0: No remap (ADC DMA requests mapped on DMA channel 1
Kojto 93:e188a91d3eaa 72 1: Remap (ADC DMA requests mapped on DMA channel 2 */
Kojto 93:e188a91d3eaa 73 #define HAL_REMAPDMA_USART1_TX_DMA_CH4 ((uint32_t)SYSCFG_CFGR1_USART1TX_DMA_RMP) /*!< USART1 TX DMA remap
Kojto 93:e188a91d3eaa 74 0: No remap (USART1_TX DMA request mapped on DMA channel 2
Kojto 93:e188a91d3eaa 75 1: Remap (USART1_TX DMA request mapped on DMA channel 4 */
Kojto 93:e188a91d3eaa 76 #define HAL_REMAPDMA_USART1_RX_DMA_CH5 ((uint32_t)SYSCFG_CFGR1_USART1RX_DMA_RMP) /*!< USART1 RX DMA remap
Kojto 93:e188a91d3eaa 77 0: No remap (USART1_RX DMA request mapped on DMA channel 3
Kojto 93:e188a91d3eaa 78 1: Remap (USART1_RX DMA request mapped on DMA channel 5 */
Kojto 93:e188a91d3eaa 79 #define HAL_REMAPDMA_TIM16_DMA_CH4 ((uint32_t)SYSCFG_CFGR1_TIM16_DMA_RMP) /*!< TIM16 DMA request remap
Kojto 93:e188a91d3eaa 80 0: No remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA channel 3)
Kojto 93:e188a91d3eaa 81 1: Remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA channel 4) */
Kojto 93:e188a91d3eaa 82 #define HAL_REMAPDMA_TIM17_DMA_CH2 ((uint32_t)SYSCFG_CFGR1_TIM17_DMA_RMP) /*!< TIM17 DMA request remap
Kojto 93:e188a91d3eaa 83 0: No remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA channel 1
Kojto 93:e188a91d3eaa 84 1: Remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA channel 2) */
Kojto 93:e188a91d3eaa 85
Kojto 93:e188a91d3eaa 86 #if defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx)
Kojto 93:e188a91d3eaa 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
Kojto 93:e188a91d3eaa 88 0: No alternate remap (TIM16 DMA requestsmapped according to TIM16_DMA_RMP bit)
Kojto 93:e188a91d3eaa 89 1: Alternate remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA channel 6) */
Kojto 93:e188a91d3eaa 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
Kojto 93:e188a91d3eaa 91 0: No alternate remap (TIM17 DMA requestsmapped according to TIM17_DMA_RMP bit)
Kojto 93:e188a91d3eaa 92 1: Alternate remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA channel 7) */
Kojto 93:e188a91d3eaa 93 #define HAL_REMAPDMA_SPI2_DMA_CH67 ((uint32_t)SYSCFG_CFGR1_SPI2_DMA_RMP) /*!< SPI2 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 94 0: No remap (SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 4 and 5 respectively)
Kojto 93:e188a91d3eaa 95 1: 1: Remap (SPI2_RX and SPI2_TX DMA requests mapped on DMA channel 6 and 7 respectively) */
Kojto 93:e188a91d3eaa 96 #define HAL_REMAPDMA_USART2_DMA_CH67 ((uint32_t)SYSCFG_CFGR1_USART2_DMA_RMP) /*!< USART2 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 97 0: No remap (USART2_RX and USART2_TX DMA requests mapped on DMA channel 5 and 4 respectively)
Kojto 93:e188a91d3eaa 98 1: 1: Remap (USART2_RX and USART2_TX DMA requests mapped on DMA channel 6 and 7 respectively) */
Kojto 93:e188a91d3eaa 99 #define HAL_REMAPDMA_USART3_DMA_CH32 ((uint32_t)SYSCFG_CFGR1_USART3_DMA_RMP) /*!< USART3 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 100 0: No remap (USART3_RX and USART3_TX DMA requests mapped on DMA channel 6 and 7 respectively)
Kojto 93:e188a91d3eaa 101 1: 1: Remap (USART3_RX and USART3_TX DMA requests mapped on DMA channel 3 and 2 respectively) */
Kojto 93:e188a91d3eaa 102 #define HAL_REMAPDMA_I2C1_DMA_CH76 ((uint32_t)SYSCFG_CFGR1_I2C1_DMA_RMP) /*!< I2C1 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 103 0: No remap (I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 3 and 2 respectively)
Kojto 93:e188a91d3eaa 104 1: Remap (I2C1_RX and I2C1_TX DMA requests mapped on DMA channel 7 and 6 respectively) */
Kojto 93:e188a91d3eaa 105 #define HAL_REMAPDMA_TIM1_DMA_CH6 ((uint32_t)SYSCFG_CFGR1_TIM1_DMA_RMP) /*!< TIM1 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 106 0: No remap (TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 2, 3 and 4 respectively)
Kojto 93:e188a91d3eaa 107 1: Remap (TIM1_CH1, TIM1_CH2 and TIM1_CH3 DMA requests mapped on DMA channel 6 */
Kojto 93:e188a91d3eaa 108 #define HAL_REMAPDMA_TIM2_DMA_CH7 ((uint32_t)SYSCFG_CFGR1_TIM2_DMA_RMP) /*!< TIM2 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 109 0: No remap (TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 3 and 4 respectively)
Kojto 93:e188a91d3eaa 110 1: Remap (TIM2_CH2 and TIM2_CH4 DMA requests mapped on DMA channel 7 */
Kojto 93:e188a91d3eaa 111 #define HAL_REMAPDMA_TIM3_DMA_CH6 ((uint32_t)SYSCFG_CFGR1_TIM3_DMA_RMP) /*!< TIM3 DMA request remapping bit. Available on STM32F07x devices only.
Kojto 93:e188a91d3eaa 112 0: No remap (TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 4)
Kojto 93:e188a91d3eaa 113 1: Remap (TIM3_CH1 and TIM3_TRIG DMA requests mapped on DMA channel 6) */
Kojto 93:e188a91d3eaa 114 #endif
Kojto 93:e188a91d3eaa 115
Kojto 93:e188a91d3eaa 116 #if defined (STM32F071xB) || defined (STM32F072xB) || defined (STM32F078xx)
Kojto 93:e188a91d3eaa 117 #define IS_HAL_REMAPDMA(RMP) (((RMP) == HAL_REMAPDMA_ADC_DMA_CH2) || \
Kojto 93:e188a91d3eaa 118 ((RMP) == HAL_REMAPDMA_USART1_TX_DMA_CH4) || \
Kojto 93:e188a91d3eaa 119 ((RMP) == HAL_REMAPDMA_USART1_RX_DMA_CH5) || \
Kojto 93:e188a91d3eaa 120 ((RMP) == HAL_REMAPDMA_TIM16_DMA_CH4) || \
Kojto 93:e188a91d3eaa 121 ((RMP) == HAL_REMAPDMA_TIM17_DMA_CH2) || \
Kojto 93:e188a91d3eaa 122 ((RMP) == HAL_REMAPDMA_TIM16_DMA_CH6) || \
Kojto 93:e188a91d3eaa 123 ((RMP) == HAL_REMAPDMA_TIM17_DMA_CH7) || \
Kojto 93:e188a91d3eaa 124 ((RMP) == HAL_REMAPDMA_SPI2_DMA_CH67) || \
Kojto 93:e188a91d3eaa 125 ((RMP) == HAL_REMAPDMA_USART2_DMA_CH67) || \
Kojto 93:e188a91d3eaa 126 ((RMP) == HAL_REMAPDMA_USART3_DMA_CH32) || \
Kojto 93:e188a91d3eaa 127 ((RMP) == HAL_REMAPDMA_I2C1_DMA_CH76) || \
Kojto 93:e188a91d3eaa 128 ((RMP) == HAL_REMAPDMA_TIM1_DMA_CH6) || \
Kojto 93:e188a91d3eaa 129 ((RMP) == HAL_REMAPDMA_TIM2_DMA_CH7) || \
Kojto 93:e188a91d3eaa 130 ((RMP) == HAL_REMAPDMA_TIM3_DMA_CH6))
Kojto 93:e188a91d3eaa 131 #else
Kojto 93:e188a91d3eaa 132 #define IS_HAL_REMAPDMA(RMP) (((RMP) == HAL_REMAPDMA_ADC_DMA_CH2) || \
Kojto 93:e188a91d3eaa 133 ((RMP) == HAL_REMAPDMA_USART1_TX_DMA_CH4) || \
Kojto 93:e188a91d3eaa 134 ((RMP) == HAL_REMAPDMA_USART1_RX_DMA_CH5) || \
Kojto 93:e188a91d3eaa 135 ((RMP) == HAL_REMAPDMA_TIM16_DMA_CH4) || \
Kojto 93:e188a91d3eaa 136 ((RMP) == HAL_REMAPDMA_TIM17_DMA_CH2))
Kojto 93:e188a91d3eaa 137 #endif
Kojto 93:e188a91d3eaa 138 /**
Kojto 93:e188a91d3eaa 139 * @}
Kojto 93:e188a91d3eaa 140 */
Kojto 93:e188a91d3eaa 141 #endif /* SYSCFG_CFGR1_DMA_RMP */
Kojto 93:e188a91d3eaa 142
Kojto 93:e188a91d3eaa 143 #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
Kojto 93:e188a91d3eaa 144 /** @defgroup HAL_Pin_remapping HAL Pin remapping
Kojto 93:e188a91d3eaa 145 * @{
Kojto 93:e188a91d3eaa 146 */
Kojto 93:e188a91d3eaa 147 #define HAL_REMAP_PA11_PA12 (SYSCFG_CFGR1_PA11_PA12_RMP) /*!< PA11 and PA12 remapping bit for small packages (28 and 20 pins).
Kojto 93:e188a91d3eaa 148 0: No remap (pin pair PA9/10 mapped on the pins)
Kojto 93:e188a91d3eaa 149 1: Remap (pin pair PA11/12 mapped instead of PA9/10) */
Kojto 93:e188a91d3eaa 150
Kojto 93:e188a91d3eaa 151 #define IS_HAL_REMAP_PIN(RMP) ((RMP) == HAL_REMAP_PA11_PA12)
Kojto 93:e188a91d3eaa 152 /**
Kojto 93:e188a91d3eaa 153 * @}
Kojto 93:e188a91d3eaa 154 */
Kojto 93:e188a91d3eaa 155 #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
Kojto 93:e188a91d3eaa 156
Kojto 93:e188a91d3eaa 157 #if defined(STM32F091xC) || defined(STM32F098xx)
Kojto 93:e188a91d3eaa 158 /** @defgroup HAL_IRDA_ENV_SEL HAL IRDA Enveloppe Selection
Kojto 93:e188a91d3eaa 159 * @note Applicable on STM32F09x
Kojto 93:e188a91d3eaa 160 * @{
Kojto 93:e188a91d3eaa 161 */
Kojto 93:e188a91d3eaa 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 */
Kojto 93:e188a91d3eaa 163 #define HAL_SYSCFG_IRDA_ENV_SEL_USART1 (SYSCFG_CFGR1_IRDA_ENV_SEL_0) /* 01: USART1 is selected as IRDA Modulation enveloppe source */
Kojto 93:e188a91d3eaa 164 #define HAL_SYSCFG_IRDA_ENV_SEL_USART4 (SYSCFG_CFGR1_IRDA_ENV_SEL_1) /* 10: USART4 is selected as IRDA Modulation enveloppe source */
Kojto 93:e188a91d3eaa 165
Kojto 93:e188a91d3eaa 166 #define IS_HAL_SYSCFG_IRDA_ENV_SEL(SEL) (((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_TIM16) || \
Kojto 93:e188a91d3eaa 167 ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART1) || \
Kojto 93:e188a91d3eaa 168 ((SEL) == HAL_SYSCFG_IRDA_ENV_SEL_USART4))
Kojto 93:e188a91d3eaa 169 /**
Kojto 93:e188a91d3eaa 170 * @}
Kojto 93:e188a91d3eaa 171 */
Kojto 93:e188a91d3eaa 172 #endif /* STM32F091xC || STM32F098xx */
Kojto 93:e188a91d3eaa 173
Kojto 93:e188a91d3eaa 174
Kojto 93:e188a91d3eaa 175 /** @defgroup HAL_FastModePlus_I2C HAL FastModePlus I2C
Kojto 93:e188a91d3eaa 176 * @{
Kojto 93:e188a91d3eaa 177 */
Kojto 93:e188a91d3eaa 178 #if defined(SYSCFG_CFGR1_I2C_FMP_PB6)
Kojto 93:e188a91d3eaa 179 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB6 (SYSCFG_CFGR1_I2C_FMP_PB6) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 180 0: PB6 pin operates in standard mode
Kojto 93:e188a91d3eaa 181 1: I2C FM+ mode enabled on PB6 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 182 #endif /* SYSCFG_CFGR1_I2C_FMP_PB6 */
Kojto 93:e188a91d3eaa 183
Kojto 93:e188a91d3eaa 184 #if defined(SYSCFG_CFGR1_I2C_FMP_PB7)
Kojto 93:e188a91d3eaa 185 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB7 (SYSCFG_CFGR1_I2C_FMP_PB7) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 186 0: PB7 pin operates in standard mode
Kojto 93:e188a91d3eaa 187 1: I2C FM+ mode enabled on PB7 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 188 #endif /* SYSCFG_CFGR1_I2C_FMP_PB7 */
Kojto 93:e188a91d3eaa 189
Kojto 93:e188a91d3eaa 190 #if defined(SYSCFG_CFGR1_I2C_FMP_PB8)
Kojto 93:e188a91d3eaa 191 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB8 (SYSCFG_CFGR1_I2C_FMP_PB8) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 192 0: PB8 pin operates in standard mode
Kojto 93:e188a91d3eaa 193 1: I2C FM+ mode enabled on PB8 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 194 #endif /* SYSCFG_CFGR1_I2C_FMP_PB8 */
Kojto 93:e188a91d3eaa 195
Kojto 93:e188a91d3eaa 196 #if defined(SYSCFG_CFGR1_I2C_FMP_PB9)
Kojto 93:e188a91d3eaa 197 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB9 (SYSCFG_CFGR1_I2C_FMP_PB9) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 198 0: PB9 pin operates in standard mode
Kojto 93:e188a91d3eaa 199 1: I2C FM+ mode enabled on PB9 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 200 #endif /* SYSCFG_CFGR1_I2C_FMP_PB9 */
Kojto 93:e188a91d3eaa 201
Kojto 93:e188a91d3eaa 202 #if defined(SYSCFG_CFGR1_I2C_FMP_I2C1)
Kojto 93:e188a91d3eaa 203 #define HAL_SYSCFG_FASTMODEPLUS_I2C1 (SYSCFG_CFGR1_I2C_FMP_I2C1) /*!< I2C1 fast mode Plus driving capability activation
Kojto 93:e188a91d3eaa 204 0: FM+ mode is not enabled on I2C1 pins selected through AF selection bits
Kojto 93:e188a91d3eaa 205 1: FM+ mode is enabled on I2C1 pins selected through AF selection bits */
Kojto 93:e188a91d3eaa 206 #endif /* SYSCFG_CFGR1_I2C_FMP_I2C1 */
Kojto 93:e188a91d3eaa 207
Kojto 93:e188a91d3eaa 208 #if defined(SYSCFG_CFGR1_I2C_FMP_I2C2)
Kojto 93:e188a91d3eaa 209 #define HAL_SYSCFG_FASTMODEPLUS_I2C2 (SYSCFG_CFGR1_I2C_FMP_I2C2) /*!< I2C2 fast mode Plus driving capability activation
Kojto 93:e188a91d3eaa 210 0: FM+ mode is not enabled on I2C2 pins selected through AF selection bits
Kojto 93:e188a91d3eaa 211 1: FM+ mode is enabled on I2C2 pins selected through AF selection bits */
Kojto 93:e188a91d3eaa 212 #endif /* SYSCFG_CFGR1_I2C_FMP_I2C2 */
Kojto 93:e188a91d3eaa 213
Kojto 93:e188a91d3eaa 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
Kojto 93:e188a91d3eaa 216 0: PA9 pin operates in standard mode
Kojto 93:e188a91d3eaa 217 1: FM+ mode is enabled on PA9 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 218 #endif /* SYSCFG_CFGR1_I2C_FMP_PA9 */
Kojto 93:e188a91d3eaa 219
Kojto 93:e188a91d3eaa 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
Kojto 93:e188a91d3eaa 222 0: PA10 pin operates in standard mode
Kojto 93:e188a91d3eaa 223 1: FM+ mode is enabled on PA10 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 224 #endif /* SYSCFG_CFGR1_I2C_FMP_PA10 */
Kojto 93:e188a91d3eaa 225
Kojto 93:e188a91d3eaa 226 #if defined(STM32F091xC) || defined(STM32F098xx) || defined(STM32F042x6) || defined(STM32F048xx)
Kojto 93:e188a91d3eaa 227 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
Kojto 93:e188a91d3eaa 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) || \
Kojto 93:e188a91d3eaa 231 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 232 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 233 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 234 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 235 #elif defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
Kojto 93:e188a91d3eaa 236 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
Kojto 93:e188a91d3eaa 237 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
Kojto 93:e188a91d3eaa 238 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 239 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 240 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 241 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 242 #elif defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F038xx) || defined(STM32F070x6) || defined(STM32F070xB) || defined(STM32F030x6)
Kojto 93:e188a91d3eaa 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) || \
Kojto 93:e188a91d3eaa 246 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 247 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 248 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 249 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 250 #else
Kojto 93:e188a91d3eaa 251 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) (((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 252 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 253 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 254 ((CONFIG) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 255 #endif
Kojto 93:e188a91d3eaa 256
Kojto 93:e188a91d3eaa 257 /**
Kojto 93:e188a91d3eaa 258 * @}
Kojto 93:e188a91d3eaa 259 */
Kojto 93:e188a91d3eaa 260
Kojto 93:e188a91d3eaa 261 #if defined(STM32F091xC) || defined (STM32F098xx)
Kojto 93:e188a91d3eaa 262 /** @defgroup HAL_ISR_Wrapper HAL ISR Wrapper
Kojto 93:e188a91d3eaa 263 * @brief ISR Wrapper
Kojto 93:e188a91d3eaa 264 * @note applicable on STM32F09x
Kojto 93:e188a91d3eaa 265 * @{
Kojto 93:e188a91d3eaa 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 */
Kojto 93:e188a91d3eaa 299
Kojto 93:e188a91d3eaa 300 #define HAL_ITLINE_EWDG ((uint32_t) ((HAL_SYSCFG_ITLINE0 << 0x18) | SYSCFG_ITLINE0_SR_EWDG)) /*!< EWDG has expired .... */
Kojto 93:e188a91d3eaa 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 .... */
Kojto 93:e188a91d3eaa 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 */
Kojto 93:e188a91d3eaa 362 #define HAL_ITLINE_USART1 ((uint32_t) ((HAL_SYSCFG_ITLINE27 << 0x18) | SYSCFG_ITLINE27_SR_USART1_GLB)) /*!< USART1 GLB Interrupt -> exti[25] */
Kojto 93:e188a91d3eaa 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] */
Kojto 93:e188a91d3eaa 372 /**
Kojto 93:e188a91d3eaa 373 * @}
Kojto 93:e188a91d3eaa 374 */
Kojto 93:e188a91d3eaa 375 #endif /* STM32F091xC || STM32F098xx */
Kojto 93:e188a91d3eaa 376
Kojto 93:e188a91d3eaa 377 /**
Kojto 93:e188a91d3eaa 378 * @}
Kojto 93:e188a91d3eaa 379 */
Kojto 93:e188a91d3eaa 380
Kojto 93:e188a91d3eaa 381 /* Exported macros -----------------------------------------------------------*/
Kojto 93:e188a91d3eaa 382 /** @defgroup HAL_Exported_Macros HAL Exported Macros
Kojto 93:e188a91d3eaa 383 * @{
Kojto 93:e188a91d3eaa 384 */
Kojto 93:e188a91d3eaa 385
Kojto 93:e188a91d3eaa 386 /** @defgroup HAL_Freeze_Unfreeze_Peripherals HAL Freeze Unfreeze Peripherals
Kojto 93:e188a91d3eaa 387 * @brief Freeze/Unfreeze Peripherals in Debug mode
Kojto 93:e188a91d3eaa 388 * @{
Kojto 93:e188a91d3eaa 389 */
Kojto 93:e188a91d3eaa 390
Kojto 93:e188a91d3eaa 391 #if defined(DBGMCU_APB1_FZ_DBG_CAN_STOP)
Kojto 93:e188a91d3eaa 392 #define __HAL_FREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN_STOP))
Kojto 93:e188a91d3eaa 393 #define __HAL_UNFREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN_STOP))
Kojto 93:e188a91d3eaa 394 #endif /* DBGMCU_APB1_FZ_DBG_CAN_STOP */
Kojto 93:e188a91d3eaa 395
Kojto 93:e188a91d3eaa 396 #if defined(DBGMCU_APB1_FZ_DBG_RTC_STOP)
Kojto 93:e188a91d3eaa 397 #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
Kojto 93:e188a91d3eaa 398 #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
Kojto 93:e188a91d3eaa 399 #endif /* DBGMCU_APB1_FZ_DBG_RTC_STOP */
Kojto 93:e188a91d3eaa 400
Kojto 93:e188a91d3eaa 401 #if defined(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)
Kojto 93:e188a91d3eaa 402 #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 403 #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 404 #endif /* DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT */
Kojto 93:e188a91d3eaa 405
Kojto 93:e188a91d3eaa 406 #if defined(DBGMCU_APB1_FZ_DBG_IWDG_STOP)
Kojto 93:e188a91d3eaa 407 #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
Kojto 93:e188a91d3eaa 408 #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
Kojto 93:e188a91d3eaa 409 #endif /* DBGMCU_APB1_FZ_DBG_IWDG_STOP */
Kojto 93:e188a91d3eaa 410
Kojto 93:e188a91d3eaa 411 #if defined(DBGMCU_APB1_FZ_DBG_WWDG_STOP)
Kojto 93:e188a91d3eaa 412 #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
Kojto 93:e188a91d3eaa 413 #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
Kojto 93:e188a91d3eaa 414 #endif /* DBGMCU_APB1_FZ_DBG_WWDG_STOP */
Kojto 93:e188a91d3eaa 415
Kojto 93:e188a91d3eaa 416 #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP)
Kojto 93:e188a91d3eaa 417 #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
Kojto 93:e188a91d3eaa 418 #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
Kojto 93:e188a91d3eaa 419 #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */
Kojto 93:e188a91d3eaa 420
Kojto 93:e188a91d3eaa 421 #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP)
Kojto 93:e188a91d3eaa 422 #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
Kojto 93:e188a91d3eaa 423 #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
Kojto 93:e188a91d3eaa 424 #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */
Kojto 93:e188a91d3eaa 425
Kojto 93:e188a91d3eaa 426 #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP)
Kojto 93:e188a91d3eaa 427 #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
Kojto 93:e188a91d3eaa 428 #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
Kojto 93:e188a91d3eaa 429 #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */
Kojto 93:e188a91d3eaa 430
Kojto 93:e188a91d3eaa 431 #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP)
Kojto 93:e188a91d3eaa 432 #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
Kojto 93:e188a91d3eaa 433 #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
Kojto 93:e188a91d3eaa 434 #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */
Kojto 93:e188a91d3eaa 435
Kojto 93:e188a91d3eaa 436 #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP)
Kojto 93:e188a91d3eaa 437 #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
Kojto 93:e188a91d3eaa 438 #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
Kojto 93:e188a91d3eaa 439 #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
Kojto 93:e188a91d3eaa 440
Kojto 93:e188a91d3eaa 441 #if defined(DBGMCU_APB2_FZ_DBG_TIM1_STOP)
Kojto 93:e188a91d3eaa 442 #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
Kojto 93:e188a91d3eaa 443 #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
Kojto 93:e188a91d3eaa 444 #endif /* DBGMCU_APB2_FZ_DBG_TIM1_STOP */
Kojto 93:e188a91d3eaa 445
Kojto 93:e188a91d3eaa 446 #if defined(DBGMCU_APB2_FZ_DBG_TIM15_STOP)
Kojto 93:e188a91d3eaa 447 #define __HAL_FREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM15_STOP))
Kojto 93:e188a91d3eaa 448 #define __HAL_UNFREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM15_STOP))
Kojto 93:e188a91d3eaa 449 #endif /* DBGMCU_APB2_FZ_DBG_TIM15_STOP */
Kojto 93:e188a91d3eaa 450
Kojto 93:e188a91d3eaa 451 #if defined(DBGMCU_APB2_FZ_DBG_TIM16_STOP)
Kojto 93:e188a91d3eaa 452 #define __HAL_FREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM16_STOP))
Kojto 93:e188a91d3eaa 453 #define __HAL_UNFREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM16_STOP))
Kojto 93:e188a91d3eaa 454 #endif /* DBGMCU_APB2_FZ_DBG_TIM16_STOP */
Kojto 93:e188a91d3eaa 455
Kojto 93:e188a91d3eaa 456 #if defined(DBGMCU_APB2_FZ_DBG_TIM17_STOP)
Kojto 93:e188a91d3eaa 457 #define __HAL_FREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM17_STOP))
Kojto 93:e188a91d3eaa 458 #define __HAL_UNFREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM17_STOP))
Kojto 93:e188a91d3eaa 459 #endif /* DBGMCU_APB2_FZ_DBG_TIM17_STOP */
Kojto 93:e188a91d3eaa 460
Kojto 93:e188a91d3eaa 461 /**
Kojto 93:e188a91d3eaa 462 * @}
Kojto 93:e188a91d3eaa 463 */
Kojto 93:e188a91d3eaa 464
Kojto 93:e188a91d3eaa 465 /** @defgroup Memory_Mapping_Selection Memory Mapping Selection
Kojto 93:e188a91d3eaa 466 * @{
Kojto 93:e188a91d3eaa 467 */
Kojto 93:e188a91d3eaa 468 #if defined(SYSCFG_CFGR1_MEM_MODE)
Kojto 93:e188a91d3eaa 469 /** @brief Main Flash memory mapped at 0x00000000
Kojto 93:e188a91d3eaa 470 */
Kojto 93:e188a91d3eaa 471 #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE))
Kojto 93:e188a91d3eaa 472 #endif /* SYSCFG_CFGR1_MEM_MODE */
Kojto 93:e188a91d3eaa 473
Kojto 93:e188a91d3eaa 474 #if defined(SYSCFG_CFGR1_MEM_MODE_0)
Kojto 93:e188a91d3eaa 475 /** @brief System Flash memory mapped at 0x00000000
Kojto 93:e188a91d3eaa 476 */
Kojto 93:e188a91d3eaa 477 #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
Kojto 93:e188a91d3eaa 478 SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_0; \
Kojto 93:e188a91d3eaa 479 }while(0)
Kojto 93:e188a91d3eaa 480 #endif /* SYSCFG_CFGR1_MEM_MODE_0 */
Kojto 93:e188a91d3eaa 481
Kojto 93:e188a91d3eaa 482 #if defined(SYSCFG_CFGR1_MEM_MODE_0) && defined(SYSCFG_CFGR1_MEM_MODE_1)
Kojto 93:e188a91d3eaa 483 /** @brief Embedded SRAM mapped at 0x00000000
Kojto 93:e188a91d3eaa 484 */
Kojto 93:e188a91d3eaa 485 #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
Kojto 93:e188a91d3eaa 486 SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1); \
Kojto 93:e188a91d3eaa 487 }while(0)
Kojto 93:e188a91d3eaa 488 #endif /* SYSCFG_CFGR1_MEM_MODE_0 && SYSCFG_CFGR1_MEM_MODE_1 */
Kojto 93:e188a91d3eaa 489 /**
Kojto 93:e188a91d3eaa 490 * @}
Kojto 93:e188a91d3eaa 491 */
Kojto 93:e188a91d3eaa 492
Kojto 93:e188a91d3eaa 493 #if defined(SYSCFG_CFGR1_DMA_RMP)
Kojto 93:e188a91d3eaa 494 /** @defgroup HAL_DMA_remap HAL DMA remap
Kojto 93:e188a91d3eaa 495 * @brief DMA remapping enable/disable macros
Kojto 93:e188a91d3eaa 496 * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_remapping
Kojto 93:e188a91d3eaa 497 * @{
Kojto 93:e188a91d3eaa 498 */
Kojto 93:e188a91d3eaa 499 #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 500 SYSCFG->CFGR1 |= (__DMA_REMAP__); \
Kojto 93:e188a91d3eaa 501 }while(0)
Kojto 93:e188a91d3eaa 502 #define __HAL_REMAPDMA_CHANNEL_DISABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 503 SYSCFG->CFGR1 &= ~(__DMA_REMAP__); \
Kojto 93:e188a91d3eaa 504 }while(0)
Kojto 93:e188a91d3eaa 505 /**
Kojto 93:e188a91d3eaa 506 * @}
Kojto 93:e188a91d3eaa 507 */
Kojto 93:e188a91d3eaa 508 #endif /* SYSCFG_CFGR1_DMA_RMP */
Kojto 93:e188a91d3eaa 509
Kojto 93:e188a91d3eaa 510 #if defined(SYSCFG_CFGR1_PA11_PA12_RMP)
Kojto 93:e188a91d3eaa 511 /** @defgroup HAL_Pin_remap HAL Pin remap
Kojto 93:e188a91d3eaa 512 * @brief Pin remapping enable/disable macros
Kojto 93:e188a91d3eaa 513 * @param __PIN_REMAP__: This parameter can be a value of @ref HAL_Pin_remapping
Kojto 93:e188a91d3eaa 514 * @{
Kojto 93:e188a91d3eaa 515 */
Kojto 93:e188a91d3eaa 516 #define __HAL_REMAP_PIN_ENABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
Kojto 93:e188a91d3eaa 517 SYSCFG->CFGR1 |= (__PIN_REMAP__); \
Kojto 93:e188a91d3eaa 518 }while(0)
Kojto 93:e188a91d3eaa 519 #define __HAL_REMAP_PIN_DISABLE(__PIN_REMAP__) do {assert_param(IS_HAL_REMAP_PIN((__PIN_REMAP__))); \
Kojto 93:e188a91d3eaa 520 SYSCFG->CFGR1 &= ~(__PIN_REMAP__); \
Kojto 93:e188a91d3eaa 521 }while(0)
Kojto 93:e188a91d3eaa 522 /**
Kojto 93:e188a91d3eaa 523 * @}
Kojto 93:e188a91d3eaa 524 */
Kojto 93:e188a91d3eaa 525 #endif /* SYSCFG_CFGR1_PA11_PA12_RMP */
Kojto 93:e188a91d3eaa 526
Kojto 93:e188a91d3eaa 527 /** @defgroup HAL_Fast_mode_plus_driving_cap HAL Fast mode plus driving cap
Kojto 93:e188a91d3eaa 528 * @brief Fast mode Plus driving capability enable/disable macros
Kojto 93:e188a91d3eaa 529 * @param __FASTMODEPLUS__: This parameter can be a value of @ref HAL_FastModePlus_I2C
Kojto 93:e188a91d3eaa 530 * @{
Kojto 93:e188a91d3eaa 531 */
Kojto 93:e188a91d3eaa 532 #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
Kojto 93:e188a91d3eaa 533 SYSCFG->CFGR1 |= (__FASTMODEPLUS__); \
Kojto 93:e188a91d3eaa 534 }while(0)
Kojto 93:e188a91d3eaa 535
Kojto 93:e188a91d3eaa 536 #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
Kojto 93:e188a91d3eaa 537 SYSCFG->CFGR1 &= ~(__FASTMODEPLUS__); \
Kojto 93:e188a91d3eaa 538 }while(0)
Kojto 93:e188a91d3eaa 539 /**
Kojto 93:e188a91d3eaa 540 * @}
Kojto 93:e188a91d3eaa 541 */
Kojto 93:e188a91d3eaa 542
Kojto 93:e188a91d3eaa 543 #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
Kojto 93:e188a91d3eaa 544 /** @defgroup Cortex_Lockup_Enable Cortex Lockup Enable
Kojto 93:e188a91d3eaa 545 * @{
Kojto 93:e188a91d3eaa 546 */
Kojto 93:e188a91d3eaa 547 /** @brief SYSCFG Break Lockup lock
Kojto 93:e188a91d3eaa 548 * Enables and locks the connection of Cortex-M0 LOCKUP (Hardfault) output to TIM1/15/16/17 Break input
Kojto 93:e188a91d3eaa 549 * @note The selected configuration is locked and can be unlocked by system reset
Kojto 93:e188a91d3eaa 550 */
Kojto 93:e188a91d3eaa 551 #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_LOCKUP_LOCK); \
Kojto 93:e188a91d3eaa 552 SYSCFG->CFGR2 |= SYSCFG_CFGR2_LOCKUP_LOCK; \
Kojto 93:e188a91d3eaa 553 }while(0)
Kojto 93:e188a91d3eaa 554 /**
Kojto 93:e188a91d3eaa 555 * @}
Kojto 93:e188a91d3eaa 556 */
Kojto 93:e188a91d3eaa 557 #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */
Kojto 93:e188a91d3eaa 558
Kojto 93:e188a91d3eaa 559 #if defined(SYSCFG_CFGR2_PVD_LOCK)
Kojto 93:e188a91d3eaa 560 /** @defgroup PVD_Lock_Enable PVD Lock
Kojto 93:e188a91d3eaa 561 * @{
Kojto 93:e188a91d3eaa 562 */
Kojto 93:e188a91d3eaa 563 /** @brief SYSCFG Break PVD lock
Kojto 93:e188a91d3eaa 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
Kojto 93:e188a91d3eaa 565 * @note The selected configuration is locked and can be unlocked by system reset
Kojto 93:e188a91d3eaa 566 */
Kojto 93:e188a91d3eaa 567 #define __HAL_SYSCFG_BREAK_PVD_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_PVD_LOCK); \
Kojto 93:e188a91d3eaa 568 SYSCFG->CFGR2 |= SYSCFG_CFGR2_PVD_LOCK; \
Kojto 93:e188a91d3eaa 569 }while(0)
Kojto 93:e188a91d3eaa 570 /**
Kojto 93:e188a91d3eaa 571 * @}
Kojto 93:e188a91d3eaa 572 */
Kojto 93:e188a91d3eaa 573 #endif /* SYSCFG_CFGR2_PVD_LOCK */
Kojto 93:e188a91d3eaa 574
Kojto 93:e188a91d3eaa 575 #if defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK)
Kojto 93:e188a91d3eaa 576 /** @defgroup SRAM_Parity_Lock SRAM Parity Lock
Kojto 93:e188a91d3eaa 577 * @{
Kojto 93:e188a91d3eaa 578 */
Kojto 93:e188a91d3eaa 579 /** @brief SYSCFG Break SRAM PARITY lock
Kojto 93:e188a91d3eaa 580 * Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1/8/15/16/17
Kojto 93:e188a91d3eaa 581 * @note The selected configuration is locked and can be unlocked by system reset
Kojto 93:e188a91d3eaa 582 */
Kojto 93:e188a91d3eaa 583 #define __HAL_SYSCFG_BREAK_SRAMPARITY_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_SRAM_PARITY_LOCK); \
Kojto 93:e188a91d3eaa 584 SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PARITY_LOCK; \
Kojto 93:e188a91d3eaa 585 }while(0)
Kojto 93:e188a91d3eaa 586 /**
Kojto 93:e188a91d3eaa 587 * @}
Kojto 93:e188a91d3eaa 588 */
Kojto 93:e188a91d3eaa 589 #endif /* SYSCFG_CFGR2_SRAM_PARITY_LOCK */
Kojto 93:e188a91d3eaa 590
Kojto 93:e188a91d3eaa 591 #if defined(SYSCFG_CFGR2_SRAM_PEF)
Kojto 93:e188a91d3eaa 592 /** @defgroup HAL_SYSCFG_Parity_check_on_RAM HAL SYSCFG Parity check on RAM
Kojto 93:e188a91d3eaa 593 * @brief Parity check on RAM disable macro
Kojto 93:e188a91d3eaa 594 * @note Disabling the parity check on RAM locks the configuration bit.
Kojto 93:e188a91d3eaa 595 * To re-enable the parity check on RAM perform a system reset.
Kojto 93:e188a91d3eaa 596 * @{
Kojto 93:e188a91d3eaa 597 */
Kojto 93:e188a91d3eaa 598 #define __HAL_SYSCFG_RAM_PARITYCHECK_DISABLE() (SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PEF)
Kojto 93:e188a91d3eaa 599 /**
Kojto 93:e188a91d3eaa 600 * @}
Kojto 93:e188a91d3eaa 601 */
Kojto 93:e188a91d3eaa 602 #endif /* SYSCFG_CFGR2_SRAM_PEF */
Kojto 93:e188a91d3eaa 603
Kojto 93:e188a91d3eaa 604
Kojto 93:e188a91d3eaa 605 #if defined(STM32F091xC) || defined (STM32F098xx)
Kojto 93:e188a91d3eaa 606 /** @defgroup HAL_ISR_wrapper_check HAL ISR wrapper check
Kojto 93:e188a91d3eaa 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.
Kojto 93:e188a91d3eaa 610 * @{
Kojto 93:e188a91d3eaa 611 */
Kojto 93:e188a91d3eaa 612 #define __HAL_GET_PENDING_IT(__SOURCE__) (SYSCFG->IT_LINE_SR[((__SOURCE__) >> 0x18)] & ((__SOURCE__) & 0x00FFFFFF))
Kojto 93:e188a91d3eaa 613 /**
Kojto 93:e188a91d3eaa 614 * @}
Kojto 93:e188a91d3eaa 615 */
Kojto 93:e188a91d3eaa 616 #endif /* (STM32F091xC) || defined (STM32F098xx)*/
Kojto 93:e188a91d3eaa 617
Kojto 93:e188a91d3eaa 618 #if defined(STM32F091xC) || defined (STM32F098xx)
Kojto 93:e188a91d3eaa 619 /** @defgroup HAL_SYSCFG_IRDA_modulation_envelope_selection HAL SYSCFG IRDA modulation envelope selection
Kojto 93:e188a91d3eaa 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
Kojto 93:e188a91d3eaa 622 * @param __SOURCE__: This parameter can be a value of @ref HAL_IRDA_ENV_SEL
Kojto 93:e188a91d3eaa 623 * @{
Kojto 93:e188a91d3eaa 624 */
Kojto 93:e188a91d3eaa 625 #define __HAL_SYSCFG_IRDA_ENV_SELECTION(__SOURCE__) do {assert_param(IS_HAL_SYSCFG_IRDA_ENV_SEL((__SOURCE__))); \
Kojto 93:e188a91d3eaa 626 SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_IRDA_ENV_SEL); \
Kojto 93:e188a91d3eaa 627 SYSCFG->CFGR1 |= (__SOURCE__); \
Kojto 93:e188a91d3eaa 628 }while(0)
Kojto 93:e188a91d3eaa 629
Kojto 93:e188a91d3eaa 630 #define __HAL_SYSCFG_GET_IRDA_ENV_SELECTION() ((SYSCFG->CFGR1) & 0x000000C0)
Kojto 93:e188a91d3eaa 631 /**
Kojto 93:e188a91d3eaa 632 * @}
Kojto 93:e188a91d3eaa 633 */
Kojto 93:e188a91d3eaa 634 #endif /* (STM32F091xC) || defined (STM32F098xx)*/
Kojto 93:e188a91d3eaa 635
Kojto 93:e188a91d3eaa 636 /**
Kojto 93:e188a91d3eaa 637 * @}
Kojto 93:e188a91d3eaa 638 */
Kojto 93:e188a91d3eaa 639 /* Exported functions --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 640 /** @addtogroup HAL_Exported_Functions HAL Exported Functions
Kojto 93:e188a91d3eaa 641 * @{
Kojto 93:e188a91d3eaa 642 */
Kojto 93:e188a91d3eaa 643
Kojto 93:e188a91d3eaa 644 /** @addtogroup HAL_Exported_Functions_Group1 Initialization and de-initialization Functions
Kojto 93:e188a91d3eaa 645 * @brief Initialization and de-initialization functions
Kojto 93:e188a91d3eaa 646 * @{
Kojto 93:e188a91d3eaa 647 */
Kojto 93:e188a91d3eaa 648 /* Initialization and de-initialization functions ******************************/
Kojto 93:e188a91d3eaa 649 HAL_StatusTypeDef HAL_Init(void);
Kojto 93:e188a91d3eaa 650 HAL_StatusTypeDef HAL_DeInit(void);
Kojto 93:e188a91d3eaa 651 void HAL_MspInit(void);
Kojto 93:e188a91d3eaa 652 void HAL_MspDeInit(void);
Kojto 93:e188a91d3eaa 653 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
Kojto 93:e188a91d3eaa 654 /**
Kojto 93:e188a91d3eaa 655 * @}
Kojto 93:e188a91d3eaa 656 */
Kojto 93:e188a91d3eaa 657
Kojto 93:e188a91d3eaa 658 /** @addtogroup HAL_Exported_Functions_Group2 HAL Control functions
Kojto 93:e188a91d3eaa 659 * @brief HAL Control functions
Kojto 93:e188a91d3eaa 660 * @{
Kojto 93:e188a91d3eaa 661 */
Kojto 93:e188a91d3eaa 662 /* Peripheral Control functions **********************************************/
Kojto 93:e188a91d3eaa 663 void HAL_IncTick(void);
Kojto 93:e188a91d3eaa 664 void HAL_Delay(__IO uint32_t Delay);
Kojto 93:e188a91d3eaa 665 uint32_t HAL_GetTick(void);
Kojto 93:e188a91d3eaa 666 void HAL_SuspendTick(void);
Kojto 93:e188a91d3eaa 667 void HAL_ResumeTick(void);
Kojto 93:e188a91d3eaa 668 uint32_t HAL_GetHalVersion(void);
Kojto 93:e188a91d3eaa 669 uint32_t HAL_GetREVID(void);
Kojto 93:e188a91d3eaa 670 uint32_t HAL_GetDEVID(void);
Kojto 93:e188a91d3eaa 671 void HAL_EnableDBGStopMode(void);
Kojto 93:e188a91d3eaa 672 void HAL_DisableDBGStopMode(void);
Kojto 93:e188a91d3eaa 673 void HAL_EnableDBGStandbyMode(void);
Kojto 93:e188a91d3eaa 674 void HAL_DisableDBGStandbyMode(void);
Kojto 93:e188a91d3eaa 675 /**
Kojto 93:e188a91d3eaa 676 * @}
Kojto 93:e188a91d3eaa 677 */
Kojto 93:e188a91d3eaa 678
Kojto 93:e188a91d3eaa 679 /**
Kojto 93:e188a91d3eaa 680 * @}
Kojto 93:e188a91d3eaa 681 */
Kojto 93:e188a91d3eaa 682
Kojto 93:e188a91d3eaa 683 /**
Kojto 93:e188a91d3eaa 684 * @}
Kojto 93:e188a91d3eaa 685 */
Kojto 93:e188a91d3eaa 686
Kojto 93:e188a91d3eaa 687 /**
Kojto 93:e188a91d3eaa 688 * @}
Kojto 93:e188a91d3eaa 689 */
Kojto 93:e188a91d3eaa 690
Kojto 93:e188a91d3eaa 691 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 692 }
Kojto 93:e188a91d3eaa 693 #endif
Kojto 93:e188a91d3eaa 694
Kojto 93:e188a91d3eaa 695 #endif /* __STM32F0xx_HAL_H */
Kojto 93:e188a91d3eaa 696
Kojto 93:e188a91d3eaa 697 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/