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
TARGET_MOTE_L152RC/stm32l1xx_hal.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 112:6f327212ef96
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 112:6f327212ef96 | 1 | /** |
Kojto | 112:6f327212ef96 | 2 | ****************************************************************************** |
Kojto | 112:6f327212ef96 | 3 | * @file stm32l1xx_hal.h |
Kojto | 112:6f327212ef96 | 4 | * @author MCD Application Team |
Kojto | 112:6f327212ef96 | 5 | * @version V1.0.0 |
Kojto | 112:6f327212ef96 | 6 | * @date 5-September-2014 |
Kojto | 112:6f327212ef96 | 7 | * @brief This file contains all the functions prototypes for the HAL |
Kojto | 112:6f327212ef96 | 8 | * module driver. |
Kojto | 112:6f327212ef96 | 9 | ****************************************************************************** |
Kojto | 112:6f327212ef96 | 10 | * @attention |
Kojto | 112:6f327212ef96 | 11 | * |
Kojto | 112:6f327212ef96 | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Kojto | 112:6f327212ef96 | 13 | * |
Kojto | 112:6f327212ef96 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 112:6f327212ef96 | 15 | * are permitted provided that the following conditions are met: |
Kojto | 112:6f327212ef96 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 112:6f327212ef96 | 17 | * this list of conditions and the following disclaimer. |
Kojto | 112:6f327212ef96 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 112:6f327212ef96 | 19 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 112:6f327212ef96 | 20 | * and/or other materials provided with the distribution. |
Kojto | 112:6f327212ef96 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 112:6f327212ef96 | 22 | * may be used to endorse or promote products derived from this software |
Kojto | 112:6f327212ef96 | 23 | * without specific prior written permission. |
Kojto | 112:6f327212ef96 | 24 | * |
Kojto | 112:6f327212ef96 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 112:6f327212ef96 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 112:6f327212ef96 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 112:6f327212ef96 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 112:6f327212ef96 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 112:6f327212ef96 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 112:6f327212ef96 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 112:6f327212ef96 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 112:6f327212ef96 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 112:6f327212ef96 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 112:6f327212ef96 | 35 | * |
Kojto | 112:6f327212ef96 | 36 | ****************************************************************************** |
Kojto | 112:6f327212ef96 | 37 | */ |
Kojto | 112:6f327212ef96 | 38 | |
Kojto | 112:6f327212ef96 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 112:6f327212ef96 | 40 | #ifndef __STM32L1xx_HAL_H |
Kojto | 112:6f327212ef96 | 41 | #define __STM32L1xx_HAL_H |
Kojto | 112:6f327212ef96 | 42 | |
Kojto | 112:6f327212ef96 | 43 | #ifdef __cplusplus |
Kojto | 112:6f327212ef96 | 44 | extern "C" { |
Kojto | 112:6f327212ef96 | 45 | #endif |
Kojto | 112:6f327212ef96 | 46 | |
Kojto | 112:6f327212ef96 | 47 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 48 | #include "stm32l1xx_hal_conf.h" |
Kojto | 112:6f327212ef96 | 49 | |
Kojto | 112:6f327212ef96 | 50 | /** @addtogroup STM32L1xx_HAL_Driver |
Kojto | 112:6f327212ef96 | 51 | * @{ |
Kojto | 112:6f327212ef96 | 52 | */ |
Kojto | 112:6f327212ef96 | 53 | |
Kojto | 112:6f327212ef96 | 54 | /** @addtogroup HAL |
Kojto | 112:6f327212ef96 | 55 | * @{ |
Kojto | 112:6f327212ef96 | 56 | */ |
Kojto | 112:6f327212ef96 | 57 | |
Kojto | 112:6f327212ef96 | 58 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 59 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 60 | /** @defgroup HAL_Exported_Constants HAL Exported Constants |
Kojto | 112:6f327212ef96 | 61 | * @{ |
Kojto | 112:6f327212ef96 | 62 | */ |
Kojto | 112:6f327212ef96 | 63 | |
Kojto | 112:6f327212ef96 | 64 | /** @defgroup SYSCFG_Constants SYSCFG: SYStem ConFiG |
Kojto | 112:6f327212ef96 | 65 | * @{ |
Kojto | 112:6f327212ef96 | 66 | */ |
Kojto | 112:6f327212ef96 | 67 | |
Kojto | 112:6f327212ef96 | 68 | /** @defgroup SYSCFG_BootMode Boot Mode |
Kojto | 112:6f327212ef96 | 69 | * @{ |
Kojto | 112:6f327212ef96 | 70 | */ |
Kojto | 112:6f327212ef96 | 71 | |
Kojto | 112:6f327212ef96 | 72 | #define SYSCFG_BOOT_MAINFLASH ((uint32_t)0x00000000) |
Kojto | 112:6f327212ef96 | 73 | #define SYSCFG_BOOT_SYSTEMFLASH ((uint32_t)SYSCFG_MEMRMP_BOOT_MODE_0) |
Kojto | 112:6f327212ef96 | 74 | #if defined(FSMC_R_BASE) |
Kojto | 112:6f327212ef96 | 75 | #define SYSCFG_BOOT_FSMC ((uint32_t)SYSCFG_MEMRMP_BOOT_MODE_1) |
Kojto | 112:6f327212ef96 | 76 | #endif /* FSMC_R_BASE */ |
Kojto | 112:6f327212ef96 | 77 | #define SYSCFG_BOOT_SRAM ((uint32_t)SYSCFG_MEMRMP_BOOT_MODE) |
Kojto | 112:6f327212ef96 | 78 | |
Kojto | 112:6f327212ef96 | 79 | /** |
Kojto | 112:6f327212ef96 | 80 | * @} |
Kojto | 112:6f327212ef96 | 81 | */ |
Kojto | 112:6f327212ef96 | 82 | |
Kojto | 112:6f327212ef96 | 83 | /** |
Kojto | 112:6f327212ef96 | 84 | * @} |
Kojto | 112:6f327212ef96 | 85 | */ |
Kojto | 112:6f327212ef96 | 86 | |
Kojto | 112:6f327212ef96 | 87 | /** @defgroup RI_Constants RI: Routing Interface |
Kojto | 112:6f327212ef96 | 88 | * @{ |
Kojto | 112:6f327212ef96 | 89 | */ |
Kojto | 112:6f327212ef96 | 90 | |
Kojto | 112:6f327212ef96 | 91 | /** @defgroup RI_InputCapture Input Capture |
Kojto | 112:6f327212ef96 | 92 | * @{ |
Kojto | 112:6f327212ef96 | 93 | */ |
Kojto | 112:6f327212ef96 | 94 | |
Kojto | 112:6f327212ef96 | 95 | #define RI_INPUTCAPTURE_IC1 RI_ICR_IC1 /*!< Input Capture 1 */ |
Kojto | 112:6f327212ef96 | 96 | #define RI_INPUTCAPTURE_IC2 RI_ICR_IC2 /*!< Input Capture 2 */ |
Kojto | 112:6f327212ef96 | 97 | #define RI_INPUTCAPTURE_IC3 RI_ICR_IC3 /*!< Input Capture 3 */ |
Kojto | 112:6f327212ef96 | 98 | #define RI_INPUTCAPTURE_IC4 RI_ICR_IC4 /*!< Input Capture 4 */ |
Kojto | 112:6f327212ef96 | 99 | |
Kojto | 112:6f327212ef96 | 100 | /** |
Kojto | 112:6f327212ef96 | 101 | * @} |
Kojto | 112:6f327212ef96 | 102 | */ |
Kojto | 112:6f327212ef96 | 103 | |
Kojto | 112:6f327212ef96 | 104 | /** @defgroup TIM_Select TIM Select |
Kojto | 112:6f327212ef96 | 105 | * @{ |
Kojto | 112:6f327212ef96 | 106 | */ |
Kojto | 112:6f327212ef96 | 107 | |
Kojto | 112:6f327212ef96 | 108 | #define TIM_SELECT_NONE ((uint32_t)0x00000000) /*!< None selected */ |
Kojto | 112:6f327212ef96 | 109 | #define TIM_SELECT_TIM2 ((uint32_t)RI_ICR_TIM_0) /*!< Timer 2 selected */ |
Kojto | 112:6f327212ef96 | 110 | #define TIM_SELECT_TIM3 ((uint32_t)RI_ICR_TIM_1) /*!< Timer 3 selected */ |
Kojto | 112:6f327212ef96 | 111 | #define TIM_SELECT_TIM4 ((uint32_t)RI_ICR_TIM) /*!< Timer 4 selected */ |
Kojto | 112:6f327212ef96 | 112 | |
Kojto | 112:6f327212ef96 | 113 | #define IS_RI_TIM(__TIM__) (((__TIM__) == TIM_SELECT_NONE) || \ |
Kojto | 112:6f327212ef96 | 114 | ((__TIM__) == TIM_SELECT_TIM2) || \ |
Kojto | 112:6f327212ef96 | 115 | ((__TIM__) == TIM_SELECT_TIM3) || \ |
Kojto | 112:6f327212ef96 | 116 | ((__TIM__) == TIM_SELECT_TIM4)) |
Kojto | 112:6f327212ef96 | 117 | |
Kojto | 112:6f327212ef96 | 118 | /** |
Kojto | 112:6f327212ef96 | 119 | * @} |
Kojto | 112:6f327212ef96 | 120 | */ |
Kojto | 112:6f327212ef96 | 121 | |
Kojto | 112:6f327212ef96 | 122 | /** @defgroup RI_InputCaptureRouting Input Capture Routing |
Kojto | 112:6f327212ef96 | 123 | * @{ |
Kojto | 112:6f327212ef96 | 124 | */ |
Kojto | 112:6f327212ef96 | 125 | /* TIMx_IC1 TIMx_IC2 TIMx_IC3 TIMx_IC4 */ |
Kojto | 112:6f327212ef96 | 126 | #define RI_INPUTCAPTUREROUTING_0 ((uint32_t)0x00000000) /* PA0 PA1 PA2 PA3 */ |
Kojto | 112:6f327212ef96 | 127 | #define RI_INPUTCAPTUREROUTING_1 ((uint32_t)0x00000001) /* PA4 PA5 PA6 PA7 */ |
Kojto | 112:6f327212ef96 | 128 | #define RI_INPUTCAPTUREROUTING_2 ((uint32_t)0x00000002) /* PA8 PA9 PA10 PA11 */ |
Kojto | 112:6f327212ef96 | 129 | #define RI_INPUTCAPTUREROUTING_3 ((uint32_t)0x00000003) /* PA12 PA13 PA14 PA15 */ |
Kojto | 112:6f327212ef96 | 130 | #define RI_INPUTCAPTUREROUTING_4 ((uint32_t)0x00000004) /* PC0 PC1 PC2 PC3 */ |
Kojto | 112:6f327212ef96 | 131 | #define RI_INPUTCAPTUREROUTING_5 ((uint32_t)0x00000005) /* PC4 PC5 PC6 PC7 */ |
Kojto | 112:6f327212ef96 | 132 | #define RI_INPUTCAPTUREROUTING_6 ((uint32_t)0x00000006) /* PC8 PC9 PC10 PC11 */ |
Kojto | 112:6f327212ef96 | 133 | #define RI_INPUTCAPTUREROUTING_7 ((uint32_t)0x00000007) /* PC12 PC13 PC14 PC15 */ |
Kojto | 112:6f327212ef96 | 134 | #define RI_INPUTCAPTUREROUTING_8 ((uint32_t)0x00000008) /* PD0 PD1 PD2 PD3 */ |
Kojto | 112:6f327212ef96 | 135 | #define RI_INPUTCAPTUREROUTING_9 ((uint32_t)0x00000009) /* PD4 PD5 PD6 PD7 */ |
Kojto | 112:6f327212ef96 | 136 | #define RI_INPUTCAPTUREROUTING_10 ((uint32_t)0x0000000A) /* PD8 PD9 PD10 PD11 */ |
Kojto | 112:6f327212ef96 | 137 | #define RI_INPUTCAPTUREROUTING_11 ((uint32_t)0x0000000B) /* PD12 PD13 PD14 PD15 */ |
Kojto | 112:6f327212ef96 | 138 | #define RI_INPUTCAPTUREROUTING_12 ((uint32_t)0x0000000C) /* PE0 PE1 PE2 PE3 */ |
Kojto | 112:6f327212ef96 | 139 | #define RI_INPUTCAPTUREROUTING_13 ((uint32_t)0x0000000D) /* PE4 PE5 PE6 PE7 */ |
Kojto | 112:6f327212ef96 | 140 | #define RI_INPUTCAPTUREROUTING_14 ((uint32_t)0x0000000E) /* PE8 PE9 PE10 PE11 */ |
Kojto | 112:6f327212ef96 | 141 | #define RI_INPUTCAPTUREROUTING_15 ((uint32_t)0x0000000F) /* PE12 PE13 PE14 PE15 */ |
Kojto | 112:6f327212ef96 | 142 | |
Kojto | 112:6f327212ef96 | 143 | #define IS_RI_INPUTCAPTURE_ROUTING(__ROUTING__) (((__ROUTING__) == RI_INPUTCAPTUREROUTING_0) || \ |
Kojto | 112:6f327212ef96 | 144 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_1) || \ |
Kojto | 112:6f327212ef96 | 145 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_2) || \ |
Kojto | 112:6f327212ef96 | 146 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_3) || \ |
Kojto | 112:6f327212ef96 | 147 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_4) || \ |
Kojto | 112:6f327212ef96 | 148 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_5) || \ |
Kojto | 112:6f327212ef96 | 149 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_6) || \ |
Kojto | 112:6f327212ef96 | 150 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_7) || \ |
Kojto | 112:6f327212ef96 | 151 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_8) || \ |
Kojto | 112:6f327212ef96 | 152 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_9) || \ |
Kojto | 112:6f327212ef96 | 153 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_10) || \ |
Kojto | 112:6f327212ef96 | 154 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_11) || \ |
Kojto | 112:6f327212ef96 | 155 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_12) || \ |
Kojto | 112:6f327212ef96 | 156 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_13) || \ |
Kojto | 112:6f327212ef96 | 157 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_14) || \ |
Kojto | 112:6f327212ef96 | 158 | ((__ROUTING__) == RI_INPUTCAPTUREROUTING_15)) |
Kojto | 112:6f327212ef96 | 159 | |
Kojto | 112:6f327212ef96 | 160 | /** |
Kojto | 112:6f327212ef96 | 161 | * @} |
Kojto | 112:6f327212ef96 | 162 | */ |
Kojto | 112:6f327212ef96 | 163 | |
Kojto | 112:6f327212ef96 | 164 | /** @defgroup RI_IOSwitch IO Switch |
Kojto | 112:6f327212ef96 | 165 | * @{ |
Kojto | 112:6f327212ef96 | 166 | */ |
Kojto | 112:6f327212ef96 | 167 | #define RI_ASCR1_REGISTER ((uint32_t)0x80000000) |
Kojto | 112:6f327212ef96 | 168 | /* ASCR1 I/O switch: bit 31 is set to '1' to indicate that the mask is in ASCR1 register */ |
Kojto | 112:6f327212ef96 | 169 | #define RI_IOSWITCH_CH0 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_0) |
Kojto | 112:6f327212ef96 | 170 | #define RI_IOSWITCH_CH1 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_1) |
Kojto | 112:6f327212ef96 | 171 | #define RI_IOSWITCH_CH2 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_2) |
Kojto | 112:6f327212ef96 | 172 | #define RI_IOSWITCH_CH3 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_3) |
Kojto | 112:6f327212ef96 | 173 | #define RI_IOSWITCH_CH4 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_4) |
Kojto | 112:6f327212ef96 | 174 | #define RI_IOSWITCH_CH5 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_5) |
Kojto | 112:6f327212ef96 | 175 | #define RI_IOSWITCH_CH6 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_6) |
Kojto | 112:6f327212ef96 | 176 | #define RI_IOSWITCH_CH7 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_7) |
Kojto | 112:6f327212ef96 | 177 | #define RI_IOSWITCH_CH8 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_8) |
Kojto | 112:6f327212ef96 | 178 | #define RI_IOSWITCH_CH9 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_9) |
Kojto | 112:6f327212ef96 | 179 | #define RI_IOSWITCH_CH10 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_10) |
Kojto | 112:6f327212ef96 | 180 | #define RI_IOSWITCH_CH11 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_11) |
Kojto | 112:6f327212ef96 | 181 | #define RI_IOSWITCH_CH12 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_12) |
Kojto | 112:6f327212ef96 | 182 | #define RI_IOSWITCH_CH13 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_13) |
Kojto | 112:6f327212ef96 | 183 | #define RI_IOSWITCH_CH14 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_14) |
Kojto | 112:6f327212ef96 | 184 | #define RI_IOSWITCH_CH15 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_15) |
Kojto | 112:6f327212ef96 | 185 | #define RI_IOSWITCH_CH18 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_18) |
Kojto | 112:6f327212ef96 | 186 | #define RI_IOSWITCH_CH19 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_19) |
Kojto | 112:6f327212ef96 | 187 | #define RI_IOSWITCH_CH20 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_20) |
Kojto | 112:6f327212ef96 | 188 | #define RI_IOSWITCH_CH21 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_21) |
Kojto | 112:6f327212ef96 | 189 | #define RI_IOSWITCH_CH22 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_22) |
Kojto | 112:6f327212ef96 | 190 | #define RI_IOSWITCH_CH23 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_23) |
Kojto | 112:6f327212ef96 | 191 | #define RI_IOSWITCH_CH24 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_24) |
Kojto | 112:6f327212ef96 | 192 | #define RI_IOSWITCH_CH25 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_25) |
Kojto | 112:6f327212ef96 | 193 | #define RI_IOSWITCH_VCOMP ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_VCOMP) /* VCOMP (ADC channel 26) is an internal switch used to connect selected channel to COMP1 non inverting input */ |
Kojto | 112:6f327212ef96 | 194 | #if defined (RI_ASCR2_CH1b) /* STM32L1 devices category Cat.4 and Cat.5 */ |
Kojto | 112:6f327212ef96 | 195 | #define RI_IOSWITCH_CH27 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_27) |
Kojto | 112:6f327212ef96 | 196 | #define RI_IOSWITCH_CH28 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_28) |
Kojto | 112:6f327212ef96 | 197 | #define RI_IOSWITCH_CH29 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_29) |
Kojto | 112:6f327212ef96 | 198 | #define RI_IOSWITCH_CH30 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_30) |
Kojto | 112:6f327212ef96 | 199 | #define RI_IOSWITCH_CH31 ((uint32_t)RI_ASCR1_REGISTER | RI_ASCR1_CH_31) |
Kojto | 112:6f327212ef96 | 200 | #endif /* RI_ASCR2_CH1b */ |
Kojto | 112:6f327212ef96 | 201 | |
Kojto | 112:6f327212ef96 | 202 | /* ASCR2 IO switch: bit 31 is set to '0' to indicate that the mask is in ASCR2 register */ |
Kojto | 112:6f327212ef96 | 203 | #define RI_IOSWITCH_GR10_1 ((uint32_t)RI_ASCR2_GR10_1) |
Kojto | 112:6f327212ef96 | 204 | #define RI_IOSWITCH_GR10_2 ((uint32_t)RI_ASCR2_GR10_2) |
Kojto | 112:6f327212ef96 | 205 | #define RI_IOSWITCH_GR10_3 ((uint32_t)RI_ASCR2_GR10_3) |
Kojto | 112:6f327212ef96 | 206 | #define RI_IOSWITCH_GR10_4 ((uint32_t)RI_ASCR2_GR10_4) |
Kojto | 112:6f327212ef96 | 207 | #define RI_IOSWITCH_GR6_1 ((uint32_t)RI_ASCR2_GR6_1) |
Kojto | 112:6f327212ef96 | 208 | #define RI_IOSWITCH_GR6_2 ((uint32_t)RI_ASCR2_GR6_2) |
Kojto | 112:6f327212ef96 | 209 | #define RI_IOSWITCH_GR5_1 ((uint32_t)RI_ASCR2_GR5_1) |
Kojto | 112:6f327212ef96 | 210 | #define RI_IOSWITCH_GR5_2 ((uint32_t)RI_ASCR2_GR5_2) |
Kojto | 112:6f327212ef96 | 211 | #define RI_IOSWITCH_GR5_3 ((uint32_t)RI_ASCR2_GR5_3) |
Kojto | 112:6f327212ef96 | 212 | #define RI_IOSWITCH_GR4_1 ((uint32_t)RI_ASCR2_GR4_1) |
Kojto | 112:6f327212ef96 | 213 | #define RI_IOSWITCH_GR4_2 ((uint32_t)RI_ASCR2_GR4_2) |
Kojto | 112:6f327212ef96 | 214 | #define RI_IOSWITCH_GR4_3 ((uint32_t)RI_ASCR2_GR4_3) |
Kojto | 112:6f327212ef96 | 215 | #if defined (RI_ASCR2_CH0b) /* STM32L1 devices category Cat.3, Cat.4 and Cat.5 */ |
Kojto | 112:6f327212ef96 | 216 | #define RI_IOSWITCH_CH0b ((uint32_t)RI_ASCR2_CH0b) |
Kojto | 112:6f327212ef96 | 217 | #if defined (RI_ASCR2_CH1b) /* STM32L1 devices category Cat.4 and Cat.5 */ |
Kojto | 112:6f327212ef96 | 218 | #define RI_IOSWITCH_CH1b ((uint32_t)RI_ASCR2_CH1b) |
Kojto | 112:6f327212ef96 | 219 | #define RI_IOSWITCH_CH2b ((uint32_t)RI_ASCR2_CH2b) |
Kojto | 112:6f327212ef96 | 220 | #define RI_IOSWITCH_CH3b ((uint32_t)RI_ASCR2_CH3b) |
Kojto | 112:6f327212ef96 | 221 | #define RI_IOSWITCH_CH6b ((uint32_t)RI_ASCR2_CH6b) |
Kojto | 112:6f327212ef96 | 222 | #define RI_IOSWITCH_CH7b ((uint32_t)RI_ASCR2_CH7b) |
Kojto | 112:6f327212ef96 | 223 | #define RI_IOSWITCH_CH8b ((uint32_t)RI_ASCR2_CH8b) |
Kojto | 112:6f327212ef96 | 224 | #define RI_IOSWITCH_CH9b ((uint32_t)RI_ASCR2_CH9b) |
Kojto | 112:6f327212ef96 | 225 | #define RI_IOSWITCH_CH10b ((uint32_t)RI_ASCR2_CH10b) |
Kojto | 112:6f327212ef96 | 226 | #define RI_IOSWITCH_CH11b ((uint32_t)RI_ASCR2_CH11b) |
Kojto | 112:6f327212ef96 | 227 | #define RI_IOSWITCH_CH12b ((uint32_t)RI_ASCR2_CH12b) |
Kojto | 112:6f327212ef96 | 228 | #endif /* RI_ASCR2_CH1b */ |
Kojto | 112:6f327212ef96 | 229 | #define RI_IOSWITCH_GR6_3 ((uint32_t)RI_ASCR2_GR6_3) |
Kojto | 112:6f327212ef96 | 230 | #define RI_IOSWITCH_GR6_4 ((uint32_t)RI_ASCR2_GR6_4) |
Kojto | 112:6f327212ef96 | 231 | #endif /* RI_ASCR2_CH0b */ |
Kojto | 112:6f327212ef96 | 232 | |
Kojto | 112:6f327212ef96 | 233 | |
Kojto | 112:6f327212ef96 | 234 | #if defined (RI_ASCR2_CH1b) /* STM32L1 devices category Cat.4 and Cat.5 */ |
Kojto | 112:6f327212ef96 | 235 | |
Kojto | 112:6f327212ef96 | 236 | #define IS_RI_IOSWITCH(__IOSWITCH__) (((__IOSWITCH__) == RI_IOSWITCH_CH0) || ((__IOSWITCH__) == RI_IOSWITCH_CH1) || \ |
Kojto | 112:6f327212ef96 | 237 | ((__IOSWITCH__) == RI_IOSWITCH_CH2) || ((__IOSWITCH__) == RI_IOSWITCH_CH3) || \ |
Kojto | 112:6f327212ef96 | 238 | ((__IOSWITCH__) == RI_IOSWITCH_CH4) || ((__IOSWITCH__) == RI_IOSWITCH_CH5) || \ |
Kojto | 112:6f327212ef96 | 239 | ((__IOSWITCH__) == RI_IOSWITCH_CH6) || ((__IOSWITCH__) == RI_IOSWITCH_CH7) || \ |
Kojto | 112:6f327212ef96 | 240 | ((__IOSWITCH__) == RI_IOSWITCH_CH8) || ((__IOSWITCH__) == RI_IOSWITCH_CH9) || \ |
Kojto | 112:6f327212ef96 | 241 | ((__IOSWITCH__) == RI_IOSWITCH_CH10) || ((__IOSWITCH__) == RI_IOSWITCH_CH11) || \ |
Kojto | 112:6f327212ef96 | 242 | ((__IOSWITCH__) == RI_IOSWITCH_CH12) || ((__IOSWITCH__) == RI_IOSWITCH_CH13) || \ |
Kojto | 112:6f327212ef96 | 243 | ((__IOSWITCH__) == RI_IOSWITCH_CH14) || ((__IOSWITCH__) == RI_IOSWITCH_CH15) || \ |
Kojto | 112:6f327212ef96 | 244 | ((__IOSWITCH__) == RI_IOSWITCH_CH18) || ((__IOSWITCH__) == RI_IOSWITCH_CH19) || \ |
Kojto | 112:6f327212ef96 | 245 | ((__IOSWITCH__) == RI_IOSWITCH_CH20) || ((__IOSWITCH__) == RI_IOSWITCH_CH21) || \ |
Kojto | 112:6f327212ef96 | 246 | ((__IOSWITCH__) == RI_IOSWITCH_CH22) || ((__IOSWITCH__) == RI_IOSWITCH_CH23) || \ |
Kojto | 112:6f327212ef96 | 247 | ((__IOSWITCH__) == RI_IOSWITCH_CH24) || ((__IOSWITCH__) == RI_IOSWITCH_CH25) || \ |
Kojto | 112:6f327212ef96 | 248 | ((__IOSWITCH__) == RI_IOSWITCH_VCOMP) || ((__IOSWITCH__) == RI_IOSWITCH_CH27) || \ |
Kojto | 112:6f327212ef96 | 249 | ((__IOSWITCH__) == RI_IOSWITCH_CH28) || ((__IOSWITCH__) == RI_IOSWITCH_CH29) || \ |
Kojto | 112:6f327212ef96 | 250 | ((__IOSWITCH__) == RI_IOSWITCH_CH30) || ((__IOSWITCH__) == RI_IOSWITCH_CH31) || \ |
Kojto | 112:6f327212ef96 | 251 | ((__IOSWITCH__) == RI_IOSWITCH_GR10_1) || ((__IOSWITCH__) == RI_IOSWITCH_GR10_2) || \ |
Kojto | 112:6f327212ef96 | 252 | ((__IOSWITCH__) == RI_IOSWITCH_GR10_3) || ((__IOSWITCH__) == RI_IOSWITCH_GR10_4) || \ |
Kojto | 112:6f327212ef96 | 253 | ((__IOSWITCH__) == RI_IOSWITCH_GR6_1) || ((__IOSWITCH__) == RI_IOSWITCH_GR6_2) || \ |
Kojto | 112:6f327212ef96 | 254 | ((__IOSWITCH__) == RI_IOSWITCH_GR6_3) || ((__IOSWITCH__) == RI_IOSWITCH_GR6_4) || \ |
Kojto | 112:6f327212ef96 | 255 | ((__IOSWITCH__) == RI_IOSWITCH_GR5_1) || ((__IOSWITCH__) == RI_IOSWITCH_GR5_2) || \ |
Kojto | 112:6f327212ef96 | 256 | ((__IOSWITCH__) == RI_IOSWITCH_GR5_3) || ((__IOSWITCH__) == RI_IOSWITCH_GR4_1) || \ |
Kojto | 112:6f327212ef96 | 257 | ((__IOSWITCH__) == RI_IOSWITCH_GR4_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR4_3) || \ |
Kojto | 112:6f327212ef96 | 258 | ((__IOSWITCH__) == RI_IOSWITCH_CH0b) || ((__IOSWITCH__) == RI_IOSWITCH_CH1b) || \ |
Kojto | 112:6f327212ef96 | 259 | ((__IOSWITCH__) == RI_IOSWITCH_CH2b) || ((__IOSWITCH__) == RI_IOSWITCH_CH3b) || \ |
Kojto | 112:6f327212ef96 | 260 | ((__IOSWITCH__) == RI_IOSWITCH_CH6b) || ((__IOSWITCH__) == RI_IOSWITCH_CH7b) || \ |
Kojto | 112:6f327212ef96 | 261 | ((__IOSWITCH__) == RI_IOSWITCH_CH8b) || ((__IOSWITCH__) == RI_IOSWITCH_CH9b) || \ |
Kojto | 112:6f327212ef96 | 262 | ((__IOSWITCH__) == RI_IOSWITCH_CH10b) || ((__IOSWITCH__) == RI_IOSWITCH_CH11b) || \ |
Kojto | 112:6f327212ef96 | 263 | ((__IOSWITCH__) == RI_IOSWITCH_CH12b)) |
Kojto | 112:6f327212ef96 | 264 | |
Kojto | 112:6f327212ef96 | 265 | #else /* !RI_ASCR2_CH1b */ |
Kojto | 112:6f327212ef96 | 266 | |
Kojto | 112:6f327212ef96 | 267 | #if defined (RI_ASCR2_CH0b) /* STM32L1 devices category Cat.3 */ |
Kojto | 112:6f327212ef96 | 268 | |
Kojto | 112:6f327212ef96 | 269 | #define IS_RI_IOSWITCH(__IOSWITCH__) (((__IOSWITCH__) == RI_IOSWITCH_CH0) || ((__IOSWITCH__) == RI_IOSWITCH_CH1) || \ |
Kojto | 112:6f327212ef96 | 270 | ((__IOSWITCH__) == RI_IOSWITCH_CH2) || ((__IOSWITCH__) == RI_IOSWITCH_CH3) || \ |
Kojto | 112:6f327212ef96 | 271 | ((__IOSWITCH__) == RI_IOSWITCH_CH4) || ((__IOSWITCH__) == RI_IOSWITCH_CH5) || \ |
Kojto | 112:6f327212ef96 | 272 | ((__IOSWITCH__) == RI_IOSWITCH_CH6) || ((__IOSWITCH__) == RI_IOSWITCH_CH7) || \ |
Kojto | 112:6f327212ef96 | 273 | ((__IOSWITCH__) == RI_IOSWITCH_CH8) || ((__IOSWITCH__) == RI_IOSWITCH_CH9) || \ |
Kojto | 112:6f327212ef96 | 274 | ((__IOSWITCH__) == RI_IOSWITCH_CH10) || ((__IOSWITCH__) == RI_IOSWITCH_CH11) || \ |
Kojto | 112:6f327212ef96 | 275 | ((__IOSWITCH__) == RI_IOSWITCH_CH12) || ((__IOSWITCH__) == RI_IOSWITCH_CH13) || \ |
Kojto | 112:6f327212ef96 | 276 | ((__IOSWITCH__) == RI_IOSWITCH_CH14) || ((__IOSWITCH__) == RI_IOSWITCH_CH15) || \ |
Kojto | 112:6f327212ef96 | 277 | ((__IOSWITCH__) == RI_IOSWITCH_CH18) || ((__IOSWITCH__) == RI_IOSWITCH_CH19) || \ |
Kojto | 112:6f327212ef96 | 278 | ((__IOSWITCH__) == RI_IOSWITCH_CH20) || ((__IOSWITCH__) == RI_IOSWITCH_CH21) || \ |
Kojto | 112:6f327212ef96 | 279 | ((__IOSWITCH__) == RI_IOSWITCH_CH22) || ((__IOSWITCH__) == RI_IOSWITCH_CH23) || \ |
Kojto | 112:6f327212ef96 | 280 | ((__IOSWITCH__) == RI_IOSWITCH_CH24) || ((__IOSWITCH__) == RI_IOSWITCH_CH25) || \ |
Kojto | 112:6f327212ef96 | 281 | ((__IOSWITCH__) == RI_IOSWITCH_VCOMP) || ((__IOSWITCH__) == RI_IOSWITCH_GR10_1) || \ |
Kojto | 112:6f327212ef96 | 282 | ((__IOSWITCH__) == RI_IOSWITCH_GR10_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR10_3) || \ |
Kojto | 112:6f327212ef96 | 283 | ((__IOSWITCH__) == RI_IOSWITCH_GR10_4) || ((__IOSWITCH__) == RI_IOSWITCH_GR6_1) || \ |
Kojto | 112:6f327212ef96 | 284 | ((__IOSWITCH__) == RI_IOSWITCH_GR6_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR5_1) || \ |
Kojto | 112:6f327212ef96 | 285 | ((__IOSWITCH__) == RI_IOSWITCH_GR5_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR5_3) || \ |
Kojto | 112:6f327212ef96 | 286 | ((__IOSWITCH__) == RI_IOSWITCH_GR4_1) || ((__IOSWITCH__) == RI_IOSWITCH_GR4_2) || \ |
Kojto | 112:6f327212ef96 | 287 | ((__IOSWITCH__) == RI_IOSWITCH_GR4_3) || ((__IOSWITCH__) == RI_IOSWITCH_CH0b)) |
Kojto | 112:6f327212ef96 | 288 | |
Kojto | 112:6f327212ef96 | 289 | #else /* !RI_ASCR2_CH0b */ /* STM32L1 devices category Cat.1 and Cat.2 */ |
Kojto | 112:6f327212ef96 | 290 | |
Kojto | 112:6f327212ef96 | 291 | #define IS_RI_IOSWITCH(__IOSWITCH__) (((__IOSWITCH__) == RI_IOSWITCH_CH0) || ((__IOSWITCH__) == RI_IOSWITCH_CH1) || \ |
Kojto | 112:6f327212ef96 | 292 | ((__IOSWITCH__) == RI_IOSWITCH_CH2) || ((__IOSWITCH__) == RI_IOSWITCH_CH3) || \ |
Kojto | 112:6f327212ef96 | 293 | ((__IOSWITCH__) == RI_IOSWITCH_CH4) || ((__IOSWITCH__) == RI_IOSWITCH_CH5) || \ |
Kojto | 112:6f327212ef96 | 294 | ((__IOSWITCH__) == RI_IOSWITCH_CH6) || ((__IOSWITCH__) == RI_IOSWITCH_CH7) || \ |
Kojto | 112:6f327212ef96 | 295 | ((__IOSWITCH__) == RI_IOSWITCH_CH8) || ((__IOSWITCH__) == RI_IOSWITCH_CH9) || \ |
Kojto | 112:6f327212ef96 | 296 | ((__IOSWITCH__) == RI_IOSWITCH_CH10) || ((__IOSWITCH__) == RI_IOSWITCH_CH11) || \ |
Kojto | 112:6f327212ef96 | 297 | ((__IOSWITCH__) == RI_IOSWITCH_CH12) || ((__IOSWITCH__) == RI_IOSWITCH_CH13) || \ |
Kojto | 112:6f327212ef96 | 298 | ((__IOSWITCH__) == RI_IOSWITCH_CH14) || ((__IOSWITCH__) == RI_IOSWITCH_CH15) || \ |
Kojto | 112:6f327212ef96 | 299 | ((__IOSWITCH__) == RI_IOSWITCH_CH18) || ((__IOSWITCH__) == RI_IOSWITCH_CH19) || \ |
Kojto | 112:6f327212ef96 | 300 | ((__IOSWITCH__) == RI_IOSWITCH_CH20) || ((__IOSWITCH__) == RI_IOSWITCH_CH21) || \ |
Kojto | 112:6f327212ef96 | 301 | ((__IOSWITCH__) == RI_IOSWITCH_CH22) || ((__IOSWITCH__) == RI_IOSWITCH_CH23) || \ |
Kojto | 112:6f327212ef96 | 302 | ((__IOSWITCH__) == RI_IOSWITCH_CH24) || ((__IOSWITCH__) == RI_IOSWITCH_CH25) || \ |
Kojto | 112:6f327212ef96 | 303 | ((__IOSWITCH__) == RI_IOSWITCH_VCOMP) || ((__IOSWITCH__) == RI_IOSWITCH_GR10_1) || \ |
Kojto | 112:6f327212ef96 | 304 | ((__IOSWITCH__) == RI_IOSWITCH_GR10_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR10_3) || \ |
Kojto | 112:6f327212ef96 | 305 | ((__IOSWITCH__) == RI_IOSWITCH_GR10_4) || ((__IOSWITCH__) == RI_IOSWITCH_GR6_1) || \ |
Kojto | 112:6f327212ef96 | 306 | ((__IOSWITCH__) == RI_IOSWITCH_GR6_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR5_1) || \ |
Kojto | 112:6f327212ef96 | 307 | ((__IOSWITCH__) == RI_IOSWITCH_GR5_2) || ((__IOSWITCH__) == RI_IOSWITCH_GR5_3) || \ |
Kojto | 112:6f327212ef96 | 308 | ((__IOSWITCH__) == RI_IOSWITCH_GR4_1) || ((__IOSWITCH__) == RI_IOSWITCH_GR4_2) || \ |
Kojto | 112:6f327212ef96 | 309 | ((__IOSWITCH__) == RI_IOSWITCH_GR4_3)) |
Kojto | 112:6f327212ef96 | 310 | |
Kojto | 112:6f327212ef96 | 311 | #endif /* RI_ASCR2_CH0b */ |
Kojto | 112:6f327212ef96 | 312 | #endif /* RI_ASCR2_CH1b */ |
Kojto | 112:6f327212ef96 | 313 | |
Kojto | 112:6f327212ef96 | 314 | /** |
Kojto | 112:6f327212ef96 | 315 | * @} |
Kojto | 112:6f327212ef96 | 316 | */ |
Kojto | 112:6f327212ef96 | 317 | |
Kojto | 112:6f327212ef96 | 318 | /** @defgroup RI_Pin PIN define |
Kojto | 112:6f327212ef96 | 319 | * @{ |
Kojto | 112:6f327212ef96 | 320 | */ |
Kojto | 112:6f327212ef96 | 321 | #define RI_PIN_0 ((uint16_t)0x0001) /*!< Pin 0 selected */ |
Kojto | 112:6f327212ef96 | 322 | #define RI_PIN_1 ((uint16_t)0x0002) /*!< Pin 1 selected */ |
Kojto | 112:6f327212ef96 | 323 | #define RI_PIN_2 ((uint16_t)0x0004) /*!< Pin 2 selected */ |
Kojto | 112:6f327212ef96 | 324 | #define RI_PIN_3 ((uint16_t)0x0008) /*!< Pin 3 selected */ |
Kojto | 112:6f327212ef96 | 325 | #define RI_PIN_4 ((uint16_t)0x0010) /*!< Pin 4 selected */ |
Kojto | 112:6f327212ef96 | 326 | #define RI_PIN_5 ((uint16_t)0x0020) /*!< Pin 5 selected */ |
Kojto | 112:6f327212ef96 | 327 | #define RI_PIN_6 ((uint16_t)0x0040) /*!< Pin 6 selected */ |
Kojto | 112:6f327212ef96 | 328 | #define RI_PIN_7 ((uint16_t)0x0080) /*!< Pin 7 selected */ |
Kojto | 112:6f327212ef96 | 329 | #define RI_PIN_8 ((uint16_t)0x0100) /*!< Pin 8 selected */ |
Kojto | 112:6f327212ef96 | 330 | #define RI_PIN_9 ((uint16_t)0x0200) /*!< Pin 9 selected */ |
Kojto | 112:6f327212ef96 | 331 | #define RI_PIN_10 ((uint16_t)0x0400) /*!< Pin 10 selected */ |
Kojto | 112:6f327212ef96 | 332 | #define RI_PIN_11 ((uint16_t)0x0800) /*!< Pin 11 selected */ |
Kojto | 112:6f327212ef96 | 333 | #define RI_PIN_12 ((uint16_t)0x1000) /*!< Pin 12 selected */ |
Kojto | 112:6f327212ef96 | 334 | #define RI_PIN_13 ((uint16_t)0x2000) /*!< Pin 13 selected */ |
Kojto | 112:6f327212ef96 | 335 | #define RI_PIN_14 ((uint16_t)0x4000) /*!< Pin 14 selected */ |
Kojto | 112:6f327212ef96 | 336 | #define RI_PIN_15 ((uint16_t)0x8000) /*!< Pin 15 selected */ |
Kojto | 112:6f327212ef96 | 337 | #define RI_PIN_ALL ((uint16_t)0xFFFF) /*!< All pins selected */ |
Kojto | 112:6f327212ef96 | 338 | |
Kojto | 112:6f327212ef96 | 339 | #define IS_RI_PIN(__PIN__) ((__PIN__) != (uint16_t)0x00) |
Kojto | 112:6f327212ef96 | 340 | |
Kojto | 112:6f327212ef96 | 341 | /** |
Kojto | 112:6f327212ef96 | 342 | * @} |
Kojto | 112:6f327212ef96 | 343 | */ |
Kojto | 112:6f327212ef96 | 344 | |
Kojto | 112:6f327212ef96 | 345 | /** |
Kojto | 112:6f327212ef96 | 346 | * @} |
Kojto | 112:6f327212ef96 | 347 | */ |
Kojto | 112:6f327212ef96 | 348 | |
Kojto | 112:6f327212ef96 | 349 | /** |
Kojto | 112:6f327212ef96 | 350 | * @} |
Kojto | 112:6f327212ef96 | 351 | */ |
Kojto | 112:6f327212ef96 | 352 | |
Kojto | 112:6f327212ef96 | 353 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 354 | |
Kojto | 112:6f327212ef96 | 355 | /** @defgroup HAL_Exported_Macros HAL Exported Macros |
Kojto | 112:6f327212ef96 | 356 | * @{ |
Kojto | 112:6f327212ef96 | 357 | */ |
Kojto | 112:6f327212ef96 | 358 | |
Kojto | 112:6f327212ef96 | 359 | /** @defgroup DBGMCU_Macros DBGMCU: Debug MCU |
Kojto | 112:6f327212ef96 | 360 | * @{ |
Kojto | 112:6f327212ef96 | 361 | */ |
Kojto | 112:6f327212ef96 | 362 | |
Kojto | 112:6f327212ef96 | 363 | /** @defgroup DBGMCU_Freeze_Unfreeze Freeze Unfreeze Peripherals in Debug mode |
Kojto | 112:6f327212ef96 | 364 | * @brief Freeze/Unfreeze Peripherals in Debug mode |
Kojto | 112:6f327212ef96 | 365 | * @{ |
Kojto | 112:6f327212ef96 | 366 | */ |
Kojto | 112:6f327212ef96 | 367 | |
Kojto | 112:6f327212ef96 | 368 | /** |
Kojto | 112:6f327212ef96 | 369 | * @brief TIM2 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 370 | */ |
Kojto | 112:6f327212ef96 | 371 | #if defined (DBGMCU_APB1_FZ_DBG_TIM2_STOP) |
Kojto | 112:6f327212ef96 | 372 | #define __HAL_FREEZE_TIM2_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM2_STOP) |
Kojto | 112:6f327212ef96 | 373 | #define __HAL_UNFREEZE_TIM2_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM2_STOP) |
Kojto | 112:6f327212ef96 | 374 | #endif |
Kojto | 112:6f327212ef96 | 375 | |
Kojto | 112:6f327212ef96 | 376 | /** |
Kojto | 112:6f327212ef96 | 377 | * @brief TIM3 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 378 | */ |
Kojto | 112:6f327212ef96 | 379 | #if defined (DBGMCU_APB1_FZ_DBG_TIM3_STOP) |
Kojto | 112:6f327212ef96 | 380 | #define __HAL_FREEZE_TIM3_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM3_STOP) |
Kojto | 112:6f327212ef96 | 381 | #define __HAL_UNFREEZE_TIM3_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM3_STOP) |
Kojto | 112:6f327212ef96 | 382 | #endif |
Kojto | 112:6f327212ef96 | 383 | |
Kojto | 112:6f327212ef96 | 384 | /** |
Kojto | 112:6f327212ef96 | 385 | * @brief TIM4 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 386 | */ |
Kojto | 112:6f327212ef96 | 387 | #if defined (DBGMCU_APB1_FZ_DBG_TIM4_STOP) |
Kojto | 112:6f327212ef96 | 388 | #define __HAL_FREEZE_TIM4_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM4_STOP) |
Kojto | 112:6f327212ef96 | 389 | #define __HAL_UNFREEZE_TIM4_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM4_STOP) |
Kojto | 112:6f327212ef96 | 390 | #endif |
Kojto | 112:6f327212ef96 | 391 | |
Kojto | 112:6f327212ef96 | 392 | /** |
Kojto | 112:6f327212ef96 | 393 | * @brief TIM5 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 394 | */ |
Kojto | 112:6f327212ef96 | 395 | #if defined (DBGMCU_APB1_FZ_DBG_TIM5_STOP) |
Kojto | 112:6f327212ef96 | 396 | #define __HAL_FREEZE_TIM5_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM5_STOP) |
Kojto | 112:6f327212ef96 | 397 | #define __HAL_UNFREEZE_TIM5_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM5_STOP) |
Kojto | 112:6f327212ef96 | 398 | #endif |
Kojto | 112:6f327212ef96 | 399 | |
Kojto | 112:6f327212ef96 | 400 | /** |
Kojto | 112:6f327212ef96 | 401 | * @brief TIM6 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 402 | */ |
Kojto | 112:6f327212ef96 | 403 | #if defined (DBGMCU_APB1_FZ_DBG_TIM6_STOP) |
Kojto | 112:6f327212ef96 | 404 | #define __HAL_FREEZE_TIM6_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM6_STOP) |
Kojto | 112:6f327212ef96 | 405 | #define __HAL_UNFREEZE_TIM6_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM6_STOP) |
Kojto | 112:6f327212ef96 | 406 | #endif |
Kojto | 112:6f327212ef96 | 407 | |
Kojto | 112:6f327212ef96 | 408 | /** |
Kojto | 112:6f327212ef96 | 409 | * @brief TIM7 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 410 | */ |
Kojto | 112:6f327212ef96 | 411 | #if defined (DBGMCU_APB1_FZ_DBG_TIM7_STOP) |
Kojto | 112:6f327212ef96 | 412 | #define __HAL_FREEZE_TIM7_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM7_STOP) |
Kojto | 112:6f327212ef96 | 413 | #define __HAL_UNFREEZE_TIM7_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_TIM7_STOP) |
Kojto | 112:6f327212ef96 | 414 | #endif |
Kojto | 112:6f327212ef96 | 415 | |
Kojto | 112:6f327212ef96 | 416 | /** |
Kojto | 112:6f327212ef96 | 417 | * @brief RTC Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 418 | */ |
Kojto | 112:6f327212ef96 | 419 | #if defined (DBGMCU_APB1_FZ_DBG_RTC_STOP) |
Kojto | 112:6f327212ef96 | 420 | #define __HAL_FREEZE_RTC_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_RTC_STOP) |
Kojto | 112:6f327212ef96 | 421 | #define __HAL_UNFREEZE_RTC_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_RTC_STOP) |
Kojto | 112:6f327212ef96 | 422 | #endif |
Kojto | 112:6f327212ef96 | 423 | |
Kojto | 112:6f327212ef96 | 424 | /** |
Kojto | 112:6f327212ef96 | 425 | * @brief WWDG Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 426 | */ |
Kojto | 112:6f327212ef96 | 427 | #if defined (DBGMCU_APB1_FZ_DBG_WWDG_STOP) |
Kojto | 112:6f327212ef96 | 428 | #define __HAL_FREEZE_WWDG_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_WWDG_STOP) |
Kojto | 112:6f327212ef96 | 429 | #define __HAL_UNFREEZE_WWDG_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_WWDG_STOP) |
Kojto | 112:6f327212ef96 | 430 | #endif |
Kojto | 112:6f327212ef96 | 431 | |
Kojto | 112:6f327212ef96 | 432 | /** |
Kojto | 112:6f327212ef96 | 433 | * @brief IWDG Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 434 | */ |
Kojto | 112:6f327212ef96 | 435 | #if defined (DBGMCU_APB1_FZ_DBG_IWDG_STOP) |
Kojto | 112:6f327212ef96 | 436 | #define __HAL_FREEZE_IWDG_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_IWDG_STOP) |
Kojto | 112:6f327212ef96 | 437 | #define __HAL_UNFREEZE_IWDG_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_IWDG_STOP) |
Kojto | 112:6f327212ef96 | 438 | #endif |
Kojto | 112:6f327212ef96 | 439 | |
Kojto | 112:6f327212ef96 | 440 | /** |
Kojto | 112:6f327212ef96 | 441 | * @brief I2C1 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 442 | */ |
Kojto | 112:6f327212ef96 | 443 | #if defined (DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT) |
Kojto | 112:6f327212ef96 | 444 | #define __HAL_FREEZE_I2C1_TIMEOUT_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT) |
Kojto | 112:6f327212ef96 | 445 | #define __HAL_UNFREEZE_I2C1_TIMEOUT_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT) |
Kojto | 112:6f327212ef96 | 446 | #endif |
Kojto | 112:6f327212ef96 | 447 | |
Kojto | 112:6f327212ef96 | 448 | /** |
Kojto | 112:6f327212ef96 | 449 | * @brief I2C2 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 450 | */ |
Kojto | 112:6f327212ef96 | 451 | #if defined (DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT) |
Kojto | 112:6f327212ef96 | 452 | #define __HAL_FREEZE_I2C2_TIMEOUT_DBGMCU() SET_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT) |
Kojto | 112:6f327212ef96 | 453 | #define __HAL_UNFREEZE_I2C2_TIMEOUT_DBGMCU() CLEAR_BIT(DBGMCU->APB1FZ, DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT) |
Kojto | 112:6f327212ef96 | 454 | #endif |
Kojto | 112:6f327212ef96 | 455 | |
Kojto | 112:6f327212ef96 | 456 | /** |
Kojto | 112:6f327212ef96 | 457 | * @brief TIM9 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 458 | */ |
Kojto | 112:6f327212ef96 | 459 | #if defined (DBGMCU_APB2_FZ_DBG_TIM9_STOP) |
Kojto | 112:6f327212ef96 | 460 | #define __HAL_FREEZE_TIM9_DBGMCU() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM9_STOP) |
Kojto | 112:6f327212ef96 | 461 | #define __HAL_UNFREEZE_TIM9_DBGMCU() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM9_STOP) |
Kojto | 112:6f327212ef96 | 462 | #endif |
Kojto | 112:6f327212ef96 | 463 | |
Kojto | 112:6f327212ef96 | 464 | /** |
Kojto | 112:6f327212ef96 | 465 | * @brief TIM10 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 466 | */ |
Kojto | 112:6f327212ef96 | 467 | #if defined (DBGMCU_APB2_FZ_DBG_TIM10_STOP) |
Kojto | 112:6f327212ef96 | 468 | #define __HAL_FREEZE_TIM10_DBGMCU() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM10_STOP) |
Kojto | 112:6f327212ef96 | 469 | #define __HAL_UNFREEZE_TIM10_DBGMCU() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM10_STOP) |
Kojto | 112:6f327212ef96 | 470 | #endif |
Kojto | 112:6f327212ef96 | 471 | |
Kojto | 112:6f327212ef96 | 472 | /** |
Kojto | 112:6f327212ef96 | 473 | * @brief TIM11 Peripherals Debug mode |
Kojto | 112:6f327212ef96 | 474 | */ |
Kojto | 112:6f327212ef96 | 475 | #if defined (DBGMCU_APB2_FZ_DBG_TIM11_STOP) |
Kojto | 112:6f327212ef96 | 476 | #define __HAL_FREEZE_TIM11_DBGMCU() SET_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM11_STOP) |
Kojto | 112:6f327212ef96 | 477 | #define __HAL_UNFREEZE_TIM11_DBGMCU() CLEAR_BIT(DBGMCU->APB2FZ, DBGMCU_APB2_FZ_DBG_TIM11_STOP) |
Kojto | 112:6f327212ef96 | 478 | #endif |
Kojto | 112:6f327212ef96 | 479 | |
Kojto | 112:6f327212ef96 | 480 | /** |
Kojto | 112:6f327212ef96 | 481 | * @brief Enables or disables the output of internal reference voltage |
Kojto | 112:6f327212ef96 | 482 | * (VREFINT) on I/O pin. |
Kojto | 112:6f327212ef96 | 483 | * The VREFINT output can be routed to any I/O in group 3: |
Kojto | 112:6f327212ef96 | 484 | * - For Cat.1 and Cat.2 devices: CH8 (PB0) or CH9 (PB1). |
Kojto | 112:6f327212ef96 | 485 | * - For Cat.3 devices: CH8 (PB0), CH9 (PB1) or CH0b (PB2). |
Kojto | 112:6f327212ef96 | 486 | * - For Cat.4 and Cat.5 devices: CH8 (PB0), CH9 (PB1), CH0b (PB2), |
Kojto | 112:6f327212ef96 | 487 | * CH1b (PF11) or CH2b (PF12). |
Kojto | 112:6f327212ef96 | 488 | * Note: Comparator peripheral clock must be preliminarility enabled, |
Kojto | 112:6f327212ef96 | 489 | * either in COMP user function "HAL_COMP_MspInit()" (should be |
Kojto | 112:6f327212ef96 | 490 | * done if comparators are used) or by direct clock enable: |
Kojto | 112:6f327212ef96 | 491 | * Refer to macro "__COMP_CLK_ENABLE()". |
Kojto | 112:6f327212ef96 | 492 | * Note: In addition with this macro, Vrefint output buffer must be |
Kojto | 112:6f327212ef96 | 493 | * connected to the selected I/O pin. Refer to macro |
Kojto | 112:6f327212ef96 | 494 | * "__HAL_RI_IOSWITCH_CLOSE()". |
Kojto | 112:6f327212ef96 | 495 | * @note ENABLE: Internal reference voltage connected to I/O group 3 |
Kojto | 112:6f327212ef96 | 496 | * @note DISABLE: Internal reference voltage disconnected from I/O group 3 |
Kojto | 112:6f327212ef96 | 497 | * @retval None |
Kojto | 112:6f327212ef96 | 498 | */ |
Kojto | 112:6f327212ef96 | 499 | #define __HAL_VREFINT_OUT_ENABLE() SET_BIT(COMP->CSR, COMP_CSR_VREFOUTEN) |
Kojto | 112:6f327212ef96 | 500 | #define __HAL_VREFINT_OUT_DISABLE() CLEAR_BIT(COMP->CSR, COMP_CSR_VREFOUTEN) |
Kojto | 112:6f327212ef96 | 501 | |
Kojto | 112:6f327212ef96 | 502 | /** |
Kojto | 112:6f327212ef96 | 503 | * @} |
Kojto | 112:6f327212ef96 | 504 | */ |
Kojto | 112:6f327212ef96 | 505 | |
Kojto | 112:6f327212ef96 | 506 | /** |
Kojto | 112:6f327212ef96 | 507 | * @} |
Kojto | 112:6f327212ef96 | 508 | */ |
Kojto | 112:6f327212ef96 | 509 | |
Kojto | 112:6f327212ef96 | 510 | /** @defgroup SYSCFG_Macros SYSCFG: SYStem ConFiG |
Kojto | 112:6f327212ef96 | 511 | * @{ |
Kojto | 112:6f327212ef96 | 512 | */ |
Kojto | 112:6f327212ef96 | 513 | |
Kojto | 112:6f327212ef96 | 514 | /** @defgroup SYSCFG_BootModeConfig Boot Mode Configuration |
Kojto | 112:6f327212ef96 | 515 | * @{ |
Kojto | 112:6f327212ef96 | 516 | */ |
Kojto | 112:6f327212ef96 | 517 | |
Kojto | 112:6f327212ef96 | 518 | /** |
Kojto | 112:6f327212ef96 | 519 | * @brief Main Flash memory mapped at 0x00000000 |
Kojto | 112:6f327212ef96 | 520 | */ |
Kojto | 112:6f327212ef96 | 521 | #define __HAL_REMAPMEMORY_FLASH() CLEAR_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE) |
Kojto | 112:6f327212ef96 | 522 | |
Kojto | 112:6f327212ef96 | 523 | /** @brief System Flash memory mapped at 0x00000000 |
Kojto | 112:6f327212ef96 | 524 | */ |
Kojto | 112:6f327212ef96 | 525 | #define __HAL_REMAPMEMORY_SYSTEMFLASH() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, SYSCFG_MEMRMP_MEM_MODE_0) |
Kojto | 112:6f327212ef96 | 526 | |
Kojto | 112:6f327212ef96 | 527 | /** @brief Embedded SRAM mapped at 0x00000000 |
Kojto | 112:6f327212ef96 | 528 | */ |
Kojto | 112:6f327212ef96 | 529 | #define __HAL_REMAPMEMORY_SRAM() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, SYSCFG_MEMRMP_MEM_MODE_0 | SYSCFG_MEMRMP_MEM_MODE_1) |
Kojto | 112:6f327212ef96 | 530 | |
Kojto | 112:6f327212ef96 | 531 | #if defined(FSMC_R_BASE) |
Kojto | 112:6f327212ef96 | 532 | /** @brief FSMC Bank1 (NOR/PSRAM 1 and 2) mapped at 0x00000000 |
Kojto | 112:6f327212ef96 | 533 | */ |
Kojto | 112:6f327212ef96 | 534 | #define __HAL_REMAPMEMORY_FSMC() MODIFY_REG(SYSCFG->MEMRMP, SYSCFG_MEMRMP_MEM_MODE, SYSCFG_MEMRMP_MEM_MODE_1) |
Kojto | 112:6f327212ef96 | 535 | |
Kojto | 112:6f327212ef96 | 536 | #endif /* FSMC_R_BASE */ |
Kojto | 112:6f327212ef96 | 537 | |
Kojto | 112:6f327212ef96 | 538 | /** |
Kojto | 112:6f327212ef96 | 539 | * @brief Returns the boot mode as configured by user. |
Kojto | 112:6f327212ef96 | 540 | * @retval The boot mode as configured by user. The returned value can be one |
Kojto | 112:6f327212ef96 | 541 | * of the following values: |
Kojto | 112:6f327212ef96 | 542 | * @arg SYSCFG_BOOT_MAINFLASH |
Kojto | 112:6f327212ef96 | 543 | * @arg SYSCFG_BOOT_SYSTEMFLASH |
Kojto | 112:6f327212ef96 | 544 | * @arg SYSCFG_BOOT_FSMC (available only for STM32L151xD, STM32L152xD & STM32L162xD) |
Kojto | 112:6f327212ef96 | 545 | * @arg SYSCFG_BOOT_SRAM |
Kojto | 112:6f327212ef96 | 546 | */ |
Kojto | 112:6f327212ef96 | 547 | #define __HAL_SYSCFG_GET_BOOT_MODE() READ_BIT(SYSCFG->MEMRMP, SYSCFG_MEMRMP_BOOT_MODE) |
Kojto | 112:6f327212ef96 | 548 | |
Kojto | 112:6f327212ef96 | 549 | /** |
Kojto | 112:6f327212ef96 | 550 | * @} |
Kojto | 112:6f327212ef96 | 551 | */ |
Kojto | 112:6f327212ef96 | 552 | |
Kojto | 112:6f327212ef96 | 553 | /** @defgroup SYSCFG_USBConfig USB DP line Configuration |
Kojto | 112:6f327212ef96 | 554 | * @{ |
Kojto | 112:6f327212ef96 | 555 | */ |
Kojto | 112:6f327212ef96 | 556 | |
Kojto | 112:6f327212ef96 | 557 | /** |
Kojto | 112:6f327212ef96 | 558 | * @brief Control the internal pull-up on USB DP line. |
Kojto | 112:6f327212ef96 | 559 | */ |
Kojto | 112:6f327212ef96 | 560 | #define __HAL_SYSCFG_USBPULLUP_ENABLE() SET_BIT(SYSCFG->PMC, SYSCFG_PMC_USB_PU) |
Kojto | 112:6f327212ef96 | 561 | |
Kojto | 112:6f327212ef96 | 562 | #define __HAL_SYSCFG_USBPULLUP_DISABLE() CLEAR_BIT(SYSCFG->PMC, SYSCFG_PMC_USB_PU) |
Kojto | 112:6f327212ef96 | 563 | |
Kojto | 112:6f327212ef96 | 564 | /** |
Kojto | 112:6f327212ef96 | 565 | * @} |
Kojto | 112:6f327212ef96 | 566 | */ |
Kojto | 112:6f327212ef96 | 567 | |
Kojto | 112:6f327212ef96 | 568 | /** |
Kojto | 112:6f327212ef96 | 569 | * @} |
Kojto | 112:6f327212ef96 | 570 | */ |
Kojto | 112:6f327212ef96 | 571 | |
Kojto | 112:6f327212ef96 | 572 | /** @defgroup RI_Macris RI: Routing Interface |
Kojto | 112:6f327212ef96 | 573 | * @{ |
Kojto | 112:6f327212ef96 | 574 | */ |
Kojto | 112:6f327212ef96 | 575 | |
Kojto | 112:6f327212ef96 | 576 | /** @defgroup RI_InputCaputureConfig Input Capture configuration |
Kojto | 112:6f327212ef96 | 577 | * @{ |
Kojto | 112:6f327212ef96 | 578 | */ |
Kojto | 112:6f327212ef96 | 579 | |
Kojto | 112:6f327212ef96 | 580 | /** |
Kojto | 112:6f327212ef96 | 581 | * @brief Configures the routing interface to map Input Capture 1 of TIMx to a selected I/O pin. |
Kojto | 112:6f327212ef96 | 582 | * @param __TIMSELECT__: Timer select. |
Kojto | 112:6f327212ef96 | 583 | * This parameter can be one of the following values: |
Kojto | 112:6f327212ef96 | 584 | * @arg TIM_SELECT_NONE: No timer selected and default Timer mapping is enabled. |
Kojto | 112:6f327212ef96 | 585 | * @arg TIM_SELECT_TIM2: Timer 2 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 586 | * @arg TIM_SELECT_TIM3: Timer 3 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 587 | * @arg TIM_SELECT_TIM4: Timer 4 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 588 | * @param __INPUT__: selects which pin to be routed to Input Capture. |
Kojto | 112:6f327212ef96 | 589 | * This parameter must be a value of @ref RI_InputCaptureRouting |
Kojto | 112:6f327212ef96 | 590 | * e.g. |
Kojto | 112:6f327212ef96 | 591 | * __HAL_RI_REMAP_INPUTCAPTURE1(TIM_SELECT_TIM2, RI_INPUTCAPTUREROUTING_1) |
Kojto | 112:6f327212ef96 | 592 | * allows routing of Input capture IC1 of TIM2 to PA4. |
Kojto | 112:6f327212ef96 | 593 | * For details about correspondence between RI_INPUTCAPTUREROUTING_x |
Kojto | 112:6f327212ef96 | 594 | * and I/O pins refer to the parameters' description in the header file |
Kojto | 112:6f327212ef96 | 595 | * or refer to the product reference manual. |
Kojto | 112:6f327212ef96 | 596 | * @note Input capture selection bits are not reset by this function. |
Kojto | 112:6f327212ef96 | 597 | * To reset input capture selection bits, use SYSCFG_RIDeInit() function. |
Kojto | 112:6f327212ef96 | 598 | * @note The I/O should be configured in alternate function mode (AF14) using |
Kojto | 112:6f327212ef96 | 599 | * GPIO_PinAFConfig() function. |
Kojto | 112:6f327212ef96 | 600 | * @retval None. |
Kojto | 112:6f327212ef96 | 601 | */ |
Kojto | 112:6f327212ef96 | 602 | #define __HAL_RI_REMAP_INPUTCAPTURE1(__TIMSELECT__, __INPUT__) \ |
Kojto | 112:6f327212ef96 | 603 | do {assert_param(IS_RI_TIM(__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 604 | assert_param(IS_RI_INPUTCAPTURE_ROUTING(__INPUT__)); \ |
Kojto | 112:6f327212ef96 | 605 | MODIFY_REG(RI->ICR, RI_ICR_TIM, (__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 606 | SET_BIT(RI->ICR, RI_INPUTCAPTURE_IC1); \ |
Kojto | 112:6f327212ef96 | 607 | MODIFY_REG(RI->ICR, RI_ICR_IC1OS, (__INPUT__) << POSITION_VAL(RI_ICR_IC1OS)); \ |
Kojto | 112:6f327212ef96 | 608 | }while(0) |
Kojto | 112:6f327212ef96 | 609 | |
Kojto | 112:6f327212ef96 | 610 | /** |
Kojto | 112:6f327212ef96 | 611 | * @brief Configures the routing interface to map Input Capture 2 of TIMx to a selected I/O pin. |
Kojto | 112:6f327212ef96 | 612 | * @param __TIMSELECT__: Timer select. |
Kojto | 112:6f327212ef96 | 613 | * This parameter can be one of the following values: |
Kojto | 112:6f327212ef96 | 614 | * @arg TIM_SELECT_NONE: No timer selected and default Timer mapping is enabled. |
Kojto | 112:6f327212ef96 | 615 | * @arg TIM_SELECT_TIM2: Timer 2 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 616 | * @arg TIM_SELECT_TIM3: Timer 3 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 617 | * @arg TIM_SELECT_TIM4: Timer 4 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 618 | * @param __INPUT__: selects which pin to be routed to Input Capture. |
Kojto | 112:6f327212ef96 | 619 | * This parameter must be a value of @ref RI_InputCaptureRouting |
Kojto | 112:6f327212ef96 | 620 | * @retval None. |
Kojto | 112:6f327212ef96 | 621 | */ |
Kojto | 112:6f327212ef96 | 622 | #define __HAL_RI_REMAP_INPUTCAPTURE2(__TIMSELECT__, __INPUT__) \ |
Kojto | 112:6f327212ef96 | 623 | do {assert_param(IS_RI_TIM(__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 624 | assert_param(IS_RI_INPUTCAPTURE_ROUTING(__INPUT__)); \ |
Kojto | 112:6f327212ef96 | 625 | MODIFY_REG(RI->ICR, RI_ICR_TIM, (__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 626 | SET_BIT(RI->ICR, RI_INPUTCAPTURE_IC2); \ |
Kojto | 112:6f327212ef96 | 627 | MODIFY_REG(RI->ICR, RI_ICR_IC2OS, (__INPUT__) << POSITION_VAL(RI_ICR_IC2OS)); \ |
Kojto | 112:6f327212ef96 | 628 | }while(0) |
Kojto | 112:6f327212ef96 | 629 | |
Kojto | 112:6f327212ef96 | 630 | /** |
Kojto | 112:6f327212ef96 | 631 | * @brief Configures the routing interface to map Input Capture 3 of TIMx to a selected I/O pin. |
Kojto | 112:6f327212ef96 | 632 | * @param __TIMSELECT__: Timer select. |
Kojto | 112:6f327212ef96 | 633 | * This parameter can be one of the following values: |
Kojto | 112:6f327212ef96 | 634 | * @arg TIM_SELECT_NONE: No timer selected and default Timer mapping is enabled. |
Kojto | 112:6f327212ef96 | 635 | * @arg TIM_SELECT_TIM2: Timer 2 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 636 | * @arg TIM_SELECT_TIM3: Timer 3 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 637 | * @arg TIM_SELECT_TIM4: Timer 4 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 638 | * @param __INPUT__: selects which pin to be routed to Input Capture. |
Kojto | 112:6f327212ef96 | 639 | * This parameter must be a value of @ref RI_InputCaptureRouting |
Kojto | 112:6f327212ef96 | 640 | * @retval None. |
Kojto | 112:6f327212ef96 | 641 | */ |
Kojto | 112:6f327212ef96 | 642 | #define __HAL_RI_REMAP_INPUTCAPTURE3(__TIMSELECT__, __INPUT__) \ |
Kojto | 112:6f327212ef96 | 643 | do {assert_param(IS_RI_TIM(__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 644 | assert_param(IS_RI_INPUTCAPTURE_ROUTING(__INPUT__)); \ |
Kojto | 112:6f327212ef96 | 645 | MODIFY_REG(RI->ICR, RI_ICR_TIM, (__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 646 | SET_BIT(RI->ICR, RI_INPUTCAPTURE_IC3); \ |
Kojto | 112:6f327212ef96 | 647 | MODIFY_REG(RI->ICR, RI_ICR_IC3OS, (__INPUT__) << POSITION_VAL(RI_ICR_IC3OS)); \ |
Kojto | 112:6f327212ef96 | 648 | }while(0) |
Kojto | 112:6f327212ef96 | 649 | |
Kojto | 112:6f327212ef96 | 650 | /** |
Kojto | 112:6f327212ef96 | 651 | * @brief Configures the routing interface to map Input Capture 4 of TIMx to a selected I/O pin. |
Kojto | 112:6f327212ef96 | 652 | * @param __TIMSELECT__: Timer select. |
Kojto | 112:6f327212ef96 | 653 | * This parameter can be one of the following values: |
Kojto | 112:6f327212ef96 | 654 | * @arg TIM_SELECT_NONE: No timer selected and default Timer mapping is enabled. |
Kojto | 112:6f327212ef96 | 655 | * @arg TIM_SELECT_TIM2: Timer 2 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 656 | * @arg TIM_SELECT_TIM3: Timer 3 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 657 | * @arg TIM_SELECT_TIM4: Timer 4 Input Captures to be routed. |
Kojto | 112:6f327212ef96 | 658 | * @param __INPUT__: selects which pin to be routed to Input Capture. |
Kojto | 112:6f327212ef96 | 659 | * This parameter must be a value of @ref RI_InputCaptureRouting |
Kojto | 112:6f327212ef96 | 660 | * @retval None. |
Kojto | 112:6f327212ef96 | 661 | */ |
Kojto | 112:6f327212ef96 | 662 | #define __HAL_RI_REMAP_INPUTCAPTURE4(__TIMSELECT__, __INPUT__) \ |
Kojto | 112:6f327212ef96 | 663 | do {assert_param(IS_RI_TIM(__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 664 | assert_param(IS_RI_INPUTCAPTURE_ROUTING(__INPUT__)); \ |
Kojto | 112:6f327212ef96 | 665 | MODIFY_REG(RI->ICR, RI_ICR_TIM, (__TIMSELECT__)); \ |
Kojto | 112:6f327212ef96 | 666 | SET_BIT(RI->ICR, RI_INPUTCAPTURE_IC4); \ |
Kojto | 112:6f327212ef96 | 667 | MODIFY_REG(RI->ICR, RI_ICR_IC4OS, (__INPUT__) << POSITION_VAL(RI_ICR_IC4OS)); \ |
Kojto | 112:6f327212ef96 | 668 | }while(0) |
Kojto | 112:6f327212ef96 | 669 | |
Kojto | 112:6f327212ef96 | 670 | /** |
Kojto | 112:6f327212ef96 | 671 | * @} |
Kojto | 112:6f327212ef96 | 672 | */ |
Kojto | 112:6f327212ef96 | 673 | |
Kojto | 112:6f327212ef96 | 674 | /** @defgroup RI_SwitchControlConfig Switch Control configuration |
Kojto | 112:6f327212ef96 | 675 | * @{ |
Kojto | 112:6f327212ef96 | 676 | */ |
Kojto | 112:6f327212ef96 | 677 | |
Kojto | 112:6f327212ef96 | 678 | /** |
Kojto | 112:6f327212ef96 | 679 | * @brief Enable or disable the switch control mode. |
Kojto | 112:6f327212ef96 | 680 | * @note ENABLE: ADC analog switches closed if the corresponding |
Kojto | 112:6f327212ef96 | 681 | * I/O switch is also closed. |
Kojto | 112:6f327212ef96 | 682 | * When using COMP1, switch control mode must be enabled. |
Kojto | 112:6f327212ef96 | 683 | * @note DISABLE: ADC analog switches open or controlled by the ADC interface. |
Kojto | 112:6f327212ef96 | 684 | * When using the ADC for acquisition, switch control mode |
Kojto | 112:6f327212ef96 | 685 | * must be disabled. |
Kojto | 112:6f327212ef96 | 686 | * @note COMP1 comparator and ADC cannot be used at the same time since |
Kojto | 112:6f327212ef96 | 687 | * they share the ADC switch matrix. |
Kojto | 112:6f327212ef96 | 688 | * @retval None |
Kojto | 112:6f327212ef96 | 689 | */ |
Kojto | 112:6f327212ef96 | 690 | #define __HAL_RI_SWITCHCONTROLMODE_ENABLE() SET_BIT(RI->ASCR1, RI_ASCR1_SCM) |
Kojto | 112:6f327212ef96 | 691 | |
Kojto | 112:6f327212ef96 | 692 | #define __HAL_RI_SWITCHCONTROLMODE_DISABLE() CLEAR_BIT(RI->ASCR1, RI_ASCR1_SCM) |
Kojto | 112:6f327212ef96 | 693 | |
Kojto | 112:6f327212ef96 | 694 | /* |
Kojto | 112:6f327212ef96 | 695 | * @brief Close or Open the routing interface Input Output switches. |
Kojto | 112:6f327212ef96 | 696 | * @param __IOSWITCH__: selects the I/O analog switch number. |
Kojto | 112:6f327212ef96 | 697 | * This parameter must be a value of @ref RI_IOSwitch |
Kojto | 112:6f327212ef96 | 698 | * @retval None |
Kojto | 112:6f327212ef96 | 699 | */ |
Kojto | 112:6f327212ef96 | 700 | #define __HAL_RI_IOSWITCH_CLOSE(__IOSWITCH__) do { assert_param(IS_RI_IOSWITCH(__IOSWITCH__)); \ |
Kojto | 112:6f327212ef96 | 701 | if ((__IOSWITCH__) >> 31 != 0 ) \ |
Kojto | 112:6f327212ef96 | 702 | { \ |
Kojto | 112:6f327212ef96 | 703 | SET_BIT(RI->ASCR1, (__IOSWITCH__) & 0x7FFFFFFF); \ |
Kojto | 112:6f327212ef96 | 704 | } \ |
Kojto | 112:6f327212ef96 | 705 | else \ |
Kojto | 112:6f327212ef96 | 706 | { \ |
Kojto | 112:6f327212ef96 | 707 | SET_BIT(RI->ASCR2, (__IOSWITCH__)); \ |
Kojto | 112:6f327212ef96 | 708 | } \ |
Kojto | 112:6f327212ef96 | 709 | }while(0) |
Kojto | 112:6f327212ef96 | 710 | |
Kojto | 112:6f327212ef96 | 711 | #define __HAL_RI_IOSWITCH_OPEN(__IOSWITCH__) do { assert_param(IS_RI_IOSWITCH(__IOSWITCH__)); \ |
Kojto | 112:6f327212ef96 | 712 | if ((__IOSWITCH__) >> 31 != 0 ) \ |
Kojto | 112:6f327212ef96 | 713 | { \ |
Kojto | 112:6f327212ef96 | 714 | CLEAR_BIT(RI->ASCR1, (__IOSWITCH__) & 0x7FFFFFFF); \ |
Kojto | 112:6f327212ef96 | 715 | } \ |
Kojto | 112:6f327212ef96 | 716 | else \ |
Kojto | 112:6f327212ef96 | 717 | { \ |
Kojto | 112:6f327212ef96 | 718 | CLEAR_BIT(RI->ASCR2, (__IOSWITCH__)); \ |
Kojto | 112:6f327212ef96 | 719 | } \ |
Kojto | 112:6f327212ef96 | 720 | }while(0) |
Kojto | 112:6f327212ef96 | 721 | |
Kojto | 112:6f327212ef96 | 722 | #if defined (COMP_CSR_SW1) |
Kojto | 112:6f327212ef96 | 723 | /** |
Kojto | 112:6f327212ef96 | 724 | * @brief Close or open the internal switch COMP1_SW1. |
Kojto | 112:6f327212ef96 | 725 | * This switch connects I/O pin PC3 (can be used as ADC channel 13) |
Kojto | 112:6f327212ef96 | 726 | * and OPAMP3 ouput to ADC switch matrix (ADC channel VCOMP, channel |
Kojto | 112:6f327212ef96 | 727 | * 26) and COMP1 non-inverting input. |
Kojto | 112:6f327212ef96 | 728 | * Pin PC3 connection depends on another switch setting, refer to |
Kojto | 112:6f327212ef96 | 729 | * macro "__HAL_ADC_CHANNEL_SPEED_FAST()". |
Kojto | 112:6f327212ef96 | 730 | * @retval None. |
Kojto | 112:6f327212ef96 | 731 | */ |
Kojto | 112:6f327212ef96 | 732 | #define __HAL_RI_SWITCH_COMP1_SW1_CLOSE() SET_BIT(COMP->CSR, COMP_CSR_SW1) |
Kojto | 112:6f327212ef96 | 733 | |
Kojto | 112:6f327212ef96 | 734 | #define __HAL_RI_SWITCH_COMP1_SW1_OPEN() CLEAR_BIT(COMP->CSR, COMP_CSR_SW1) |
Kojto | 112:6f327212ef96 | 735 | #endif /* COMP_CSR_SW1 */ |
Kojto | 112:6f327212ef96 | 736 | |
Kojto | 112:6f327212ef96 | 737 | /** |
Kojto | 112:6f327212ef96 | 738 | * @} |
Kojto | 112:6f327212ef96 | 739 | */ |
Kojto | 112:6f327212ef96 | 740 | |
Kojto | 112:6f327212ef96 | 741 | /** @defgroup RI_HystConfig Hysteresis Activation and Deactivation |
Kojto | 112:6f327212ef96 | 742 | * @{ |
Kojto | 112:6f327212ef96 | 743 | */ |
Kojto | 112:6f327212ef96 | 744 | |
Kojto | 112:6f327212ef96 | 745 | /** |
Kojto | 112:6f327212ef96 | 746 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports A |
Kojto | 112:6f327212ef96 | 747 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 748 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 749 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 750 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 751 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 752 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 753 | * @retval None |
Kojto | 112:6f327212ef96 | 754 | */ |
Kojto | 112:6f327212ef96 | 755 | #define __HAL_RI_HYSTERIS_PORTA_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 756 | CLEAR_BIT(RI->HYSCR1, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 757 | } while(0) |
Kojto | 112:6f327212ef96 | 758 | |
Kojto | 112:6f327212ef96 | 759 | #define __HAL_RI_HYSTERIS_PORTA_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 760 | SET_BIT(RI->HYSCR1, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 761 | } while(0) |
Kojto | 112:6f327212ef96 | 762 | |
Kojto | 112:6f327212ef96 | 763 | /** |
Kojto | 112:6f327212ef96 | 764 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports B |
Kojto | 112:6f327212ef96 | 765 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 766 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 767 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 768 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 769 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 770 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 771 | * @retval None |
Kojto | 112:6f327212ef96 | 772 | */ |
Kojto | 112:6f327212ef96 | 773 | #define __HAL_RI_HYSTERIS_PORTB_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 774 | CLEAR_BIT(RI->HYSCR1, (__IOPIN__) << 16 ); \ |
Kojto | 112:6f327212ef96 | 775 | } while(0) |
Kojto | 112:6f327212ef96 | 776 | |
Kojto | 112:6f327212ef96 | 777 | #define __HAL_RI_HYSTERIS_PORTB_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 778 | SET_BIT(RI->HYSCR1, (__IOPIN__) << 16 ); \ |
Kojto | 112:6f327212ef96 | 779 | } while(0) |
Kojto | 112:6f327212ef96 | 780 | |
Kojto | 112:6f327212ef96 | 781 | /** |
Kojto | 112:6f327212ef96 | 782 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports C |
Kojto | 112:6f327212ef96 | 783 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 784 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 785 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 786 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 787 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 788 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 789 | * @retval None |
Kojto | 112:6f327212ef96 | 790 | */ |
Kojto | 112:6f327212ef96 | 791 | #define __HAL_RI_HYSTERIS_PORTC_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 792 | CLEAR_BIT(RI->HYSCR2, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 793 | } while(0) |
Kojto | 112:6f327212ef96 | 794 | |
Kojto | 112:6f327212ef96 | 795 | #define __HAL_RI_HYSTERIS_PORTC_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 796 | SET_BIT(RI->HYSCR2, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 797 | } while(0) |
Kojto | 112:6f327212ef96 | 798 | |
Kojto | 112:6f327212ef96 | 799 | /** |
Kojto | 112:6f327212ef96 | 800 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports D |
Kojto | 112:6f327212ef96 | 801 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 802 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 803 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 804 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 805 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 806 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 807 | * @retval None |
Kojto | 112:6f327212ef96 | 808 | */ |
Kojto | 112:6f327212ef96 | 809 | #define __HAL_RI_HYSTERIS_PORTD_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 810 | CLEAR_BIT(RI->HYSCR2, (__IOPIN__) << 16 ); \ |
Kojto | 112:6f327212ef96 | 811 | } while(0) |
Kojto | 112:6f327212ef96 | 812 | |
Kojto | 112:6f327212ef96 | 813 | #define __HAL_RI_HYSTERIS_PORTD_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 814 | SET_BIT(RI->HYSCR2, (__IOPIN__) << 16 ); \ |
Kojto | 112:6f327212ef96 | 815 | } while(0) |
Kojto | 112:6f327212ef96 | 816 | |
Kojto | 112:6f327212ef96 | 817 | #if defined (GPIOE_BASE) |
Kojto | 112:6f327212ef96 | 818 | |
Kojto | 112:6f327212ef96 | 819 | /** |
Kojto | 112:6f327212ef96 | 820 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports E |
Kojto | 112:6f327212ef96 | 821 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 822 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 823 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 824 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 825 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 826 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 827 | * @retval None |
Kojto | 112:6f327212ef96 | 828 | */ |
Kojto | 112:6f327212ef96 | 829 | #define __HAL_RI_HYSTERIS_PORTE_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 830 | CLEAR_BIT(RI->HYSCR3, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 831 | } while(0) |
Kojto | 112:6f327212ef96 | 832 | |
Kojto | 112:6f327212ef96 | 833 | #define __HAL_RI_HYSTERIS_PORTE_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 834 | SET_BIT(RI->HYSCR3, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 835 | } while(0) |
Kojto | 112:6f327212ef96 | 836 | |
Kojto | 112:6f327212ef96 | 837 | #endif /* GPIOE_BASE */ |
Kojto | 112:6f327212ef96 | 838 | |
Kojto | 112:6f327212ef96 | 839 | #if defined(GPIOF_BASE) || defined(GPIOG_BASE) |
Kojto | 112:6f327212ef96 | 840 | |
Kojto | 112:6f327212ef96 | 841 | /** |
Kojto | 112:6f327212ef96 | 842 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports F |
Kojto | 112:6f327212ef96 | 843 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 844 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 845 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 846 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 847 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 848 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 849 | * @retval None |
Kojto | 112:6f327212ef96 | 850 | */ |
Kojto | 112:6f327212ef96 | 851 | #define __HAL_RI_HYSTERIS_PORTF_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 852 | CLEAR_BIT(RI->HYSCR3, (__IOPIN__) << 16 ); \ |
Kojto | 112:6f327212ef96 | 853 | } while(0) |
Kojto | 112:6f327212ef96 | 854 | |
Kojto | 112:6f327212ef96 | 855 | #define __HAL_RI_HYSTERIS_PORTF_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 856 | SET_BIT(RI->HYSCR3, (__IOPIN__) << 16 ); \ |
Kojto | 112:6f327212ef96 | 857 | } while(0) |
Kojto | 112:6f327212ef96 | 858 | |
Kojto | 112:6f327212ef96 | 859 | /** |
Kojto | 112:6f327212ef96 | 860 | * @brief Enable or disable Hysteresis of the input schmitt triger of Ports G |
Kojto | 112:6f327212ef96 | 861 | * When the I/Os are programmed in input mode by standard I/O port |
Kojto | 112:6f327212ef96 | 862 | * registers, the Schmitt trigger and the hysteresis are enabled by default. |
Kojto | 112:6f327212ef96 | 863 | * When hysteresis is disabled, it is possible to read the |
Kojto | 112:6f327212ef96 | 864 | * corresponding port with a trigger level of VDDIO/2. |
Kojto | 112:6f327212ef96 | 865 | * @param __IOPIN__ : Selects the pin(s) on which to enable or disable hysteresis. |
Kojto | 112:6f327212ef96 | 866 | * This parameter must be a value of @ref RI_Pin |
Kojto | 112:6f327212ef96 | 867 | * @retval None |
Kojto | 112:6f327212ef96 | 868 | */ |
Kojto | 112:6f327212ef96 | 869 | #define __HAL_RI_HYSTERIS_PORTG_ON(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 870 | CLEAR_BIT(RI->HYSCR4, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 871 | } while(0) |
Kojto | 112:6f327212ef96 | 872 | |
Kojto | 112:6f327212ef96 | 873 | #define __HAL_RI_HYSTERIS_PORTG_OFF(__IOPIN__) do {assert_param(IS_RI_PIN(__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 874 | SET_BIT(RI->HYSCR4, (__IOPIN__)); \ |
Kojto | 112:6f327212ef96 | 875 | } while(0) |
Kojto | 112:6f327212ef96 | 876 | |
Kojto | 112:6f327212ef96 | 877 | #endif /* GPIOF_BASE || GPIOG_BASE */ |
Kojto | 112:6f327212ef96 | 878 | |
Kojto | 112:6f327212ef96 | 879 | /** |
Kojto | 112:6f327212ef96 | 880 | * @} |
Kojto | 112:6f327212ef96 | 881 | */ |
Kojto | 112:6f327212ef96 | 882 | |
Kojto | 112:6f327212ef96 | 883 | /** |
Kojto | 112:6f327212ef96 | 884 | * @} |
Kojto | 112:6f327212ef96 | 885 | */ |
Kojto | 112:6f327212ef96 | 886 | |
Kojto | 112:6f327212ef96 | 887 | /** |
Kojto | 112:6f327212ef96 | 888 | * @} |
Kojto | 112:6f327212ef96 | 889 | */ |
Kojto | 112:6f327212ef96 | 890 | |
Kojto | 112:6f327212ef96 | 891 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 892 | |
Kojto | 112:6f327212ef96 | 893 | /** @addtogroup HAL_Exported_Functions |
Kojto | 112:6f327212ef96 | 894 | * @{ |
Kojto | 112:6f327212ef96 | 895 | */ |
Kojto | 112:6f327212ef96 | 896 | |
Kojto | 112:6f327212ef96 | 897 | /** @addtogroup HAL_Exported_Functions_Group1 |
Kojto | 112:6f327212ef96 | 898 | * @{ |
Kojto | 112:6f327212ef96 | 899 | */ |
Kojto | 112:6f327212ef96 | 900 | |
Kojto | 112:6f327212ef96 | 901 | /* Initialization and de-initialization functions ******************************/ |
Kojto | 112:6f327212ef96 | 902 | HAL_StatusTypeDef HAL_Init(void); |
Kojto | 112:6f327212ef96 | 903 | HAL_StatusTypeDef HAL_DeInit(void); |
Kojto | 112:6f327212ef96 | 904 | void HAL_MspInit(void); |
Kojto | 112:6f327212ef96 | 905 | void HAL_MspDeInit(void); |
Kojto | 112:6f327212ef96 | 906 | HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority); |
Kojto | 112:6f327212ef96 | 907 | |
Kojto | 112:6f327212ef96 | 908 | /** |
Kojto | 112:6f327212ef96 | 909 | * @} |
Kojto | 112:6f327212ef96 | 910 | */ |
Kojto | 112:6f327212ef96 | 911 | |
Kojto | 112:6f327212ef96 | 912 | /** @addtogroup HAL_Exported_Functions_Group2 |
Kojto | 112:6f327212ef96 | 913 | * @{ |
Kojto | 112:6f327212ef96 | 914 | */ |
Kojto | 112:6f327212ef96 | 915 | |
Kojto | 112:6f327212ef96 | 916 | /* Peripheral Control functions ************************************************/ |
Kojto | 112:6f327212ef96 | 917 | void HAL_IncTick(void); |
Kojto | 112:6f327212ef96 | 918 | void HAL_Delay(__IO uint32_t Delay); |
Kojto | 112:6f327212ef96 | 919 | uint32_t HAL_GetTick(void); |
Kojto | 112:6f327212ef96 | 920 | void HAL_SuspendTick(void); |
Kojto | 112:6f327212ef96 | 921 | void HAL_ResumeTick(void); |
Kojto | 112:6f327212ef96 | 922 | uint32_t HAL_GetHalVersion(void); |
Kojto | 112:6f327212ef96 | 923 | uint32_t HAL_GetREVID(void); |
Kojto | 112:6f327212ef96 | 924 | uint32_t HAL_GetDEVID(void); |
Kojto | 112:6f327212ef96 | 925 | void HAL_EnableDBGSleepMode(void); |
Kojto | 112:6f327212ef96 | 926 | void HAL_DisableDBGSleepMode(void); |
Kojto | 112:6f327212ef96 | 927 | void HAL_EnableDBGStopMode(void); |
Kojto | 112:6f327212ef96 | 928 | void HAL_DisableDBGStopMode(void); |
Kojto | 112:6f327212ef96 | 929 | void HAL_EnableDBGStandbyMode(void); |
Kojto | 112:6f327212ef96 | 930 | void HAL_DisableDBGStandbyMode(void); |
Kojto | 112:6f327212ef96 | 931 | |
Kojto | 112:6f327212ef96 | 932 | /** |
Kojto | 112:6f327212ef96 | 933 | * @} |
Kojto | 112:6f327212ef96 | 934 | */ |
Kojto | 112:6f327212ef96 | 935 | |
Kojto | 112:6f327212ef96 | 936 | /** |
Kojto | 112:6f327212ef96 | 937 | * @} |
Kojto | 112:6f327212ef96 | 938 | */ |
Kojto | 112:6f327212ef96 | 939 | |
Kojto | 112:6f327212ef96 | 940 | |
Kojto | 112:6f327212ef96 | 941 | /** |
Kojto | 112:6f327212ef96 | 942 | * @} |
Kojto | 112:6f327212ef96 | 943 | */ |
Kojto | 112:6f327212ef96 | 944 | |
Kojto | 112:6f327212ef96 | 945 | /** |
Kojto | 112:6f327212ef96 | 946 | * @} |
Kojto | 112:6f327212ef96 | 947 | */ |
Kojto | 112:6f327212ef96 | 948 | |
Kojto | 112:6f327212ef96 | 949 | #ifdef __cplusplus |
Kojto | 112:6f327212ef96 | 950 | } |
Kojto | 112:6f327212ef96 | 951 | #endif |
Kojto | 112:6f327212ef96 | 952 | |
Kojto | 112:6f327212ef96 | 953 | #endif /* __STM32L1xx_HAL_H */ |
Kojto | 112:6f327212ef96 | 954 | |
Kojto | 112:6f327212ef96 | 955 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |