mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
yusuke_kyo
Date:
Wed Apr 08 08:04:18 2015 +0000
Revision:
98:01a414ca7d6d
Parent:
93:e188a91d3eaa
remove SerialHalfDuplex.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 93:e188a91d3eaa 1 /**
Kojto 93:e188a91d3eaa 2 ******************************************************************************
Kojto 93:e188a91d3eaa 3 * @file stm32f3xx_hal.h
Kojto 93:e188a91d3eaa 4 * @author MCD Application Team
Kojto 93:e188a91d3eaa 5 * @version V1.1.0
Kojto 93:e188a91d3eaa 6 * @date 12-Sept-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 __STM32F3xx_HAL_H
Kojto 93:e188a91d3eaa 41 #define __STM32F3xx_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 "stm32f3xx_hal_conf.h"
Kojto 93:e188a91d3eaa 49
Kojto 93:e188a91d3eaa 50 /** @addtogroup STM32F3xx_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 /** @defgroup SYSCFG_BitAddress_AliasRegion SYSCFG registers bit address in the alias region
Kojto 93:e188a91d3eaa 64 * @brief SYSCFG registers bit address in the alias region
Kojto 93:e188a91d3eaa 65 * @{
Kojto 93:e188a91d3eaa 66 */
Kojto 93:e188a91d3eaa 67 /* ------------ SYSCFG registers bit address in the alias region -------------*/
Kojto 93:e188a91d3eaa 68 #define SYSCFG_OFFSET (SYSCFG_BASE - PERIPH_BASE)
Kojto 93:e188a91d3eaa 69 /* --- CFGR2 Register ---*/
Kojto 93:e188a91d3eaa 70 /* Alias word address of BYP_ADDR_PAR bit */
Kojto 93:e188a91d3eaa 71 #define CFGR2_OFFSET (SYSCFG_OFFSET + 0x18)
Kojto 93:e188a91d3eaa 72 #define BYPADDRPAR_BitNumber 0x04
Kojto 93:e188a91d3eaa 73 #define CFGR2_BYPADDRPAR_BB (PERIPH_BB_BASE + (CFGR2_OFFSET * 32) + (BYPADDRPAR_BitNumber * 4))
Kojto 93:e188a91d3eaa 74 /**
Kojto 93:e188a91d3eaa 75 * @}
Kojto 93:e188a91d3eaa 76 */
Kojto 93:e188a91d3eaa 77
Kojto 93:e188a91d3eaa 78 #if defined(SYSCFG_CFGR1_DMA_RMP)
Kojto 93:e188a91d3eaa 79 /** @defgroup HAL_DMA_Remapping DMA Remapping
Kojto 93:e188a91d3eaa 80 * Elements values convention: 0xXXYYYYYY
Kojto 93:e188a91d3eaa 81 * - YYYYYY : Position in the register
Kojto 93:e188a91d3eaa 82 * - XX : Register index
Kojto 93:e188a91d3eaa 83 * - 00: CFGR1 register in SYSCFG
Kojto 93:e188a91d3eaa 84 * - 01: CFGR3 register in SYSCFG (not available on STM32F373xC/STM32F378xx devices)
Kojto 93:e188a91d3eaa 85 * @{
Kojto 93:e188a91d3eaa 86 */
Kojto 93:e188a91d3eaa 87 #define HAL_REMAPDMA_ADC24_DMA2_CH34 ((uint32_t)0x00000100) /*!< ADC24 DMA remap (STM32F303xB/C/E, STM32F358xx and STM32F398xx devices)
Kojto 93:e188a91d3eaa 88 1: Remap (ADC24 DMA requests mapped on DMA2 channels 3 and 4) */
Kojto 93:e188a91d3eaa 89 #define HAL_REMAPDMA_TIM16_DMA1_CH6 ((uint32_t)0x00000800) /*!< TIM16 DMA request remap
Kojto 93:e188a91d3eaa 90 1: Remap (TIM16_CH1 and TIM16_UP DMA requests mapped on DMA1 channel 6) */
Kojto 93:e188a91d3eaa 91 #define HAL_REMAPDMA_TIM17_DMA1_CH7 ((uint32_t)0x00001000) /*!< TIM17 DMA request remap
Kojto 93:e188a91d3eaa 92 1: Remap (TIM17_CH1 and TIM17_UP DMA requests mapped on DMA1 channel 7) */
Kojto 93:e188a91d3eaa 93 #define HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3 ((uint32_t)0x00002000) /*!< TIM6 and DAC channel1 DMA remap (STM32F303xB/C/E, STM32F358xx and STM32F398xx devices)
Kojto 93:e188a91d3eaa 94 1: Remap (TIM6_UP and DAC_CH1 DMA requests mapped on DMA1 channel 3) */
Kojto 93:e188a91d3eaa 95 #define HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4 ((uint32_t)0x00004000) /*!< TIM7 and DAC channel2 DMA remap (STM32F303xB/C/E, STM32F358xx and STM32F398xx devices)
Kojto 93:e188a91d3eaa 96 1: Remap (TIM7_UP and DAC_CH2 DMA requests mapped on DMA1 channel 4) */
Kojto 93:e188a91d3eaa 97 #define HAL_REMAPDMA_DAC2_CH1_DMA1_CH5 ((uint32_t)0x00008000) /*!< DAC2 channel1 DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 98 1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5) */
Kojto 93:e188a91d3eaa 99 #define HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5 ((uint32_t)0x00008000) /*!< DAC2 channel1 DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 100 1: Remap (DAC2_CH1 DMA requests mapped on DMA1 channel 5) */
Kojto 93:e188a91d3eaa 101 #if defined(SYSCFG_CFGR3_DMA_RMP)
Kojto 93:e188a91d3eaa 102 #if !defined(HAL_REMAP_CFGR3_MASK)
Kojto 93:e188a91d3eaa 103 #define HAL_REMAP_CFGR3_MASK ((uint32_t)0x01000000)
Kojto 93:e188a91d3eaa 104 #endif
Kojto 93:e188a91d3eaa 105
Kojto 93:e188a91d3eaa 106 #define HAL_REMAPDMA_SPI1_RX_DMA1_CH2 ((uint32_t)0x01000003) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 107 11: Map on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 108 #define HAL_REMAPDMA_SPI1_RX_DMA1_CH4 ((uint32_t)0x01000001) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 109 01: Map on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 110 #define HAL_REMAPDMA_SPI1_RX_DMA1_CH6 ((uint32_t)0x01000002) /*!< SPI1_RX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 111 10: Map on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 112 #define HAL_REMAPDMA_SPI1_TX_DMA1_CH3 ((uint32_t)0x0100000C) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 113 11: Map on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 114 #define HAL_REMAPDMA_SPI1_TX_DMA1_CH5 ((uint32_t)0x01000004) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 115 01: Map on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 116 #define HAL_REMAPDMA_SPI1_TX_DMA1_CH7 ((uint32_t)0x01000008) /*!< SPI1_TX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 117 10: Map on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 118 #define HAL_REMAPDMA_I2C1_RX_DMA1_CH7 ((uint32_t)0x01000030) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 119 11: Map on DMA1 channel 7 */
Kojto 93:e188a91d3eaa 120 #define HAL_REMAPDMA_I2C1_RX_DMA1_CH3 ((uint32_t)0x01000010) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 121 01: Map on DMA1 channel 3 */
Kojto 93:e188a91d3eaa 122 #define HAL_REMAPDMA_I2C1_RX_DMA1_CH5 ((uint32_t)0x01000020) /*!< I2C1_RX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 123 10: Map on DMA1 channel 5 */
Kojto 93:e188a91d3eaa 124 #define HAL_REMAPDMA_I2C1_TX_DMA1_CH6 ((uint32_t)0x010000C0) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 125 11: Map on DMA1 channel 6 */
Kojto 93:e188a91d3eaa 126 #define HAL_REMAPDMA_I2C1_TX_DMA1_CH2 ((uint32_t)0x01000040) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 127 01: Map on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 128 #define HAL_REMAPDMA_I2C1_TX_DMA1_CH4 ((uint32_t)0x01000080) /*!< I2C1_TX DMA remap (STM32F303x4/6/8 devices only)
Kojto 93:e188a91d3eaa 129 10: Map on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 130 #define HAL_REMAPDMA_ADC2_DMA1_CH2 ((uint32_t)0x01000100) /*!< ADC2 DMA remap
Kojto 93:e188a91d3eaa 131 x0: No remap (ADC2 on DMA2)
Kojto 93:e188a91d3eaa 132 10: Map on DMA1 channel 2 */
Kojto 93:e188a91d3eaa 133 #define HAL_REMAPDMA_ADC2_DMA1_CH4 ((uint32_t)0x01000300) /*!< ADC2 DMA remap
Kojto 93:e188a91d3eaa 134 11: Map on DMA1 channel 4 */
Kojto 93:e188a91d3eaa 135 #endif /* SYSCFG_CFGR3_DMA_RMP */
Kojto 93:e188a91d3eaa 136
Kojto 93:e188a91d3eaa 137 #if defined(SYSCFG_CFGR3_DMA_RMP)
Kojto 93:e188a91d3eaa 138 #define IS_HAL_REMAPDMA(RMP) ((((RMP) & HAL_REMAPDMA_ADC24_DMA2_CH34) == HAL_REMAPDMA_ADC24_DMA2_CH34) || \
Kojto 93:e188a91d3eaa 139 (((RMP) & HAL_REMAPDMA_TIM16_DMA1_CH6) == HAL_REMAPDMA_TIM16_DMA1_CH6) || \
Kojto 93:e188a91d3eaa 140 (((RMP) & HAL_REMAPDMA_TIM17_DMA1_CH7) == HAL_REMAPDMA_TIM17_DMA1_CH7) || \
Kojto 93:e188a91d3eaa 141 (((RMP) & HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) == HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) || \
Kojto 93:e188a91d3eaa 142 (((RMP) & HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) == HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) || \
Kojto 93:e188a91d3eaa 143 (((RMP) & HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) || \
Kojto 93:e188a91d3eaa 144 (((RMP) & HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5) || \
Kojto 93:e188a91d3eaa 145 (((RMP) & HAL_REMAPDMA_SPI1_RX_DMA1_CH2) == HAL_REMAPDMA_SPI1_RX_DMA1_CH2) || \
Kojto 93:e188a91d3eaa 146 (((RMP) & HAL_REMAPDMA_SPI1_RX_DMA1_CH4) == HAL_REMAPDMA_SPI1_RX_DMA1_CH4) || \
Kojto 93:e188a91d3eaa 147 (((RMP) & HAL_REMAPDMA_SPI1_RX_DMA1_CH6) == HAL_REMAPDMA_SPI1_RX_DMA1_CH6) || \
Kojto 93:e188a91d3eaa 148 (((RMP) & HAL_REMAPDMA_SPI1_TX_DMA1_CH3) == HAL_REMAPDMA_SPI1_TX_DMA1_CH3) || \
Kojto 93:e188a91d3eaa 149 (((RMP) & HAL_REMAPDMA_SPI1_TX_DMA1_CH5) == HAL_REMAPDMA_SPI1_TX_DMA1_CH5) || \
Kojto 93:e188a91d3eaa 150 (((RMP) & HAL_REMAPDMA_SPI1_TX_DMA1_CH7) == HAL_REMAPDMA_SPI1_TX_DMA1_CH7) || \
Kojto 93:e188a91d3eaa 151 (((RMP) & HAL_REMAPDMA_I2C1_RX_DMA1_CH7) == HAL_REMAPDMA_I2C1_RX_DMA1_CH7) || \
Kojto 93:e188a91d3eaa 152 (((RMP) & HAL_REMAPDMA_I2C1_RX_DMA1_CH3) == HAL_REMAPDMA_I2C1_RX_DMA1_CH3) || \
Kojto 93:e188a91d3eaa 153 (((RMP) & HAL_REMAPDMA_I2C1_RX_DMA1_CH5) == HAL_REMAPDMA_I2C1_RX_DMA1_CH5) || \
Kojto 93:e188a91d3eaa 154 (((RMP) & HAL_REMAPDMA_I2C1_TX_DMA1_CH6) == HAL_REMAPDMA_I2C1_TX_DMA1_CH6) || \
Kojto 93:e188a91d3eaa 155 (((RMP) & HAL_REMAPDMA_I2C1_TX_DMA1_CH2) == HAL_REMAPDMA_I2C1_TX_DMA1_CH2) || \
Kojto 93:e188a91d3eaa 156 (((RMP) & HAL_REMAPDMA_I2C1_TX_DMA1_CH4) == HAL_REMAPDMA_I2C1_TX_DMA1_CH4) || \
Kojto 93:e188a91d3eaa 157 (((RMP) & HAL_REMAPDMA_ADC2_DMA1_CH2) == HAL_REMAPDMA_ADC2_DMA1_CH2) || \
Kojto 93:e188a91d3eaa 158 (((RMP) & HAL_REMAPDMA_ADC2_DMA1_CH4) == HAL_REMAPDMA_ADC2_DMA1_CH4))
Kojto 93:e188a91d3eaa 159 #else
Kojto 93:e188a91d3eaa 160 #define IS_HAL_REMAPDMA(RMP) ((((RMP) & HAL_REMAPDMA_ADC24_DMA2_CH34) == HAL_REMAPDMA_ADC24_DMA2_CH34) || \
Kojto 93:e188a91d3eaa 161 (((RMP) & HAL_REMAPDMA_TIM16_DMA1_CH6) == HAL_REMAPDMA_TIM16_DMA1_CH6) || \
Kojto 93:e188a91d3eaa 162 (((RMP) & HAL_REMAPDMA_TIM17_DMA1_CH7) == HAL_REMAPDMA_TIM17_DMA1_CH7) || \
Kojto 93:e188a91d3eaa 163 (((RMP) & HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) == HAL_REMAPDMA_TIM6_DAC1_CH1_DMA1_CH3) || \
Kojto 93:e188a91d3eaa 164 (((RMP) & HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) == HAL_REMAPDMA_TIM7_DAC1_CH2_DMA1_CH4) || \
Kojto 93:e188a91d3eaa 165 (((RMP) & HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_DAC2_CH1_DMA1_CH5) || \
Kojto 93:e188a91d3eaa 166 (((RMP) & HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5) == HAL_REMAPDMA_TIM18_DAC2_CH1_DMA1_CH5))
Kojto 93:e188a91d3eaa 167 #endif /* SYSCFG_CFGR3_DMA_RMP && SYSCFG_CFGR1_DMA_RMP*/
Kojto 93:e188a91d3eaa 168 /**
Kojto 93:e188a91d3eaa 169 * @}
Kojto 93:e188a91d3eaa 170 */
Kojto 93:e188a91d3eaa 171 #endif /* SYSCFG_CFGR1_DMA_RMP */
Kojto 93:e188a91d3eaa 172
Kojto 93:e188a91d3eaa 173 /** @defgroup HAL_Trigger_Remapping Trigger Remapping
Kojto 93:e188a91d3eaa 174 * Elements values convention: 0xXXYYYYYY
Kojto 93:e188a91d3eaa 175 * - YYYYYY : Position in the register
Kojto 93:e188a91d3eaa 176 * - XX : Register index
Kojto 93:e188a91d3eaa 177 * - 00: CFGR1 register in SYSCFG
Kojto 93:e188a91d3eaa 178 * - 01: CFGR3 register in SYSCFG
Kojto 93:e188a91d3eaa 179 * @{
Kojto 93:e188a91d3eaa 180 */
Kojto 93:e188a91d3eaa 181 #define HAL_REMAPTRIGGER_DAC1_TRIG ((uint32_t)0x00000080) /*!< DAC trigger remap (when TSEL = 001 on STM32F303xB/C and STM32F358xx devices)
Kojto 93:e188a91d3eaa 182 0: No remap (DAC trigger is TIM8_TRGO)
Kojto 93:e188a91d3eaa 183 1: Remap (DAC trigger is TIM3_TRGO) */
Kojto 93:e188a91d3eaa 184 #define HAL_REMAPTRIGGER_TIM1_ITR3 ((uint32_t)0x00000040) /*!< TIM1 ITR3 trigger remap
Kojto 93:e188a91d3eaa 185 0: No remap
Kojto 93:e188a91d3eaa 186 1: Remap (TIM1_TRG3 = TIM17_OC) */
Kojto 93:e188a91d3eaa 187 #if defined(SYSCFG_CFGR3_TRIGGER_RMP)
Kojto 93:e188a91d3eaa 188 #if !defined(HAL_REMAP_CFGR3_MASK)
Kojto 93:e188a91d3eaa 189 #define HAL_REMAP_CFGR3_MASK ((uint32_t)0x01000000)
Kojto 93:e188a91d3eaa 190 #endif
Kojto 93:e188a91d3eaa 191 #define HAL_REMAPTRIGGER_DAC1_TRIG3 ((uint32_t)0x01010000) /*!< DAC1_CH1 / DAC1_CH2 Trigger remap
Kojto 93:e188a91d3eaa 192 0: Remap (DAC trigger is TIM15_TRGO)
Kojto 93:e188a91d3eaa 193 1: Remap (DAC trigger is HRTIM1_DAC1_TRIG1) */
Kojto 93:e188a91d3eaa 194 #define HAL_REMAPTRIGGER_DAC1_TRIG5 ((uint32_t)0x01020000) /*!< DAC1_CH1 / DAC1_CH2 Trigger remap
Kojto 93:e188a91d3eaa 195 0: No remap
Kojto 93:e188a91d3eaa 196 1: Remap (DAC trigger is HRTIM1_DAC1_TRIG2) */
Kojto 93:e188a91d3eaa 197 #define IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1) == HAL_REMAPTRIGGER_DAC1) || \
Kojto 93:e188a91d3eaa 198 (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3) == HAL_REMAPTRIGGER_TIM1_ITR3) || \
Kojto 93:e188a91d3eaa 199 (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG3) == HAL_REMAPTRIGGER_DAC1_TRIG3) || \
Kojto 93:e188a91d3eaa 200 (((RMP) & HAL_REMAPTRIGGER_DAC1_TRIG5) == HAL_REMAPTRIGGER_DAC1_TRIG5))
Kojto 93:e188a91d3eaa 201 #else
Kojto 93:e188a91d3eaa 202 #define IS_HAL_REMAPTRIGGER(RMP) ((((RMP) & HAL_REMAPTRIGGER_DAC1) == HAL_REMAPTRIGGER_DAC1) || \
Kojto 93:e188a91d3eaa 203 (((RMP) & HAL_REMAPTRIGGER_TIM1_ITR3) == HAL_REMAPTRIGGER_TIM1_ITR3))
Kojto 93:e188a91d3eaa 204 #endif /* SYSCFG_CFGR3_TRIGGER_RMP */
Kojto 93:e188a91d3eaa 205 /**
Kojto 93:e188a91d3eaa 206 * @}
Kojto 93:e188a91d3eaa 207 */
Kojto 93:e188a91d3eaa 208
Kojto 93:e188a91d3eaa 209 #if defined (STM32F303xE) || defined (STM32F398xx)
Kojto 93:e188a91d3eaa 210 /** @defgroup HAL_ADC_Trigger_Remapping ADC Trigger Remapping
Kojto 93:e188a91d3eaa 211 * @{
Kojto 93:e188a91d3eaa 212 */
Kojto 93:e188a91d3eaa 213 #define HAL_REMAPADCTRIGGER_ADC12_EXT2 SYSCFG_CFGR4_ADC12_EXT2_RMP /*!< Input trigger of ADC12 regular channel EXT2
Kojto 93:e188a91d3eaa 214 0: No remap (TIM1_CC3)
Kojto 93:e188a91d3eaa 215 1: Remap (TIM20_TRGO) */
Kojto 93:e188a91d3eaa 216 #define HAL_REMAPADCTRIGGER_ADC12_EXT3 SYSCFG_CFGR4_ADC12_EXT3_RMP /*!< Input trigger of ADC12 regular channel EXT3
Kojto 93:e188a91d3eaa 217 0: No remap (TIM2_CC2)
Kojto 93:e188a91d3eaa 218 1: Remap (TIM20_TRGO2) */
Kojto 93:e188a91d3eaa 219 #define HAL_REMAPADCTRIGGER_ADC12_EXT5 SYSCFG_CFGR4_ADC12_EXT5_RMP /*!< Input trigger of ADC12 regular channel EXT5
Kojto 93:e188a91d3eaa 220 0: No remap (TIM4_CC4)
Kojto 93:e188a91d3eaa 221 1: Remap (TIM20_CC1) */
Kojto 93:e188a91d3eaa 222 #define HAL_REMAPADCTRIGGER_ADC12_EXT13 SYSCFG_CFGR4_ADC12_EXT13_RMP /*!< Input trigger of ADC12 regular channel EXT13
Kojto 93:e188a91d3eaa 223 0: No remap (TIM6_TRGO)
Kojto 93:e188a91d3eaa 224 1: Remap (TIM20_CC2) */
Kojto 93:e188a91d3eaa 225 #define HAL_REMAPADCTRIGGER_ADC12_EXT15 SYSCFG_CFGR4_ADC12_EXT15_RMP /*!< Input trigger of ADC12 regular channel EXT15
Kojto 93:e188a91d3eaa 226 0: No remap (TIM3_CC4)
Kojto 93:e188a91d3eaa 227 1: Remap (TIM20_CC3) */
Kojto 93:e188a91d3eaa 228 #define HAL_REMAPADCTRIGGER_ADC12_JEXT3 SYSCFG_CFGR4_ADC12_JEXT3_RMP /*!< Input trigger of ADC12 injected channel JEXT3
Kojto 93:e188a91d3eaa 229 0: No remap (TIM2_CC1)
Kojto 93:e188a91d3eaa 230 1: Remap (TIM20_TRGO) */
Kojto 93:e188a91d3eaa 231 #define HAL_REMAPADCTRIGGER_ADC12_JEXT6 SYSCFG_CFGR4_ADC12_JEXT6_RMP /*!< Input trigger of ADC12 injected channel JEXT6
Kojto 93:e188a91d3eaa 232 0: No remap (EXTI line 15)
Kojto 93:e188a91d3eaa 233 1: Remap (TIM20_TRGO2) */
Kojto 93:e188a91d3eaa 234 #define HAL_REMAPADCTRIGGER_ADC12_JEXT13 SYSCFG_CFGR4_ADC12_JEXT13_RMP /*!< Input trigger of ADC12 injected channel JEXT13
Kojto 93:e188a91d3eaa 235 0: No remap (TIM3_CC1)
Kojto 93:e188a91d3eaa 236 1: Remap (TIM20_CC4) */
Kojto 93:e188a91d3eaa 237 #define HAL_REMAPADCTRIGGER_ADC34_EXT5 SYSCFG_CFGR4_ADC34_EXT5_RMP /*!< Input trigger of ADC34 regular channel EXT5
Kojto 93:e188a91d3eaa 238 0: No remap (EXTI line 2)
Kojto 93:e188a91d3eaa 239 1: Remap (TIM20_TRGO) */
Kojto 93:e188a91d3eaa 240 #define HAL_REMAPADCTRIGGER_ADC34_EXT6 SYSCFG_CFGR4_ADC34_EXT6_RMP /*!< Input trigger of ADC34 regular channel EXT6
Kojto 93:e188a91d3eaa 241 0: No remap (TIM4_CC1)
Kojto 93:e188a91d3eaa 242 1: Remap (TIM20_TRGO2) */
Kojto 93:e188a91d3eaa 243 #define HAL_REMAPADCTRIGGER_ADC34_EXT15 SYSCFG_CFGR4_ADC34_EXT15_RMP /*!< Input trigger of ADC34 regular channel EXT15
Kojto 93:e188a91d3eaa 244 0: No remap (TIM2_CC1)
Kojto 93:e188a91d3eaa 245 1: Remap (TIM20_CC1) */
Kojto 93:e188a91d3eaa 246 #define HAL_REMAPADCTRIGGER_ADC34_JEXT5 SYSCFG_CFGR4_ADC34_JEXT5_RMP /*!< Input trigger of ADC34 injected channel JEXT5
Kojto 93:e188a91d3eaa 247 0: No remap (TIM4_CC3)
Kojto 93:e188a91d3eaa 248 1: Remap (TIM20_TRGO) */
Kojto 93:e188a91d3eaa 249 #define HAL_REMAPADCTRIGGER_ADC34_JEXT11 SYSCFG_CFGR4_ADC34_JEXT11_RMP /*!< Input trigger of ADC34 injected channel JEXT11
Kojto 93:e188a91d3eaa 250 0: No remap (TIM1_CC3)
Kojto 93:e188a91d3eaa 251 1: Remap (TIM20_TRGO2) */
Kojto 93:e188a91d3eaa 252 #define HAL_REMAPADCTRIGGER_ADC34_JEXT14 SYSCFG_CFGR4_ADC34_JEXT14_RMP /*!< Input trigger of ADC34 injected channel JEXT14
Kojto 93:e188a91d3eaa 253 0: No remap (TIM7_TRGO)
Kojto 93:e188a91d3eaa 254 1: Remap (TIM20_CC2) */
Kojto 93:e188a91d3eaa 255
Kojto 93:e188a91d3eaa 256 #define IS_HAL_REMAPADCTRIGGER(RMP) ((((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT2) == HAL_REMAPADCTRIGGER_ADC12_EXT2) || \
Kojto 93:e188a91d3eaa 257 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT3) == HAL_REMAPADCTRIGGER_ADC12_EXT3) || \
Kojto 93:e188a91d3eaa 258 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT5) == HAL_REMAPADCTRIGGER_ADC12_EXT5) || \
Kojto 93:e188a91d3eaa 259 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT13) == HAL_REMAPADCTRIGGER_ADC12_EXT13) || \
Kojto 93:e188a91d3eaa 260 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_EXT15) == HAL_REMAPADCTRIGGER_ADC12_EXT15) || \
Kojto 93:e188a91d3eaa 261 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT3) == HAL_REMAPADCTRIGGER_ADC12_JEXT3) || \
Kojto 93:e188a91d3eaa 262 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT6) == HAL_REMAPADCTRIGGER_ADC12_JEXT6) || \
Kojto 93:e188a91d3eaa 263 (((RMP) & HAL_REMAPADCTRIGGER_ADC12_JEXT13) == HAL_REMAPADCTRIGGER_ADC12_JEXT13) || \
Kojto 93:e188a91d3eaa 264 (((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT5) == HAL_REMAPADCTRIGGER_ADC34_EXT5) || \
Kojto 93:e188a91d3eaa 265 (((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT6) == HAL_REMAPADCTRIGGER_ADC34_EXT6) || \
Kojto 93:e188a91d3eaa 266 (((RMP) & HAL_REMAPADCTRIGGER_ADC34_EXT15) == HAL_REMAPADCTRIGGER_ADC34_EXT15) || \
Kojto 93:e188a91d3eaa 267 (((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT5) == HAL_REMAPADCTRIGGER_ADC34_JEXT5) || \
Kojto 93:e188a91d3eaa 268 (((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT11) == HAL_REMAPADCTRIGGER_ADC34_JEXT11) || \
Kojto 93:e188a91d3eaa 269 (((RMP) & HAL_REMAPADCTRIGGER_ADC34_JEXT14) == HAL_REMAPADCTRIGGER_ADC34_JEXT14))
Kojto 93:e188a91d3eaa 270 /**
Kojto 93:e188a91d3eaa 271 * @}
Kojto 93:e188a91d3eaa 272 */
Kojto 93:e188a91d3eaa 273 #endif /* STM32F303xE || STM32F398xx */
Kojto 93:e188a91d3eaa 274
Kojto 93:e188a91d3eaa 275 /** @defgroup HAL_FastModePlus_I2C I2C Fast Mode Plus
Kojto 93:e188a91d3eaa 276 * @{
Kojto 93:e188a91d3eaa 277 */
Kojto 93:e188a91d3eaa 278 #if defined(SYSCFG_CFGR1_I2C1_FMP)
Kojto 93:e188a91d3eaa 279 #define HAL_SYSCFG_FASTMODEPLUS_I2C1 ((uint32_t)SYSCFG_CFGR1_I2C1_FMP) /*!< I2C1 fast mode Plus driving capability activation
Kojto 93:e188a91d3eaa 280 0: FM+ mode is not enabled on I2C1 pins selected through AF selection bits
Kojto 93:e188a91d3eaa 281 1: FM+ mode is enabled on I2C1 pins selected through AF selection bits */
Kojto 93:e188a91d3eaa 282 #endif /* SYSCFG_CFGR1_I2C1_FMP */
Kojto 93:e188a91d3eaa 283
Kojto 93:e188a91d3eaa 284 #if defined(SYSCFG_CFGR1_I2C2_FMP)
Kojto 93:e188a91d3eaa 285 #define HAL_SYSCFG_FASTMODEPLUS_I2C2 ((uint32_t)SYSCFG_CFGR1_I2C2_FMP) /*!< I2C2 fast mode Plus driving capability activation
Kojto 93:e188a91d3eaa 286 0: FM+ mode is not enabled on I2C2 pins selected through AF selection bits
Kojto 93:e188a91d3eaa 287 1: FM+ mode is enabled on I2C2 pins selected through AF selection bits */
Kojto 93:e188a91d3eaa 288 #endif /* SYSCFG_CFGR1_I2C2_FMP */
Kojto 93:e188a91d3eaa 289
Kojto 93:e188a91d3eaa 290 #if defined(SYSCFG_CFGR1_I2C3_FMP)
Kojto 93:e188a91d3eaa 291 #define HAL_SYSCFG_FASTMODEPLUS_I2C3 ((uint32_t)SYSCFG_CFGR1_I2C3_FMP) /*!< I2C3 fast mode Plus driving capability activation
Kojto 93:e188a91d3eaa 292 0: FM+ mode is not enabled on I2C3 pins selected through AF selection bits
Kojto 93:e188a91d3eaa 293 1: FM+ mode is enabled on I2C3 pins selected through AF selection bits */
Kojto 93:e188a91d3eaa 294 #endif /* SYSCFG_CFGR1_I2C3_FMP */
Kojto 93:e188a91d3eaa 295
Kojto 93:e188a91d3eaa 296 #if defined(SYSCFG_CFGR1_I2C_PB6_FMP)
Kojto 93:e188a91d3eaa 297 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB6 ((uint32_t)SYSCFG_CFGR1_I2C_PB6_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 298 0: PB6 pin operates in standard mode
Kojto 93:e188a91d3eaa 299 1: I2C FM+ mode enabled on PB6 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 300 #endif /* SYSCFG_CFGR1_I2C_PB6_FMP */
Kojto 93:e188a91d3eaa 301
Kojto 93:e188a91d3eaa 302 #if defined(SYSCFG_CFGR1_I2C_PB7_FMP)
Kojto 93:e188a91d3eaa 303 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB7 ((uint32_t)SYSCFG_CFGR1_I2C_PB7_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 304 0: PB7 pin operates in standard mode
Kojto 93:e188a91d3eaa 305 1: I2C FM+ mode enabled on PB7 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 306 #endif /* SYSCFG_CFGR1_I2C_PB7_FMP */
Kojto 93:e188a91d3eaa 307
Kojto 93:e188a91d3eaa 308 #if defined(SYSCFG_CFGR1_I2C_PB8_FMP)
Kojto 93:e188a91d3eaa 309 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB8 ((uint32_t)SYSCFG_CFGR1_I2C_PB8_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 310 0: PB8 pin operates in standard mode
Kojto 93:e188a91d3eaa 311 1: I2C FM+ mode enabled on PB8 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 312 #endif /* SYSCFG_CFGR1_I2C_PB8_FMP */
Kojto 93:e188a91d3eaa 313
Kojto 93:e188a91d3eaa 314 #if defined(SYSCFG_CFGR1_I2C_PB9_FMP)
Kojto 93:e188a91d3eaa 315 #define HAL_SYSCFG_FASTMODEPLUS_I2C_PB9 ((uint32_t)SYSCFG_CFGR1_I2C_PB9_FMP) /*!< Fast Mode Plus (FM+) driving capability activation on the pad
Kojto 93:e188a91d3eaa 316 0: PB9 pin operates in standard mode
Kojto 93:e188a91d3eaa 317 1: I2C FM+ mode enabled on PB9 pin, and the Speed control is bypassed */
Kojto 93:e188a91d3eaa 318 #endif /* SYSCFG_CFGR1_I2C_PB9_FMP */
Kojto 93:e188a91d3eaa 319
Kojto 93:e188a91d3eaa 320 #if defined(SYSCFG_CFGR1_I2C1_FMP) && defined(SYSCFG_CFGR1_I2C2_FMP) && defined(SYSCFG_CFGR1_I2C3_FMP)
Kojto 93:e188a91d3eaa 321 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) ((((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C1) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
Kojto 93:e188a91d3eaa 322 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C2) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
Kojto 93:e188a91d3eaa 323 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C3) == HAL_SYSCFG_FASTMODEPLUS_I2C3) || \
Kojto 93:e188a91d3eaa 324 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 325 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 326 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 327 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB9) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 328 #elif defined(SYSCFG_CFGR1_I2C1_FMP) && defined(SYSCFG_CFGR1_I2C2_FMP)
Kojto 93:e188a91d3eaa 329 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) ((((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C1) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
Kojto 93:e188a91d3eaa 330 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C2) == HAL_SYSCFG_FASTMODEPLUS_I2C2) || \
Kojto 93:e188a91d3eaa 331 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 332 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 333 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 334 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB9) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 335 #elif defined(SYSCFG_CFGR1_I2C1_FMP)
Kojto 93:e188a91d3eaa 336 #define IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG(CONFIG) ((((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C1) == HAL_SYSCFG_FASTMODEPLUS_I2C1) || \
Kojto 93:e188a91d3eaa 337 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB6) || \
Kojto 93:e188a91d3eaa 338 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB7) || \
Kojto 93:e188a91d3eaa 339 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB8) || \
Kojto 93:e188a91d3eaa 340 (((CONFIG) & HAL_SYSCFG_FASTMODEPLUS_I2C_PB9) == HAL_SYSCFG_FASTMODEPLUS_I2C_PB9))
Kojto 93:e188a91d3eaa 341 #endif /* SYSCFG_CFGR1_I2C1_FMP && SYSCFG_CFGR1_I2C2_FMP && SYSCFG_CFGR3_I2C1_FMP */
Kojto 93:e188a91d3eaa 342 /**
Kojto 93:e188a91d3eaa 343 * @}
Kojto 93:e188a91d3eaa 344 */
Kojto 93:e188a91d3eaa 345
Kojto 93:e188a91d3eaa 346 #if defined(SYSCFG_RCR_PAGE0)
Kojto 93:e188a91d3eaa 347 /* CCM-SRAM defined */
Kojto 93:e188a91d3eaa 348 /** @defgroup HAL_Page_Write_Protection CCM RAM page write protection
Kojto 93:e188a91d3eaa 349 * @{
Kojto 93:e188a91d3eaa 350 */
Kojto 93:e188a91d3eaa 351 #define HAL_SYSCFG_WP_PAGE0 (SYSCFG_RCR_PAGE0) /*!< ICODE SRAM Write protection page 0 */
Kojto 93:e188a91d3eaa 352 #define HAL_SYSCFG_WP_PAGE1 (SYSCFG_RCR_PAGE1) /*!< ICODE SRAM Write protection page 1 */
Kojto 93:e188a91d3eaa 353 #define HAL_SYSCFG_WP_PAGE2 (SYSCFG_RCR_PAGE2) /*!< ICODE SRAM Write protection page 2 */
Kojto 93:e188a91d3eaa 354 #define HAL_SYSCFG_WP_PAGE3 (SYSCFG_RCR_PAGE3) /*!< ICODE SRAM Write protection page 3 */
Kojto 93:e188a91d3eaa 355 #if defined(SYSCFG_RCR_PAGE4)
Kojto 93:e188a91d3eaa 356 /* More than 4KB CCM-SRAM defined */
Kojto 93:e188a91d3eaa 357 #define HAL_SYSCFG_WP_PAGE4 (SYSCFG_RCR_PAGE4) /*!< ICODE SRAM Write protection page 4 */
Kojto 93:e188a91d3eaa 358 #define HAL_SYSCFG_WP_PAGE5 (SYSCFG_RCR_PAGE5) /*!< ICODE SRAM Write protection page 5 */
Kojto 93:e188a91d3eaa 359 #define HAL_SYSCFG_WP_PAGE6 (SYSCFG_RCR_PAGE6) /*!< ICODE SRAM Write protection page 6 */
Kojto 93:e188a91d3eaa 360 #define HAL_SYSCFG_WP_PAGE7 (SYSCFG_RCR_PAGE7) /*!< ICODE SRAM Write protection page 7 */
Kojto 93:e188a91d3eaa 361 #endif /* SYSCFG_RCR_PAGE4 */
Kojto 93:e188a91d3eaa 362 #if defined(SYSCFG_RCR_PAGE8)
Kojto 93:e188a91d3eaa 363 #define HAL_SYSCFG_WP_PAGE8 (SYSCFG_RCR_PAGE8) /*!< ICODE SRAM Write protection page 8 */
Kojto 93:e188a91d3eaa 364 #define HAL_SYSCFG_WP_PAGE9 (SYSCFG_RCR_PAGE9) /*!< ICODE SRAM Write protection page 9 */
Kojto 93:e188a91d3eaa 365 #define HAL_SYSCFG_WP_PAGE10 (SYSCFG_RCR_PAGE10) /*!< ICODE SRAM Write protection page 10 */
Kojto 93:e188a91d3eaa 366 #define HAL_SYSCFG_WP_PAGE11 (SYSCFG_RCR_PAGE11) /*!< ICODE SRAM Write protection page 11 */
Kojto 93:e188a91d3eaa 367 #define HAL_SYSCFG_WP_PAGE12 (SYSCFG_RCR_PAGE12) /*!< ICODE SRAM Write protection page 12 */
Kojto 93:e188a91d3eaa 368 #define HAL_SYSCFG_WP_PAGE13 (SYSCFG_RCR_PAGE13) /*!< ICODE SRAM Write protection page 13 */
Kojto 93:e188a91d3eaa 369 #define HAL_SYSCFG_WP_PAGE14 (SYSCFG_RCR_PAGE14) /*!< ICODE SRAM Write protection page 14 */
Kojto 93:e188a91d3eaa 370 #define HAL_SYSCFG_WP_PAGE15 (SYSCFG_RCR_PAGE15) /*!< ICODE SRAM Write protection page 15 */
Kojto 93:e188a91d3eaa 371 #endif /* SYSCFG_RCR_PAGE8 */
Kojto 93:e188a91d3eaa 372
Kojto 93:e188a91d3eaa 373 #if defined(SYSCFG_RCR_PAGE8)
Kojto 93:e188a91d3eaa 374 #define IS_HAL_SYSCFG_WP_PAGE(__PAGE__) (((__PAGE__) > 0) && ((__PAGE__) <= (uint32_t)0xFFFF))
Kojto 93:e188a91d3eaa 375 #elif defined(SYSCFG_RCR_PAGE4)
Kojto 93:e188a91d3eaa 376 #define IS_HAL_SYSCFG_WP_PAGE(__PAGE__) (((__PAGE__) > 0) && ((__PAGE__) <= (uint32_t)0x00FF))
Kojto 93:e188a91d3eaa 377 #else
Kojto 93:e188a91d3eaa 378 #define IS_HAL_SYSCFG_WP_PAGE(__PAGE__) (((__PAGE__) > 0) && ((__PAGE__) <= (uint32_t)0x000F))
Kojto 93:e188a91d3eaa 379 #endif /* SYSCFG_RCR_PAGE8 */
Kojto 93:e188a91d3eaa 380 /**
Kojto 93:e188a91d3eaa 381 * @}
Kojto 93:e188a91d3eaa 382 */
Kojto 93:e188a91d3eaa 383 #endif /* SYSCFG_RCR_PAGE0 */
Kojto 93:e188a91d3eaa 384
Kojto 93:e188a91d3eaa 385 /** @defgroup HAL_SYSCFG_Interrupts SYSCFG Interrupts
Kojto 93:e188a91d3eaa 386 * @{
Kojto 93:e188a91d3eaa 387 */
Kojto 93:e188a91d3eaa 388 #define HAL_SYSCFG_IT_FPU_IOC (SYSCFG_CFGR1_FPU_IE_0) /*!< Floating Point Unit Invalid operation Interrupt */
Kojto 93:e188a91d3eaa 389 #define HAL_SYSCFG_IT_FPU_DZC (SYSCFG_CFGR1_FPU_IE_1) /*!< Floating Point Unit Divide-by-zero Interrupt */
Kojto 93:e188a91d3eaa 390 #define HAL_SYSCFG_IT_FPU_UFC (SYSCFG_CFGR1_FPU_IE_2) /*!< Floating Point Unit Underflow Interrupt */
Kojto 93:e188a91d3eaa 391 #define HAL_SYSCFG_IT_FPU_OFC (SYSCFG_CFGR1_FPU_IE_3) /*!< Floating Point Unit Overflow Interrupt */
Kojto 93:e188a91d3eaa 392 #define HAL_SYSCFG_IT_FPU_IDC (SYSCFG_CFGR1_FPU_IE_4) /*!< Floating Point Unit Input denormal Interrupt */
Kojto 93:e188a91d3eaa 393 #define HAL_SYSCFG_IT_FPU_IXC (SYSCFG_CFGR1_FPU_IE_5) /*!< Floating Point Unit Inexact Interrupt */
Kojto 93:e188a91d3eaa 394
Kojto 93:e188a91d3eaa 395 #define IS_HAL_SYSCFG_INTERRUPT(__INTERRUPT__) ((((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_0) == SYSCFG_CFGR1_FPU_IE_0) || \
Kojto 93:e188a91d3eaa 396 (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_1) == SYSCFG_CFGR1_FPU_IE_1) || \
Kojto 93:e188a91d3eaa 397 (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_2) == SYSCFG_CFGR1_FPU_IE_2) || \
Kojto 93:e188a91d3eaa 398 (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_3) == SYSCFG_CFGR1_FPU_IE_3) || \
Kojto 93:e188a91d3eaa 399 (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_4) == SYSCFG_CFGR1_FPU_IE_4) || \
Kojto 93:e188a91d3eaa 400 (((__INTERRUPT__) & SYSCFG_CFGR1_FPU_IE_5) == SYSCFG_CFGR1_FPU_IE_5))
Kojto 93:e188a91d3eaa 401
Kojto 93:e188a91d3eaa 402 /**
Kojto 93:e188a91d3eaa 403 * @}
Kojto 93:e188a91d3eaa 404 */
Kojto 93:e188a91d3eaa 405
Kojto 93:e188a91d3eaa 406 /**
Kojto 93:e188a91d3eaa 407 * @}
Kojto 93:e188a91d3eaa 408 */
Kojto 93:e188a91d3eaa 409
Kojto 93:e188a91d3eaa 410 /* Exported macro ------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 411 /** @defgroup HAL_Exported_Macros HAL Exported Macros
Kojto 93:e188a91d3eaa 412 * @{
Kojto 93:e188a91d3eaa 413 */
Kojto 93:e188a91d3eaa 414
Kojto 93:e188a91d3eaa 415 /** @defgroup Debug_MCU_APB1_Freeze Freeze/Unfreeze APB1 Peripherals in Debug mode
Kojto 93:e188a91d3eaa 416 * @{
Kojto 93:e188a91d3eaa 417 */
Kojto 93:e188a91d3eaa 418 #if defined(DBGMCU_APB1_FZ_DBG_TIM2_STOP)
Kojto 93:e188a91d3eaa 419 #define __HAL_FREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM2_STOP))
Kojto 93:e188a91d3eaa 420 #define __HAL_UNFREEZE_TIM2_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM2_STOP))
Kojto 93:e188a91d3eaa 421 #endif /* DBGMCU_APB1_FZ_DBG_TIM2_STOP */
Kojto 93:e188a91d3eaa 422
Kojto 93:e188a91d3eaa 423 #if defined(DBGMCU_APB1_FZ_DBG_TIM3_STOP)
Kojto 93:e188a91d3eaa 424 #define __HAL_FREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM3_STOP))
Kojto 93:e188a91d3eaa 425 #define __HAL_UNFREEZE_TIM3_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM3_STOP))
Kojto 93:e188a91d3eaa 426 #endif /* DBGMCU_APB1_FZ_DBG_TIM3_STOP */
Kojto 93:e188a91d3eaa 427
Kojto 93:e188a91d3eaa 428 #if defined(DBGMCU_APB1_FZ_DBG_TIM4_STOP)
Kojto 93:e188a91d3eaa 429 #define __HAL_FREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM4_STOP))
Kojto 93:e188a91d3eaa 430 #define __HAL_UNFREEZE_TIM4_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM4_STOP))
Kojto 93:e188a91d3eaa 431 #endif /* DBGMCU_APB1_FZ_DBG_TIM4_STOP */
Kojto 93:e188a91d3eaa 432
Kojto 93:e188a91d3eaa 433 #if defined(DBGMCU_APB1_FZ_DBG_TIM5_STOP)
Kojto 93:e188a91d3eaa 434 #define __HAL_FREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM5_STOP))
Kojto 93:e188a91d3eaa 435 #define __HAL_UNFREEZE_TIM5_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM5_STOP))
Kojto 93:e188a91d3eaa 436 #endif /* DBGMCU_APB1_FZ_DBG_TIM5_STOP */
Kojto 93:e188a91d3eaa 437
Kojto 93:e188a91d3eaa 438 #if defined(DBGMCU_APB1_FZ_DBG_TIM6_STOP)
Kojto 93:e188a91d3eaa 439 #define __HAL_FREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM6_STOP))
Kojto 93:e188a91d3eaa 440 #define __HAL_UNFREEZE_TIM6_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM6_STOP))
Kojto 93:e188a91d3eaa 441 #endif /* DBGMCU_APB1_FZ_DBG_TIM6_STOP */
Kojto 93:e188a91d3eaa 442
Kojto 93:e188a91d3eaa 443 #if defined(DBGMCU_APB1_FZ_DBG_TIM7_STOP)
Kojto 93:e188a91d3eaa 444 #define __HAL_FREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM7_STOP))
Kojto 93:e188a91d3eaa 445 #define __HAL_UNFREEZE_TIM7_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM7_STOP))
Kojto 93:e188a91d3eaa 446 #endif /* DBGMCU_APB1_FZ_DBG_TIM7_STOP */
Kojto 93:e188a91d3eaa 447
Kojto 93:e188a91d3eaa 448 #if defined(DBGMCU_APB1_FZ_DBG_TIM12_STOP)
Kojto 93:e188a91d3eaa 449 #define __HAL_FREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM12_STOP))
Kojto 93:e188a91d3eaa 450 #define __HAL_UNFREEZE_TIM12_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM12_STOP))
Kojto 93:e188a91d3eaa 451 #endif /* DBGMCU_APB1_FZ_DBG_TIM12_STOP */
Kojto 93:e188a91d3eaa 452
Kojto 93:e188a91d3eaa 453 #if defined(DBGMCU_APB1_FZ_DBG_TIM13_STOP)
Kojto 93:e188a91d3eaa 454 #define __HAL_FREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM13_STOP))
Kojto 93:e188a91d3eaa 455 #define __HAL_UNFREEZE_TIM13_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM13_STOP))
Kojto 93:e188a91d3eaa 456 #endif /* DBGMCU_APB1_FZ_DBG_TIM13_STOP */
Kojto 93:e188a91d3eaa 457
Kojto 93:e188a91d3eaa 458 #if defined(DBGMCU_APB1_FZ_DBG_TIM14_STOP)
Kojto 93:e188a91d3eaa 459 #define __HAL_FREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM14_STOP))
Kojto 93:e188a91d3eaa 460 #define __HAL_UNFREEZE_TIM14_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM14_STOP))
Kojto 93:e188a91d3eaa 461 #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
Kojto 93:e188a91d3eaa 462
Kojto 93:e188a91d3eaa 463 #if defined(DBGMCU_APB1_FZ_DBG_TIM18_STOP)
Kojto 93:e188a91d3eaa 464 #define __HAL_FREEZE_TIM18_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_TIM18_STOP))
Kojto 93:e188a91d3eaa 465 #define __HAL_UNFREEZE_TIM18_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_TIM18_STOP))
Kojto 93:e188a91d3eaa 466 #endif /* DBGMCU_APB1_FZ_DBG_TIM14_STOP */
Kojto 93:e188a91d3eaa 467
Kojto 93:e188a91d3eaa 468 #if defined(DBGMCU_APB1_FZ_DBG_RTC_STOP)
Kojto 93:e188a91d3eaa 469 #define __HAL_FREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_RTC_STOP))
Kojto 93:e188a91d3eaa 470 #define __HAL_UNFREEZE_RTC_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_RTC_STOP))
Kojto 93:e188a91d3eaa 471 #endif /* DBGMCU_APB1_FZ_DBG_RTC_STOP */
Kojto 93:e188a91d3eaa 472
Kojto 93:e188a91d3eaa 473 #if defined(DBGMCU_APB1_FZ_DBG_WWDG_STOP)
Kojto 93:e188a91d3eaa 474 #define __HAL_FREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_WWDG_STOP))
Kojto 93:e188a91d3eaa 475 #define __HAL_UNFREEZE_WWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_WWDG_STOP))
Kojto 93:e188a91d3eaa 476 #endif /* DBGMCU_APB1_FZ_DBG_WWDG_STOP */
Kojto 93:e188a91d3eaa 477
Kojto 93:e188a91d3eaa 478 #if defined(DBGMCU_APB1_FZ_DBG_IWDG_STOP)
Kojto 93:e188a91d3eaa 479 #define __HAL_FREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_IWDG_STOP))
Kojto 93:e188a91d3eaa 480 #define __HAL_UNFREEZE_IWDG_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_IWDG_STOP))
Kojto 93:e188a91d3eaa 481 #endif /* DBGMCU_APB1_FZ_DBG_IWDG_STOP */
Kojto 93:e188a91d3eaa 482
Kojto 93:e188a91d3eaa 483 #if defined(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT)
Kojto 93:e188a91d3eaa 484 #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 485 #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 486 #endif /* DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT */
Kojto 93:e188a91d3eaa 487
Kojto 93:e188a91d3eaa 488 #if defined(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT)
Kojto 93:e188a91d3eaa 489 #define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 490 #define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 491 #endif /* DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT */
Kojto 93:e188a91d3eaa 492
Kojto 93:e188a91d3eaa 493 #if defined(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT)
Kojto 93:e188a91d3eaa 494 #define __HAL_FREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 495 #define __HAL_UNFREEZE_I2C3_TIMEOUT_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT))
Kojto 93:e188a91d3eaa 496 #endif /* DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT */
Kojto 93:e188a91d3eaa 497
Kojto 93:e188a91d3eaa 498 #if defined(DBGMCU_APB1_FZ_DBG_CAN_STOP)
Kojto 93:e188a91d3eaa 499 #define __HAL_FREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ |= (DBGMCU_APB1_FZ_DBG_CAN_STOP))
Kojto 93:e188a91d3eaa 500 #define __HAL_UNFREEZE_CAN_DBGMCU() (DBGMCU->APB1FZ &= ~(DBGMCU_APB1_FZ_DBG_CAN_STOP))
Kojto 93:e188a91d3eaa 501 #endif /* DBGMCU_APB1_FZ_DBG_CAN_STOP */
Kojto 93:e188a91d3eaa 502 /**
Kojto 93:e188a91d3eaa 503 * @}
Kojto 93:e188a91d3eaa 504 */
Kojto 93:e188a91d3eaa 505
Kojto 93:e188a91d3eaa 506 /** @defgroup Debug_MCU_APB2_Freeze Freeze/Unfreeze APB2 Peripherals in Debug mode
Kojto 93:e188a91d3eaa 507 * @{
Kojto 93:e188a91d3eaa 508 */
Kojto 93:e188a91d3eaa 509 #if defined(DBGMCU_APB2_FZ_DBG_TIM1_STOP)
Kojto 93:e188a91d3eaa 510 #define __HAL_FREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM1_STOP))
Kojto 93:e188a91d3eaa 511 #define __HAL_UNFREEZE_TIM1_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM1_STOP))
Kojto 93:e188a91d3eaa 512 #endif /* DBGMCU_APB2_FZ_DBG_TIM1_STOP */
Kojto 93:e188a91d3eaa 513
Kojto 93:e188a91d3eaa 514 #if defined(DBGMCU_APB2_FZ_DBG_TIM8_STOP)
Kojto 93:e188a91d3eaa 515 #define __HAL_FREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM8_STOP))
Kojto 93:e188a91d3eaa 516 #define __HAL_UNFREEZE_TIM8_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM8_STOP))
Kojto 93:e188a91d3eaa 517 #endif /* DBGMCU_APB2_FZ_DBG_TIM8_STOP */
Kojto 93:e188a91d3eaa 518
Kojto 93:e188a91d3eaa 519 #if defined(DBGMCU_APB2_FZ_DBG_TIM15_STOP)
Kojto 93:e188a91d3eaa 520 #define __HAL_FREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM15_STOP))
Kojto 93:e188a91d3eaa 521 #define __HAL_UNFREEZE_TIM15_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM15_STOP))
Kojto 93:e188a91d3eaa 522 #endif /* DBGMCU_APB2_FZ_DBG_TIM15_STOP */
Kojto 93:e188a91d3eaa 523
Kojto 93:e188a91d3eaa 524 #if defined(DBGMCU_APB2_FZ_DBG_TIM16_STOP)
Kojto 93:e188a91d3eaa 525 #define __HAL_FREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM16_STOP))
Kojto 93:e188a91d3eaa 526 #define __HAL_UNFREEZE_TIM16_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM16_STOP))
Kojto 93:e188a91d3eaa 527 #endif /* DBGMCU_APB2_FZ_DBG_TIM16_STOP */
Kojto 93:e188a91d3eaa 528
Kojto 93:e188a91d3eaa 529 #if defined(DBGMCU_APB2_FZ_DBG_TIM17_STOP)
Kojto 93:e188a91d3eaa 530 #define __HAL_FREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM17_STOP))
Kojto 93:e188a91d3eaa 531 #define __HAL_UNFREEZE_TIM17_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM17_STOP))
Kojto 93:e188a91d3eaa 532 #endif /* DBGMCU_APB2_FZ_DBG_TIM17_STOP */
Kojto 93:e188a91d3eaa 533
Kojto 93:e188a91d3eaa 534 #if defined(DBGMCU_APB2_FZ_DBG_TIM19_STOP)
Kojto 93:e188a91d3eaa 535 #define __HAL_FREEZE_TIM19_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM19_STOP))
Kojto 93:e188a91d3eaa 536 #define __HAL_UNFREEZE_TIM19_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM19_STOP))
Kojto 93:e188a91d3eaa 537 #endif /* DBGMCU_APB2_FZ_DBG_TIM19_STOP */
Kojto 93:e188a91d3eaa 538
Kojto 93:e188a91d3eaa 539 #if defined(DBGMCU_APB2_FZ_DBG_TIM20_STOP)
Kojto 93:e188a91d3eaa 540 #define __HAL_FREEZE_TIM20_DBGMCU() (DBGMCU->APB2FZ |= (DBGMCU_APB2_FZ_DBG_TIM19_STOP))
Kojto 93:e188a91d3eaa 541 #define __HAL_UNFREEZE_TIM20_DBGMCU() (DBGMCU->APB2FZ &= ~(DBGMCU_APB2_FZ_DBG_TIM19_STOP))
Kojto 93:e188a91d3eaa 542 #endif /* DBGMCU_APB2_FZ_DBG_TIM20_STOP */
Kojto 93:e188a91d3eaa 543 /**
Kojto 93:e188a91d3eaa 544 * @}
Kojto 93:e188a91d3eaa 545 */
Kojto 93:e188a91d3eaa 546
Kojto 93:e188a91d3eaa 547 /** @defgroup Memory_Mapping_Selection Memory Mapping Selection
Kojto 93:e188a91d3eaa 548 * @{
Kojto 93:e188a91d3eaa 549 */
Kojto 93:e188a91d3eaa 550 #if defined(SYSCFG_CFGR1_MEM_MODE)
Kojto 93:e188a91d3eaa 551 /** @brief Main Flash memory mapped at 0x00000000
Kojto 93:e188a91d3eaa 552 */
Kojto 93:e188a91d3eaa 553 #define __HAL_REMAPMEMORY_FLASH() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE))
Kojto 93:e188a91d3eaa 554 #endif /* SYSCFG_CFGR1_MEM_MODE */
Kojto 93:e188a91d3eaa 555
Kojto 93:e188a91d3eaa 556 #if defined(SYSCFG_CFGR1_MEM_MODE_0)
Kojto 93:e188a91d3eaa 557 /** @brief System Flash memory mapped at 0x00000000
Kojto 93:e188a91d3eaa 558 */
Kojto 93:e188a91d3eaa 559 #define __HAL_REMAPMEMORY_SYSTEMFLASH() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
Kojto 93:e188a91d3eaa 560 SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE_0; \
Kojto 93:e188a91d3eaa 561 }while(0)
Kojto 93:e188a91d3eaa 562 #endif /* SYSCFG_CFGR1_MEM_MODE_0 */
Kojto 93:e188a91d3eaa 563
Kojto 93:e188a91d3eaa 564 #if defined(SYSCFG_CFGR1_MEM_MODE_0) && defined(SYSCFG_CFGR1_MEM_MODE_1)
Kojto 93:e188a91d3eaa 565 /** @brief Embedded SRAM mapped at 0x00000000
Kojto 93:e188a91d3eaa 566 */
Kojto 93:e188a91d3eaa 567 #define __HAL_REMAPMEMORY_SRAM() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
Kojto 93:e188a91d3eaa 568 SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_0 | SYSCFG_CFGR1_MEM_MODE_1); \
Kojto 93:e188a91d3eaa 569 }while(0)
Kojto 93:e188a91d3eaa 570 #endif /* SYSCFG_CFGR1_MEM_MODE_0 && SYSCFG_CFGR1_MEM_MODE_1 */
Kojto 93:e188a91d3eaa 571
Kojto 93:e188a91d3eaa 572 #if defined(SYSCFG_CFGR1_MEM_MODE_2)
Kojto 93:e188a91d3eaa 573 #define __HAL_FMC_BANK() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_MEM_MODE); \
Kojto 93:e188a91d3eaa 574 SYSCFG->CFGR1 |= (SYSCFG_CFGR1_MEM_MODE_2); \
Kojto 93:e188a91d3eaa 575 }while(0)
Kojto 93:e188a91d3eaa 576 #endif /* SYSCFG_CFGR1_MEM_MODE_2 */
Kojto 93:e188a91d3eaa 577 /**
Kojto 93:e188a91d3eaa 578 * @}
Kojto 93:e188a91d3eaa 579 */
Kojto 93:e188a91d3eaa 580
Kojto 93:e188a91d3eaa 581 /** @defgroup Encoder_Mode Encoder Mode
Kojto 93:e188a91d3eaa 582 * @{
Kojto 93:e188a91d3eaa 583 */
Kojto 93:e188a91d3eaa 584 #if defined(SYSCFG_CFGR1_ENCODER_MODE)
Kojto 93:e188a91d3eaa 585 /** @brief No Encoder mode
Kojto 93:e188a91d3eaa 586 */
Kojto 93:e188a91d3eaa 587 #define __HAL_REMAPENCODER_NONE() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE))
Kojto 93:e188a91d3eaa 588 #endif /* SYSCFG_CFGR1_ENCODER_MODE */
Kojto 93:e188a91d3eaa 589
Kojto 93:e188a91d3eaa 590 #if defined(SYSCFG_CFGR1_ENCODER_MODE_0)
Kojto 93:e188a91d3eaa 591 /** @brief Encoder mode : TIM2 IC1 and TIM2 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively
Kojto 93:e188a91d3eaa 592 */
Kojto 93:e188a91d3eaa 593 #define __HAL_REMAPENCODER_TIM2() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE); \
Kojto 93:e188a91d3eaa 594 SYSCFG->CFGR1 |= SYSCFG_CFGR1_ENCODER_MODE_0; \
Kojto 93:e188a91d3eaa 595 }while(0)
Kojto 93:e188a91d3eaa 596 #endif /* SYSCFG_CFGR1_ENCODER_MODE_0 */
Kojto 93:e188a91d3eaa 597
Kojto 93:e188a91d3eaa 598 #if defined(SYSCFG_CFGR1_ENCODER_MODE_1)
Kojto 93:e188a91d3eaa 599 /** @brief Encoder mode : TIM3 IC1 and TIM3 IC2 are connected to TIM15 IC1 and TIM15 IC2 respectively
Kojto 93:e188a91d3eaa 600 */
Kojto 93:e188a91d3eaa 601 #define __HAL_REMAPENCODER_TIM3() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE); \
Kojto 93:e188a91d3eaa 602 SYSCFG->CFGR1 |= SYSCFG_CFGR1_ENCODER_MODE_1; \
Kojto 93:e188a91d3eaa 603 }while(0)
Kojto 93:e188a91d3eaa 604 #endif /* SYSCFG_CFGR1_ENCODER_MODE_1 */
Kojto 93:e188a91d3eaa 605
Kojto 93:e188a91d3eaa 606 #if defined(SYSCFG_CFGR1_ENCODER_MODE_0) && defined(SYSCFG_CFGR1_ENCODER_MODE_1)
Kojto 93:e188a91d3eaa 607 /** @brief Encoder mode : TIM4 IC1 and TIM4 IC2 are connected to TIM15 IC1 and TIM15 IC2 (STM32F303xB/C and STM32F358xx devices)
Kojto 93:e188a91d3eaa 608 */
Kojto 93:e188a91d3eaa 609 #define __HAL_REMAPENCODER_TIM4() do {SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_ENCODER_MODE); \
Kojto 93:e188a91d3eaa 610 SYSCFG->CFGR1 |= (SYSCFG_CFGR1_ENCODER_MODE_0 | SYSCFG_CFGR1_ENCODER_MODE_1); \
Kojto 93:e188a91d3eaa 611 }while(0)
Kojto 93:e188a91d3eaa 612 #endif /* SYSCFG_CFGR1_ENCODER_MODE_0 && SYSCFG_CFGR1_ENCODER_MODE_1 */
Kojto 93:e188a91d3eaa 613 /**
Kojto 93:e188a91d3eaa 614 * @}
Kojto 93:e188a91d3eaa 615 */
Kojto 93:e188a91d3eaa 616
Kojto 93:e188a91d3eaa 617 /** @defgroup DMA_Remap_Enable DMA Remap Enable
Kojto 93:e188a91d3eaa 618 * @{
Kojto 93:e188a91d3eaa 619 */
Kojto 93:e188a91d3eaa 620 #if defined(SYSCFG_CFGR3_DMA_RMP) && defined(SYSCFG_CFGR1_DMA_RMP)
Kojto 93:e188a91d3eaa 621 /** @brief DMA remapping enable/disable macros
Kojto 93:e188a91d3eaa 622 * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_Remapping
Kojto 93:e188a91d3eaa 623 */
Kojto 93:e188a91d3eaa 624 #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 625 (((__DMA_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \
Kojto 93:e188a91d3eaa 626 (SYSCFG->CFGR3 |= ((__DMA_REMAP__) & ~HAL_REMAP_CFGR3_MASK)) : \
Kojto 93:e188a91d3eaa 627 (SYSCFG->CFGR1 |= (__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 628 }while(0)
Kojto 93:e188a91d3eaa 629 #define __HAL_REMAPDMA_CHANNEL_DISABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 630 (((__DMA_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \
Kojto 93:e188a91d3eaa 631 (SYSCFG->CFGR3 &= (~(__DMA_REMAP__) | HAL_REMAP_CFGR3_MASK)) : \
Kojto 93:e188a91d3eaa 632 (SYSCFG->CFGR1 &= ~(__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 633 }while(0)
Kojto 93:e188a91d3eaa 634 #elif defined(SYSCFG_CFGR1_DMA_RMP)
Kojto 93:e188a91d3eaa 635 /** @brief DMA remapping enable/disable macros
Kojto 93:e188a91d3eaa 636 * @param __DMA_REMAP__: This parameter can be a value of @ref HAL_DMA_Remapping
Kojto 93:e188a91d3eaa 637 */
Kojto 93:e188a91d3eaa 638 #define __HAL_REMAPDMA_CHANNEL_ENABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 639 SYSCFG->CFGR1 |= (__DMA_REMAP__); \
Kojto 93:e188a91d3eaa 640 }while(0)
Kojto 93:e188a91d3eaa 641 #define __HAL_REMAPDMA_CHANNEL_DISABLE(__DMA_REMAP__) do {assert_param(IS_HAL_REMAPDMA((__DMA_REMAP__))); \
Kojto 93:e188a91d3eaa 642 SYSCFG->CFGR1 &= ~(__DMA_REMAP__); \
Kojto 93:e188a91d3eaa 643 }while(0)
Kojto 93:e188a91d3eaa 644 #endif /* SYSCFG_CFGR3_DMA_RMP || SYSCFG_CFGR1_DMA_RMP */
Kojto 93:e188a91d3eaa 645 /**
Kojto 93:e188a91d3eaa 646 * @}
Kojto 93:e188a91d3eaa 647 */
Kojto 93:e188a91d3eaa 648
Kojto 93:e188a91d3eaa 649 /** @defgroup I2C2_Fast_Mode_Plus_Enable I2C2 Fast Mode Plus Enable
Kojto 93:e188a91d3eaa 650 * @{
Kojto 93:e188a91d3eaa 651 */
Kojto 93:e188a91d3eaa 652 /** @brief Fast mode Plus driving capability enable/disable macros
Kojto 93:e188a91d3eaa 653 * @param __FASTMODEPLUS__: This parameter can be a value of @ref HAL_FastModePlus_I2C
Kojto 93:e188a91d3eaa 654 */
Kojto 93:e188a91d3eaa 655 #define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
Kojto 93:e188a91d3eaa 656 SYSCFG->CFGR1 |= (__FASTMODEPLUS__); \
Kojto 93:e188a91d3eaa 657 }while(0)
Kojto 93:e188a91d3eaa 658
Kojto 93:e188a91d3eaa 659 #define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_HAL_SYSCFG_FASTMODEPLUS_CONFIG((__FASTMODEPLUS__))); \
Kojto 93:e188a91d3eaa 660 SYSCFG->CFGR1 &= ~(__FASTMODEPLUS__); \
Kojto 93:e188a91d3eaa 661 }while(0)
Kojto 93:e188a91d3eaa 662 /**
Kojto 93:e188a91d3eaa 663 * @}
Kojto 93:e188a91d3eaa 664 */
Kojto 93:e188a91d3eaa 665
Kojto 93:e188a91d3eaa 666 /** @defgroup Floating_Point_Unit_Interrupts_Enable Floating Point Unit Interrupts Enable
Kojto 93:e188a91d3eaa 667 * @{
Kojto 93:e188a91d3eaa 668 */
Kojto 93:e188a91d3eaa 669 /** @brief SYSCFG interrupt enable/disable macros
Kojto 93:e188a91d3eaa 670 * @param __INTERRUPT__: This parameter can be a value of @ref HAL_SYSCFG_Interrupts
Kojto 93:e188a91d3eaa 671 */
Kojto 93:e188a91d3eaa 672 #define __HAL_SYSCFG_INTERRUPT_ENABLE(__INTERRUPT__) do {assert_param(IS_HAL_SYSCFG_INTERRUPT((__INTERRUPT__))); \
Kojto 93:e188a91d3eaa 673 SYSCFG->CFGR1 |= (__INTERRUPT__); \
Kojto 93:e188a91d3eaa 674 }while(0)
Kojto 93:e188a91d3eaa 675
Kojto 93:e188a91d3eaa 676 #define __HAL_SYSCFG_INTERRUPT_DISABLE(__INTERRUPT__) do {assert_param(IS_HAL_SYSCFG_INTERRUPT((__INTERRUPT__))); \
Kojto 93:e188a91d3eaa 677 SYSCFG->CFGR1 &= ~(__INTERRUPT__); \
Kojto 93:e188a91d3eaa 678 }while(0)
Kojto 93:e188a91d3eaa 679 /**
Kojto 93:e188a91d3eaa 680 * @}
Kojto 93:e188a91d3eaa 681 */
Kojto 93:e188a91d3eaa 682
Kojto 93:e188a91d3eaa 683 #if defined(SYSCFG_CFGR1_USB_IT_RMP)
Kojto 93:e188a91d3eaa 684 /** @defgroup USB_Interrupt_Remap USB Interrupt Remap
Kojto 93:e188a91d3eaa 685 * @{
Kojto 93:e188a91d3eaa 686 */
Kojto 93:e188a91d3eaa 687 /** @brief USB interrupt remapping enable/disable macros
Kojto 93:e188a91d3eaa 688 */
Kojto 93:e188a91d3eaa 689 #define __HAL_REMAPINTERRUPT_USB_ENABLE() (SYSCFG->CFGR1 |= (SYSCFG_CFGR1_USB_IT_RMP))
Kojto 93:e188a91d3eaa 690 #define __HAL_REMAPINTERRUPT_USB_DISABLE() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_USB_IT_RMP))
Kojto 93:e188a91d3eaa 691 /**
Kojto 93:e188a91d3eaa 692 * @}
Kojto 93:e188a91d3eaa 693 */
Kojto 93:e188a91d3eaa 694 #endif /* SYSCFG_CFGR1_USB_IT_RMP */
Kojto 93:e188a91d3eaa 695
Kojto 93:e188a91d3eaa 696 #if defined(SYSCFG_CFGR1_VBAT)
Kojto 93:e188a91d3eaa 697 /** @defgroup VBAT_Monitoring_Enable VBAT Monitoring Enable
Kojto 93:e188a91d3eaa 698 * @{
Kojto 93:e188a91d3eaa 699 */
Kojto 93:e188a91d3eaa 700 /** @brief SYSCFG interrupt enable/disable macros
Kojto 93:e188a91d3eaa 701 */
Kojto 93:e188a91d3eaa 702 #define __HAL_SYSCFG_VBAT_MONITORING_ENABLE() (SYSCFG->CFGR1 |= (SYSCFG_CFGR1_VBAT))
Kojto 93:e188a91d3eaa 703 #define __HAL_SYSCFG_VBAT_MONITORING_DISABLE() (SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_VBAT))
Kojto 93:e188a91d3eaa 704 /**
Kojto 93:e188a91d3eaa 705 * @}
Kojto 93:e188a91d3eaa 706 */
Kojto 93:e188a91d3eaa 707 #endif /* SYSCFG_CFGR1_VBAT */
Kojto 93:e188a91d3eaa 708
Kojto 93:e188a91d3eaa 709 #if defined(SYSCFG_CFGR2_LOCKUP_LOCK)
Kojto 93:e188a91d3eaa 710 /** @defgroup Cortex_Lockup_Enable Cortex Lockup Enable
Kojto 93:e188a91d3eaa 711 * @{
Kojto 93:e188a91d3eaa 712 */
Kojto 93:e188a91d3eaa 713 /** @brief SYSCFG Break Lockup lock
Kojto 93:e188a91d3eaa 714 * Enables and locks the connection of Cortex-M4 LOCKUP (Hardfault) output to TIM1/15/16/17 Break input
Kojto 93:e188a91d3eaa 715 * @note The selected configuration is locked and can be unlocked by system reset
Kojto 93:e188a91d3eaa 716 */
Kojto 93:e188a91d3eaa 717 #define __HAL_SYSCFG_BREAK_LOCKUP_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_LOCKUP_LOCK); \
Kojto 93:e188a91d3eaa 718 SYSCFG->CFGR2 |= SYSCFG_CFGR2_LOCKUP_LOCK; \
Kojto 93:e188a91d3eaa 719 }while(0)
Kojto 93:e188a91d3eaa 720 /**
Kojto 93:e188a91d3eaa 721 * @}
Kojto 93:e188a91d3eaa 722 */
Kojto 93:e188a91d3eaa 723 #endif /* SYSCFG_CFGR2_LOCKUP_LOCK */
Kojto 93:e188a91d3eaa 724
Kojto 93:e188a91d3eaa 725 #if defined(SYSCFG_CFGR2_PVD_LOCK)
Kojto 93:e188a91d3eaa 726 /** @defgroup PVD_Lock_Enable PVD Lock
Kojto 93:e188a91d3eaa 727 * @{
Kojto 93:e188a91d3eaa 728 */
Kojto 93:e188a91d3eaa 729 /** @brief SYSCFG Break PVD lock
Kojto 93:e188a91d3eaa 730 * 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 731 * @note The selected configuration is locked and can be unlocked by system reset
Kojto 93:e188a91d3eaa 732 */
Kojto 93:e188a91d3eaa 733 #define __HAL_SYSCFG_BREAK_PVD_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_PVD_LOCK); \
Kojto 93:e188a91d3eaa 734 SYSCFG->CFGR2 |= SYSCFG_CFGR2_PVD_LOCK; \
Kojto 93:e188a91d3eaa 735 }while(0)
Kojto 93:e188a91d3eaa 736 /**
Kojto 93:e188a91d3eaa 737 * @}
Kojto 93:e188a91d3eaa 738 */
Kojto 93:e188a91d3eaa 739 #endif /* SYSCFG_CFGR2_PVD_LOCK */
Kojto 93:e188a91d3eaa 740
Kojto 93:e188a91d3eaa 741 #if defined(SYSCFG_CFGR2_SRAM_PARITY_LOCK)
Kojto 93:e188a91d3eaa 742 /** @defgroup SRAM_Parity_Lock SRAM Parity Lock
Kojto 93:e188a91d3eaa 743 * @{
Kojto 93:e188a91d3eaa 744 */
Kojto 93:e188a91d3eaa 745 /** @brief SYSCFG Break SRAM PARITY lock
Kojto 93:e188a91d3eaa 746 * Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1/8/15/16/17
Kojto 93:e188a91d3eaa 747 * @note The selected configuration is locked and can be unlocked by system reset
Kojto 93:e188a91d3eaa 748 */
Kojto 93:e188a91d3eaa 749 #define __HAL_SYSCFG_BREAK_SRAMPARITY_LOCK() do {SYSCFG->CFGR2 &= ~(SYSCFG_CFGR2_SRAM_PARITY_LOCK); \
Kojto 93:e188a91d3eaa 750 SYSCFG->CFGR2 |= SYSCFG_CFGR2_SRAM_PARITY_LOCK; \
Kojto 93:e188a91d3eaa 751 }while(0)
Kojto 93:e188a91d3eaa 752 /**
Kojto 93:e188a91d3eaa 753 * @}
Kojto 93:e188a91d3eaa 754 */
Kojto 93:e188a91d3eaa 755 #endif /* SYSCFG_CFGR2_SRAM_PARITY_LOCK */
Kojto 93:e188a91d3eaa 756
Kojto 93:e188a91d3eaa 757 /** @defgroup Trigger_Remapping_Enable Trigger Remapping Enable
Kojto 93:e188a91d3eaa 758 * @{
Kojto 93:e188a91d3eaa 759 */
Kojto 93:e188a91d3eaa 760 #if defined(SYSCFG_CFGR3_TRIGGER_RMP)
Kojto 93:e188a91d3eaa 761 /** @brief Trigger remapping enable/disable macros
Kojto 93:e188a91d3eaa 762 * @param __TRIGGER_REMAP__: This parameter can be a value of @ref HAL_Trigger_Remapping
Kojto 93:e188a91d3eaa 763 */
Kojto 93:e188a91d3eaa 764 #define __HAL_REMAPTRIGGER_ENABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 765 (((__TRIGGER_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \
Kojto 93:e188a91d3eaa 766 (SYSCFG->CFGR3 |= ((__TRIGGER_REMAP__) & ~HAL_REMAP_CFGR3_MASK)) : \
Kojto 93:e188a91d3eaa 767 (SYSCFG->CFGR1 |= (__TRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 768 }while(0)
Kojto 93:e188a91d3eaa 769 #define __HAL_REMAPTRIGGER_DISABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 770 (((__TRIGGER_REMAP__) & HAL_REMAP_CFGR3_MASK) ? \
Kojto 93:e188a91d3eaa 771 (SYSCFG->CFGR3 &= (~(__TRIGGER_REMAP__) | HAL_REMAP_CFGR3_MASK)) : \
Kojto 93:e188a91d3eaa 772 (SYSCFG->CFGR1 &= ~(__TRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 773 }while(0)
Kojto 93:e188a91d3eaa 774 #else
Kojto 93:e188a91d3eaa 775 /** @brief Trigger remapping enable/disable macros
Kojto 93:e188a91d3eaa 776 * @param __TRIGGER_REMAP__: This parameter can be a value of @ref HAL_Trigger_Remapping
Kojto 93:e188a91d3eaa 777 */
Kojto 93:e188a91d3eaa 778 #define __HAL_REMAPTRIGGER_ENABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 779 (SYSCFG->CFGR1 |= (__TRIGGER_REMAP__)); \
Kojto 93:e188a91d3eaa 780 }while(0)
Kojto 93:e188a91d3eaa 781 #define __HAL_REMAPTRIGGER_DISABLE(__TRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPTRIGGER((__TRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 782 (SYSCFG->CFGR1 &= ~(__TRIGGER_REMAP__)); \
Kojto 93:e188a91d3eaa 783 }while(0)
Kojto 93:e188a91d3eaa 784 #endif /* SYSCFG_CFGR3_TRIGGER_RMP */
Kojto 93:e188a91d3eaa 785 /**
Kojto 93:e188a91d3eaa 786 * @}
Kojto 93:e188a91d3eaa 787 */
Kojto 93:e188a91d3eaa 788
Kojto 93:e188a91d3eaa 789 #if defined (STM32F302xE) || defined (STM32F303xE) || defined (STM32F398xx)
Kojto 93:e188a91d3eaa 790 /** @defgroup ADC_Trigger_Remapping_Enable ADC Trigger Remapping Enable
Kojto 93:e188a91d3eaa 791 * @{
Kojto 93:e188a91d3eaa 792 */
Kojto 93:e188a91d3eaa 793 /** @brief ADC trigger remapping enable/disable macros
Kojto 93:e188a91d3eaa 794 * @param __ADCTRIGGER_REMAP__: This parameter can be a value of @ref HAL_ADC_Trigger_Remapping
Kojto 93:e188a91d3eaa 795 */
Kojto 93:e188a91d3eaa 796 #define __HAL_REMAPADCTRIGGER_ENABLE(__ADCTRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPADCTRIGGER((__ADCTRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 797 (SYSCFG->CFGR4 |= (__ADCTRIGGER_REMAP__)); \
Kojto 93:e188a91d3eaa 798 }while(0)
Kojto 93:e188a91d3eaa 799 #define __HAL_REMAPADCTRIGGER_DISABLE(__ADCTRIGGER_REMAP__) do {assert_param(IS_HAL_REMAPADCTRIGGER((__ADCTRIGGER_REMAP__))); \
Kojto 93:e188a91d3eaa 800 (SYSCFG->CFGR4 &= ~(__ADCTRIGGER_REMAP__)); \
Kojto 93:e188a91d3eaa 801 }while(0)
Kojto 93:e188a91d3eaa 802 /**
Kojto 93:e188a91d3eaa 803 * @}
Kojto 93:e188a91d3eaa 804 */
Kojto 93:e188a91d3eaa 805 #endif /* STM32F302xE || STM32F303xE || STM32F398xx */
Kojto 93:e188a91d3eaa 806
Kojto 93:e188a91d3eaa 807 #if defined(SYSCFG_CFGR2_BYP_ADDR_PAR)
Kojto 93:e188a91d3eaa 808 /** @defgroup RAM_Parity_Check_Disable RAM Parity Check Disable
Kojto 93:e188a91d3eaa 809 * @{
Kojto 93:e188a91d3eaa 810 */
Kojto 93:e188a91d3eaa 811 /**
Kojto 93:e188a91d3eaa 812 * @brief Parity check on RAM disable macro
Kojto 93:e188a91d3eaa 813 * @note Disabling the parity check on RAM locks the configuration bit.
Kojto 93:e188a91d3eaa 814 * To re-enable the parity check on RAM perform a system reset.
Kojto 93:e188a91d3eaa 815 */
Kojto 93:e188a91d3eaa 816 #define __HAL_SYSCFG_RAM_PARITYCHECK_DISABLE() (*(__IO uint32_t *) CFGR2_BYPADDRPAR_BB = (uint32_t)0x00000001)
Kojto 93:e188a91d3eaa 817 /**
Kojto 93:e188a91d3eaa 818 * @}
Kojto 93:e188a91d3eaa 819 */
Kojto 93:e188a91d3eaa 820 #endif /* SYSCFG_CFGR2_BYP_ADDR_PAR */
Kojto 93:e188a91d3eaa 821
Kojto 93:e188a91d3eaa 822 #if defined(SYSCFG_RCR_PAGE0)
Kojto 93:e188a91d3eaa 823 /** @defgroup CCM_RAM_Page_Write_Protection_Enable CCM RAM page write protection enable
Kojto 93:e188a91d3eaa 824 * @{
Kojto 93:e188a91d3eaa 825 */
Kojto 93:e188a91d3eaa 826 /** @brief CCM RAM page write protection enable macro
Kojto 93:e188a91d3eaa 827 * @param __PAGE_WP__: This parameter can be a value of @ref HAL_Page_Write_Protection
Kojto 93:e188a91d3eaa 828 * @note write protection can only be disabled by a system reset
Kojto 93:e188a91d3eaa 829 */
Kojto 93:e188a91d3eaa 830 #define __HAL_SYSCFG_SRAM_WRP_ENABLE(__PAGE_WP__) do {assert_param(IS_HAL_SYSCFG_WP_PAGE((__PAGE_WP__))); \
Kojto 93:e188a91d3eaa 831 SYSCFG->RCR |= (__PAGE_WP__); \
Kojto 93:e188a91d3eaa 832 }while(0)
Kojto 93:e188a91d3eaa 833 /**
Kojto 93:e188a91d3eaa 834 * @}
Kojto 93:e188a91d3eaa 835 */
Kojto 93:e188a91d3eaa 836 #endif /* SYSCFG_RCR_PAGE0 */
Kojto 93:e188a91d3eaa 837
Kojto 93:e188a91d3eaa 838 /**
Kojto 93:e188a91d3eaa 839 * @}
Kojto 93:e188a91d3eaa 840 */
Kojto 93:e188a91d3eaa 841 /* Exported functions --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 842 /** @addtogroup HAL_Exported_Functions HAL Exported Functions
Kojto 93:e188a91d3eaa 843 * @{
Kojto 93:e188a91d3eaa 844 */
Kojto 93:e188a91d3eaa 845
Kojto 93:e188a91d3eaa 846 /** @addtogroup HAL_Exported_Functions_Group1 Initialization and de-initialization Functions
Kojto 93:e188a91d3eaa 847 * @brief Initialization and de-initialization functions
Kojto 93:e188a91d3eaa 848 * @{
Kojto 93:e188a91d3eaa 849 */
Kojto 93:e188a91d3eaa 850 /* Initialization and de-initialization functions ******************************/
Kojto 93:e188a91d3eaa 851 HAL_StatusTypeDef HAL_Init(void);
Kojto 93:e188a91d3eaa 852 HAL_StatusTypeDef HAL_DeInit(void);
Kojto 93:e188a91d3eaa 853 void HAL_MspInit(void);
Kojto 93:e188a91d3eaa 854 void HAL_MspDeInit(void);
Kojto 93:e188a91d3eaa 855 HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
Kojto 93:e188a91d3eaa 856 /**
Kojto 93:e188a91d3eaa 857 * @}
Kojto 93:e188a91d3eaa 858 */
Kojto 93:e188a91d3eaa 859
Kojto 93:e188a91d3eaa 860 /** @addtogroup HAL_Exported_Functions_Group2 HAL Control functions
Kojto 93:e188a91d3eaa 861 * @brief HAL Control functions
Kojto 93:e188a91d3eaa 862 * @{
Kojto 93:e188a91d3eaa 863 */
Kojto 93:e188a91d3eaa 864 /* Peripheral Control functions ************************************************/
Kojto 93:e188a91d3eaa 865 void HAL_IncTick(void);
Kojto 93:e188a91d3eaa 866 void HAL_Delay(__IO uint32_t Delay);
Kojto 93:e188a91d3eaa 867 void HAL_SuspendTick(void);
Kojto 93:e188a91d3eaa 868 void HAL_ResumeTick(void);
Kojto 93:e188a91d3eaa 869 uint32_t HAL_GetTick(void);
Kojto 93:e188a91d3eaa 870 uint32_t HAL_GetHalVersion(void);
Kojto 93:e188a91d3eaa 871 uint32_t HAL_GetREVID(void);
Kojto 93:e188a91d3eaa 872 uint32_t HAL_GetDEVID(void);
Kojto 93:e188a91d3eaa 873 void HAL_EnableDBGSleepMode(void);
Kojto 93:e188a91d3eaa 874 void HAL_DisableDBGSleepMode(void);
Kojto 93:e188a91d3eaa 875 void HAL_EnableDBGStopMode(void);
Kojto 93:e188a91d3eaa 876 void HAL_DisableDBGStopMode(void);
Kojto 93:e188a91d3eaa 877 void HAL_EnableDBGStandbyMode(void);
Kojto 93:e188a91d3eaa 878 void HAL_DisableDBGStandbyMode(void);
Kojto 93:e188a91d3eaa 879 /**
Kojto 93:e188a91d3eaa 880 * @}
Kojto 93:e188a91d3eaa 881 */
Kojto 93:e188a91d3eaa 882
Kojto 93:e188a91d3eaa 883 /**
Kojto 93:e188a91d3eaa 884 * @}
Kojto 93:e188a91d3eaa 885 */
Kojto 93:e188a91d3eaa 886
Kojto 93:e188a91d3eaa 887 /**
Kojto 93:e188a91d3eaa 888 * @}
Kojto 93:e188a91d3eaa 889 */
Kojto 93:e188a91d3eaa 890
Kojto 93:e188a91d3eaa 891 /**
Kojto 93:e188a91d3eaa 892 * @}
Kojto 93:e188a91d3eaa 893 */
Kojto 93:e188a91d3eaa 894
Kojto 93:e188a91d3eaa 895 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 896 }
Kojto 93:e188a91d3eaa 897 #endif
Kojto 93:e188a91d3eaa 898
Kojto 93:e188a91d3eaa 899 #endif /* __STM32F3xx_HAL_H */
Kojto 93:e188a91d3eaa 900
Kojto 93:e188a91d3eaa 901 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/