The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Fri May 26 12:30:20 2017 +0100
Revision:
143:86740a56073b
Parent:
135:176b8275d35d
Child:
168:b9e159c1930a
Release 143 of the mbed library.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 135:176b8275d35d 1 /**
<> 135:176b8275d35d 2 ******************************************************************************
<> 135:176b8275d35d 3 * @file stm32f3xx_ll_comp.h
<> 135:176b8275d35d 4 * @author MCD Application Team
<> 135:176b8275d35d 5 * @version V1.4.0
<> 135:176b8275d35d 6 * @date 16-December-2016
<> 135:176b8275d35d 7 * @brief Header file of COMP LL module.
<> 135:176b8275d35d 8 ******************************************************************************
<> 135:176b8275d35d 9 * @attention
<> 135:176b8275d35d 10 *
<> 135:176b8275d35d 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 135:176b8275d35d 12 *
<> 135:176b8275d35d 13 * Redistribution and use in source and binary forms, with or without modification,
<> 135:176b8275d35d 14 * are permitted provided that the following conditions are met:
<> 135:176b8275d35d 15 * 1. Redistributions of source code must retain the above copyright notice,
<> 135:176b8275d35d 16 * this list of conditions and the following disclaimer.
<> 135:176b8275d35d 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 135:176b8275d35d 18 * this list of conditions and the following disclaimer in the documentation
<> 135:176b8275d35d 19 * and/or other materials provided with the distribution.
<> 135:176b8275d35d 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 135:176b8275d35d 21 * may be used to endorse or promote products derived from this software
<> 135:176b8275d35d 22 * without specific prior written permission.
<> 135:176b8275d35d 23 *
<> 135:176b8275d35d 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 135:176b8275d35d 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 135:176b8275d35d 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 135:176b8275d35d 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 135:176b8275d35d 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 135:176b8275d35d 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 135:176b8275d35d 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 135:176b8275d35d 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 135:176b8275d35d 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 135:176b8275d35d 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 135:176b8275d35d 34 *
<> 135:176b8275d35d 35 ******************************************************************************
<> 135:176b8275d35d 36 */
<> 135:176b8275d35d 37
<> 135:176b8275d35d 38 /* Define to prevent recursive inclusion -------------------------------------*/
<> 135:176b8275d35d 39 #ifndef __STM32F3xx_LL_COMP_H
<> 135:176b8275d35d 40 #define __STM32F3xx_LL_COMP_H
<> 135:176b8275d35d 41
<> 135:176b8275d35d 42 #ifdef __cplusplus
<> 135:176b8275d35d 43 extern "C" {
<> 135:176b8275d35d 44 #endif
<> 135:176b8275d35d 45
<> 135:176b8275d35d 46 /* Includes ------------------------------------------------------------------*/
<> 135:176b8275d35d 47 #include "stm32f3xx.h"
<> 135:176b8275d35d 48
<> 135:176b8275d35d 49 /** @addtogroup STM32F3xx_LL_Driver
<> 135:176b8275d35d 50 * @{
<> 135:176b8275d35d 51 */
<> 135:176b8275d35d 52
<> 135:176b8275d35d 53 /* Note: Devices of STM32F3 serie embed 1 out of 2 different comparator IP. */
<> 135:176b8275d35d 54 /* - STM32F30x, STM32F31x, STM32F32x, STM32F33x, STM32F35x, STM32F39x: */
<> 135:176b8275d35d 55 /* COMP IP from 3 to 7 instances and other specific features */
<> 135:176b8275d35d 56 /* (comparator output blanking, ...) (refer to reference manual). */
<> 135:176b8275d35d 57 /* - STM32F37x: */
<> 135:176b8275d35d 58 /* COMP IP with 2 instances */
<> 135:176b8275d35d 59 /* This file contains the drivers of these COMP IP, located in 2 area */
<> 135:176b8275d35d 60 /* delimited by compilation switches. */
<> 135:176b8275d35d 61
<> 135:176b8275d35d 62 #if defined(COMP_V1_3_0_0)
<> 135:176b8275d35d 63
<> 135:176b8275d35d 64 #if defined (COMP1) || defined (COMP2) || defined (COMP3) || defined (COMP4) || defined (COMP5) || defined (COMP6) || defined (COMP7)
<> 135:176b8275d35d 65
<> 135:176b8275d35d 66 /** @defgroup COMP_LL COMP
<> 135:176b8275d35d 67 * @{
<> 135:176b8275d35d 68 */
<> 135:176b8275d35d 69
<> 135:176b8275d35d 70 /* Private types -------------------------------------------------------------*/
<> 135:176b8275d35d 71 /* Private variables ---------------------------------------------------------*/
<> 135:176b8275d35d 72 /* Private constants ---------------------------------------------------------*/
<> 135:176b8275d35d 73 /** @defgroup COMP_LL_Private_Constants COMP Private Constants
<> 135:176b8275d35d 74 * @{
<> 135:176b8275d35d 75 */
<> 135:176b8275d35d 76
<> 135:176b8275d35d 77 /* COMP registers bits positions */
<> 135:176b8275d35d 78 #define LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS ((uint32_t)30U) /* Value equivalent to POSITION_VAL(COMPxOUT) */
<> 135:176b8275d35d 79
<> 135:176b8275d35d 80 /**
<> 135:176b8275d35d 81 * @}
<> 135:176b8275d35d 82 */
<> 135:176b8275d35d 83
<> 135:176b8275d35d 84 /* Private macros ------------------------------------------------------------*/
<> 135:176b8275d35d 85 /* Exported types ------------------------------------------------------------*/
<> 135:176b8275d35d 86 #if defined(USE_FULL_LL_DRIVER)
<> 135:176b8275d35d 87 /** @defgroup COMP_LL_ES_INIT COMP Exported Init structure
<> 135:176b8275d35d 88 * @{
<> 135:176b8275d35d 89 */
<> 135:176b8275d35d 90
<> 135:176b8275d35d 91 /**
<> 135:176b8275d35d 92 * @brief Structure definition of some features of COMP instance.
<> 135:176b8275d35d 93 */
<> 135:176b8275d35d 94 typedef struct
<> 135:176b8275d35d 95 {
<> 135:176b8275d35d 96 uint32_t PowerMode; /*!< Set comparator operating mode to adjust power and speed.
<> 135:176b8275d35d 97 This parameter can be a value of @ref COMP_LL_EC_POWERMODE
<> 135:176b8275d35d 98
<> 135:176b8275d35d 99 This feature can be modified afterwards using unitary function @ref LL_COMP_SetPowerMode(). */
<> 135:176b8275d35d 100
<> 135:176b8275d35d 101 uint32_t InputPlus; /*!< Set comparator input plus (non-inverting input).
<> 135:176b8275d35d 102 This parameter can be a value of @ref COMP_LL_EC_INPUT_PLUS
<> 135:176b8275d35d 103
<> 135:176b8275d35d 104 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputPlus(). */
<> 135:176b8275d35d 105
<> 135:176b8275d35d 106 uint32_t InputMinus; /*!< Set comparator input minus (inverting input).
<> 135:176b8275d35d 107 This parameter can be a value of @ref COMP_LL_EC_INPUT_MINUS
<> 135:176b8275d35d 108
<> 135:176b8275d35d 109 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputMinus(). */
<> 135:176b8275d35d 110
<> 135:176b8275d35d 111 uint32_t InputHysteresis; /*!< Set comparator hysteresis mode of the input minus.
<> 135:176b8275d35d 112 This parameter can be a value of @ref COMP_LL_EC_INPUT_HYSTERESIS
<> 135:176b8275d35d 113
<> 135:176b8275d35d 114 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputHysteresis(). */
<> 135:176b8275d35d 115
<> 135:176b8275d35d 116 uint32_t OutputSelection; /*!< Set comparator output selection.
<> 135:176b8275d35d 117 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_SELECTION
<> 135:176b8275d35d 118
<> 135:176b8275d35d 119 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputSelection(). */
<> 135:176b8275d35d 120
<> 135:176b8275d35d 121 uint32_t OutputPolarity; /*!< Set comparator output polarity.
<> 135:176b8275d35d 122 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_POLARITY
<> 135:176b8275d35d 123
<> 135:176b8275d35d 124 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputPolarity(). */
<> 135:176b8275d35d 125
<> 135:176b8275d35d 126 uint32_t OutputBlankingSource; /*!< Set comparator blanking source.
<> 135:176b8275d35d 127 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_BLANKING_SOURCE
<> 135:176b8275d35d 128
<> 135:176b8275d35d 129 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputBlankingSource(). */
<> 135:176b8275d35d 130
<> 135:176b8275d35d 131 } LL_COMP_InitTypeDef;
<> 135:176b8275d35d 132
<> 135:176b8275d35d 133 /**
<> 135:176b8275d35d 134 * @}
<> 135:176b8275d35d 135 */
<> 135:176b8275d35d 136 #endif /* USE_FULL_LL_DRIVER */
<> 135:176b8275d35d 137
<> 135:176b8275d35d 138 /* Exported constants --------------------------------------------------------*/
<> 135:176b8275d35d 139 /** @defgroup COMP_LL_Exported_Constants COMP Exported Constants
<> 135:176b8275d35d 140 * @{
<> 135:176b8275d35d 141 */
<> 135:176b8275d35d 142
<> 135:176b8275d35d 143 /** @defgroup COMP_LL_EC_COMMON_WINDOWMODE Comparator common modes - Window mode
<> 135:176b8275d35d 144 * @{
<> 135:176b8275d35d 145 */
<> 135:176b8275d35d 146 #define LL_COMP_WINDOWMODE_DISABLE ((uint32_t)0x00000000U) /*!< Window mode disable: Comparators 1 and 2 are independent */
<> 135:176b8275d35d 147 #if defined(COMP2_CSR_COMP2WNDWEN)
<> 135:176b8275d35d 148 #define LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP2_CSR_COMP2WNDWEN) /*!< Window mode enable: Comparators instances pair COMP1 and COMP2 have their input plus connected together. The common input is COMP1 input plus (COMP2 input plus is no more accessible). */
<> 135:176b8275d35d 149 #endif
<> 135:176b8275d35d 150 #if defined(COMP4_CSR_COMP4WNDWEN)
<> 135:176b8275d35d 151 #define LL_COMP_WINDOWMODE_COMP3_INPUT_PLUS_COMMON (COMP4_CSR_COMP4WNDWEN) /*!< Window mode enable: Comparators instances pair COMP3 and COMP4 have their input plus connected together. The common input is COMP3 input plus (COMP4 input plus is no more accessible). */
<> 135:176b8275d35d 152 #endif
<> 135:176b8275d35d 153 #if defined(COMP6_CSR_COMP6WNDWEN)
<> 135:176b8275d35d 154 #define LL_COMP_WINDOWMODE_COMP5_INPUT_PLUS_COMMON (COMP6_CSR_COMP6WNDWEN) /*!< Window mode enable: Comparators instances pair COMP5 and COMP6 have their input plus connected together. The common input is COMP5 input plus (COMP6 input plus is no more accessible). */
<> 135:176b8275d35d 155 #endif
<> 135:176b8275d35d 156 /**
<> 135:176b8275d35d 157 * @}
<> 135:176b8275d35d 158 */
<> 135:176b8275d35d 159
<> 135:176b8275d35d 160 /** @defgroup COMP_LL_EC_POWERMODE Comparator modes - Power mode
<> 135:176b8275d35d 161 * @{
<> 135:176b8275d35d 162 */
<> 135:176b8275d35d 163 #define LL_COMP_POWERMODE_HIGHSPEED ((uint32_t)0x00000000U) /*!< COMP power mode to high speed */
<> 135:176b8275d35d 164 #if defined(COMP_CSR_COMPxMODE)
<> 135:176b8275d35d 165 #define LL_COMP_POWERMODE_MEDIUMSPEED (COMP_CSR_COMPxMODE_0) /*!< COMP power mode to medium speed */
<> 135:176b8275d35d 166 #define LL_COMP_POWERMODE_LOWPOWER (COMP_CSR_COMPxMODE_1) /*!< COMP power mode to low power */
<> 135:176b8275d35d 167 #define LL_COMP_POWERMODE_ULTRALOWPOWER (COMP_CSR_COMPxMODE_1 | COMP_CSR_COMPxMODE_0) /*!< COMP power mode to ultra-low power */
<> 135:176b8275d35d 168 #endif
<> 135:176b8275d35d 169 /**
<> 135:176b8275d35d 170 * @}
<> 135:176b8275d35d 171 */
<> 135:176b8275d35d 172
<> 135:176b8275d35d 173 /** @defgroup COMP_LL_EC_INPUT_PLUS Comparator inputs - Input plus (input non-inverting) selection
<> 135:176b8275d35d 174 * @{
<> 135:176b8275d35d 175 */
<> 135:176b8275d35d 176 #if !defined(COMP_CSR_COMPxNONINSEL)
<> 135:176b8275d35d 177 #define LL_COMP_INPUT_PLUS_IO1 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, PA3 for COMP2 (except STM32F334xx: PA7), PB14 for COMP3, PB0 for COMP4, PD12 for COMP5, PD11 for COMP6, PA0 for COMP7) (COMP instance availability depends on the selected device) */
<> 135:176b8275d35d 178 #define LL_COMP_INPUT_PLUS_IO2 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO2: Same as IO1 */
<> 135:176b8275d35d 179 #else
<> 135:176b8275d35d 180 #define LL_COMP_INPUT_PLUS_IO1 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA7 for COMP2, PB14 for COMP3, PB0 for COMP4, PD12 for COMP5, PD11 for COMP6, PA0 for COMP7) (COMP instance availability depends on the selected device) */
<> 135:176b8275d35d 181 #define LL_COMP_INPUT_PLUS_IO2 (COMP_CSR_COMPxNONINSEL) /*!< Comparator input plus connected to IO2 (pin PA3 for COMP2, PD14 for COMP3, PE7 for COMP4, PB13 for COMP5, PB11 for COMP6, PC1 for COMP7) (COMP instance availability depends on the selected device) */
<> 135:176b8275d35d 182 #endif
<> 135:176b8275d35d 183 #if defined(STM32F302xC) || defined(STM32F302xE) || defined(STM32F303xC) || defined(STM32F303xE) || defined(STM32F358xx) || defined(STM32F398xx)
<> 135:176b8275d35d 184 #define LL_COMP_INPUT_PLUS_DAC1_CH1_COMP1 (COMP_CSR_COMPxSW1) /*!< Comparator input plus connected to DAC1 channel 1 (DAC_OUT1), through dedicated switch (Note: this switch is solely intended to redirect signals onto high impedance input, such as COMP1 input plus (highly resistive switch)) (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 185
<> 135:176b8275d35d 186 /* Note: Comparator input plus specific to COMP instances, defined with */
<> 135:176b8275d35d 187 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 188 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 189 #define LL_COMP_INPUT_PLUS_DAC1_CH1 LL_COMP_INPUT_PLUS_DAC1_CH1_COMP1 /*!< Comparator input plus connected to DAC1 channel 1 (DAC_OUT1), through dedicated switch. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 190
<> 135:176b8275d35d 191 #elif defined(STM32F301x8) || defined(STM32F318xx) || defined(STM32F302x8)
<> 135:176b8275d35d 192 #define LL_COMP_INPUT_PLUS_DAC1_CH1_COMP2 (COMP_CSR_COMPxSW1) /*!< Comparator input plus connected to DAC1 channel 1 (DAC_OUT1), through dedicated switch (Note: this switch is solely intended to redirect signals onto high impedance input, such as COMP2 input plus (highly resistive switch)) (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 193
<> 135:176b8275d35d 194 /* Note: Comparator input plus specific to COMP instances, defined with */
<> 135:176b8275d35d 195 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 196 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 197 #define LL_COMP_INPUT_PLUS_DAC1_CH1 LL_COMP_INPUT_PLUS_DAC1_CH1_COMP2 /*!< Comparator input plus connected to DAC1 channel 1 (DAC_OUT1), through dedicated switch. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 198
<> 135:176b8275d35d 199 #endif
<> 135:176b8275d35d 200 /**
<> 135:176b8275d35d 201 * @}
<> 135:176b8275d35d 202 */
<> 135:176b8275d35d 203
<> 135:176b8275d35d 204 /** @defgroup COMP_LL_EC_INPUT_MINUS Comparator inputs - Input minus (input inverting) selection
<> 135:176b8275d35d 205 * @{
<> 135:176b8275d35d 206 */
<> 135:176b8275d35d 207 #define LL_COMP_INPUT_MINUS_1_4VREFINT ((uint32_t)0x00000000U) /*!< Comparator input minus connected to 1/4 VrefInt */
<> 135:176b8275d35d 208 #define LL_COMP_INPUT_MINUS_1_2VREFINT ( COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to 1/2 VrefInt */
<> 135:176b8275d35d 209 #define LL_COMP_INPUT_MINUS_3_4VREFINT ( COMP_CSR_COMPxINSEL_1 ) /*!< Comparator input minus connected to 3/4 VrefInt */
<> 135:176b8275d35d 210 #define LL_COMP_INPUT_MINUS_VREFINT ( COMP_CSR_COMPxINSEL_1 | COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to VrefInt */
<> 135:176b8275d35d 211 #define LL_COMP_INPUT_MINUS_DAC1_CH1 (COMP_CSR_COMPxINSEL_2 ) /*!< Comparator input minus connected to DAC1 channel 1 (DAC_OUT1) */
<> 135:176b8275d35d 212 #if defined(STM32F301x8) || defined(STM32F318xx) || defined(STM32F302x8) || defined(STM32F302xC) || defined(STM32F302xE)
<> 135:176b8275d35d 213 /* This device has no comparator input minus DAC1_CH2 */
<> 135:176b8275d35d 214 #else
<> 135:176b8275d35d 215 #define LL_COMP_INPUT_MINUS_DAC1_CH2 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to DAC1 channel 2 (DAC_OUT2) */
<> 135:176b8275d35d 216 #endif
<> 135:176b8275d35d 217 #if defined(STM32F301x8) || defined(STM32F318xx) || defined(STM32F334x8)
<> 135:176b8275d35d 218 #define LL_COMP_INPUT_MINUS_IO1 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PA2 for COMP2) */
<> 135:176b8275d35d 219 #else
<> 135:176b8275d35d 220 #define LL_COMP_INPUT_MINUS_IO1 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PA0 for COMP1, pin PA2 for COMP2, PD15 for COMP3, PE8 for COMP4, PD13 for COMP5, PD10 for COMP6, PC0 for COMP7 (COMP instance availability depends on the selected device)) */
<> 135:176b8275d35d 221 #endif
<> 135:176b8275d35d 222 #define LL_COMP_INPUT_MINUS_IO2 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_1 | COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to IO2 ( PB12 for COMP3, PB2 for COMP4, PB10 for COMP5, PB15 for COMP6 (COMP instance availability depends on the selected device)) */
<> 135:176b8275d35d 223 #if defined(STM32F301x8) || defined(STM32F318xx) || defined(STM32F334x8) || defined(STM32F302x8) || defined(STM32F303x8) || defined(STM32F328xx)
<> 135:176b8275d35d 224 /* This device has no comparator input minus IO3 */
<> 135:176b8275d35d 225 #else
<> 135:176b8275d35d 226 #define LL_COMP_INPUT_MINUS_IO3 (COMP_CSR_COMPxINSEL_2 | COMP_CSR_COMPxINSEL_0) /*!< Comparator input minus connected to IO3 (pin PA5 for COMP1/2/3/4/5/6/7 (COMP instance availability depends on the selected device)) */
<> 135:176b8275d35d 227 #endif
<> 135:176b8275d35d 228 #define LL_COMP_INPUT_MINUS_IO4 (COMP_CSR_COMPxINSEL_2 ) /*!< Comparator input minus connected to IO4 (pin PA4 for COMP1/2/3/4/5/6/7 (COMP instance availability depends on the selected device)) */
<> 135:176b8275d35d 229 #if defined(STM32F303x8) || defined(STM32F328xx) || defined(STM32F334x8)
<> 135:176b8275d35d 230 #define LL_COMP_INPUT_MINUS_DAC2_CH1 (COMP_CSR_COMPxINSEL_3 ) /*!< Comparator input minus connected to DAC2 channel 1 (DAC2_OUT1) */
<> 135:176b8275d35d 231 #else
<> 135:176b8275d35d 232 /* This device has no comparator input minus DAC2_CH1 */
<> 135:176b8275d35d 233 #endif
<> 135:176b8275d35d 234 /**
<> 135:176b8275d35d 235 * @}
<> 135:176b8275d35d 236 */
<> 135:176b8275d35d 237
<> 135:176b8275d35d 238 /** @defgroup COMP_LL_EC_INPUT_HYSTERESIS Comparator input - Hysteresis
<> 135:176b8275d35d 239 * @{
<> 135:176b8275d35d 240 */
<> 135:176b8275d35d 241 #define LL_COMP_HYSTERESIS_NONE ((uint32_t)0x00000000U) /*!< No hysteresis */
<> 135:176b8275d35d 242 #if defined(COMP_CSR_COMPxHYST)
<> 135:176b8275d35d 243 #define LL_COMP_HYSTERESIS_LOW ( COMP_CSR_COMPxHYST_0) /*!< Hysteresis level low (available only on devices: STM32F303xB/C, STM32F358xC) */
<> 135:176b8275d35d 244 #define LL_COMP_HYSTERESIS_MEDIUM (COMP_CSR_COMPxHYST_1 ) /*!< Hysteresis level medium (available only on devices: STM32F303xB/C, STM32F358xC) */
<> 135:176b8275d35d 245 #define LL_COMP_HYSTERESIS_HIGH (COMP_CSR_COMPxHYST_1 | COMP_CSR_COMPxHYST_0) /*!< Hysteresis level high (available only on devices: STM32F303xB/C, STM32F358xC) */
<> 135:176b8275d35d 246 #endif
<> 135:176b8275d35d 247 /**
<> 135:176b8275d35d 248 * @}
<> 135:176b8275d35d 249 */
<> 135:176b8275d35d 250
<> 135:176b8275d35d 251 /** @defgroup COMP_LL_EC_OUTPUT_SELECTION Comparator output - Output selection
<> 135:176b8275d35d 252 * @{
<> 135:176b8275d35d 253 */
<> 135:176b8275d35d 254 #define LL_COMP_OUTPUT_NONE ((uint32_t)0x00000000) /*!< COMP output is not connected to other peripherals (except GPIO and EXTI that are always connected to COMP output) (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 255 #if defined(COMP_CSR_COMPxOUT)
<> 135:176b8275d35d 256 /* Note: Output redirection common to all COMP instances, all STM32F3 serie */
<> 135:176b8275d35d 257 /* devices. */
<> 135:176b8275d35d 258 #define LL_COMP_OUTPUT_TIM1_BKIN (COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM1 break input (BKIN) */
<> 135:176b8275d35d 259 #define LL_COMP_OUTPUT_TIM1_BKIN2 (COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM1 break input 2 (BKIN2) */
<> 135:176b8275d35d 260
<> 135:176b8275d35d 261 #if defined(STM32F301x8) || defined(STM32F318xx)
<> 135:176b8275d35d 262 /* Note: Output redirection specific to COMP instance: COMP2 */
<> 135:176b8275d35d 263 #define LL_COMP_OUTPUT_TIM1_IC1_COMP2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM1 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 264 #define LL_COMP_OUTPUT_TIM2_IC4_COMP2 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM1 input capture 4 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 265 #define LL_COMP_OUTPUT_TIM1_OCCLR_COMP2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM1 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 266 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 267 /* Note: Output redirection specific to COMP instance: COMP4 */
<> 135:176b8275d35d 268 #define LL_COMP_OUTPUT_TIM15_IC2_COMP4 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM15 input capture 1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 269 #define LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM15 OCREF clear (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 270 /* Note: Output redirection specific to COMP instance: COMP6 */
<> 135:176b8275d35d 271 #define LL_COMP_OUTPUT_TIM2_IC2_COMP6 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM2 input capture 2 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 272 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 273 #define LL_COMP_OUTPUT_TIM16_IC1_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM16 input capture 1 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 274 #define LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM16 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 275
<> 135:176b8275d35d 276 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 277 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 278 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 279 /* Note: Some output redirections cannot have a generic naming, */
<> 135:176b8275d35d 280 /* due to literal value different depending on COMP instance. */
<> 135:176b8275d35d 281 /* (For exemple: LL_COMP_OUTPUT_TIM2_OCCLR_COMP2 and */
<> 135:176b8275d35d 282 /* LL_COMP_OUTPUT_TIM2_OCCLR_COMP6). */
<> 135:176b8275d35d 283 #define LL_COMP_OUTPUT_TIM1_IC1 LL_COMP_OUTPUT_TIM1_IC1_COMP2 /*!< COMP output connected to TIM1 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 284 #define LL_COMP_OUTPUT_TIM1_OCCLR LL_COMP_OUTPUT_TIM1_OCCLR_COMP2 /*!< COMP output connected to TIM1 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 285 #define LL_COMP_OUTPUT_TIM2_IC2 LL_COMP_OUTPUT_TIM2_IC2_COMP6 /*!< COMP output connected to TIM2 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 286 #define LL_COMP_OUTPUT_TIM2_IC4 LL_COMP_OUTPUT_TIM2_IC4_COMP2 /*!< COMP output connected to TIM2 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 287 #define LL_COMP_OUTPUT_TIM15_IC2 LL_COMP_OUTPUT_TIM15_IC2_COMP4 /*!< COMP output connected to TIM15 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 288 #define LL_COMP_OUTPUT_TIM15_OCCLR LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 /*!< COMP output connected to TIM15 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 289 #define LL_COMP_OUTPUT_TIM16_IC1 LL_COMP_OUTPUT_TIM16_IC1_COMP6 /*!< COMP output connected to TIM16 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 290 #define LL_COMP_OUTPUT_TIM16_OCCLR LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 /*!< COMP output connected to TIM16 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 291 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 292 /* partially generic naming grouping COMP instance constraints. */
<> 135:176b8275d35d 293 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 294 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 LL_COMP_OUTPUT_TIM2_OCCLR_COMP2 /*!< COMP output connected to TIM2 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 295
<> 135:176b8275d35d 296 #elif defined(STM32F303x8) || defined(STM32F328xx) || defined(STM32F334x8)|| defined(STM32F302x8)
<> 135:176b8275d35d 297 /* Note: Output redirection specific to COMP instance: COMP2, COMP4 */
<> 135:176b8275d35d 298 #define LL_COMP_OUTPUT_TIM3_OCCLR_COMP2_4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM3 OCREF clear (specific to COMP instance: COMP2, COMP4) */
<> 135:176b8275d35d 299 /* Note: Output redirection specific to COMP instance: COMP2 */
<> 135:176b8275d35d 300 #define LL_COMP_OUTPUT_TIM1_IC1_COMP2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM1 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 301 #define LL_COMP_OUTPUT_TIM2_IC4_COMP2 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM1 input capture 4 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 302 #define LL_COMP_OUTPUT_TIM1_OCCLR_COMP2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM1 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 303 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 304 #define LL_COMP_OUTPUT_TIM3_IC1_COMP2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM3 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 305 /* Note: Output redirection specific to COMP instance: COMP4 */
<> 135:176b8275d35d 306 #define LL_COMP_OUTPUT_TIM3_IC3_COMP4 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM3 input capture 3 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 307 #define LL_COMP_OUTPUT_TIM15_IC2_COMP4 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM15 input capture 1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 308 #define LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM15 OCREF clear (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 309 /* Note: Output redirection specific to COMP instance: COMP6 */
<> 135:176b8275d35d 310 #define LL_COMP_OUTPUT_TIM2_IC2_COMP6 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM2 input capture 2 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 311 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 312 #define LL_COMP_OUTPUT_TIM16_IC1_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM16 input capture 1 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 313 #define LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM16 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 314
<> 135:176b8275d35d 315 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 316 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 317 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 318 /* Note: Some output redirections cannot have a generic naming, */
<> 135:176b8275d35d 319 /* due to literal value different depending on COMP instance. */
<> 135:176b8275d35d 320 /* (For exemple: LL_COMP_OUTPUT_TIM2_OCCLR_COMP2 and */
<> 135:176b8275d35d 321 /* LL_COMP_OUTPUT_TIM2_OCCLR_COMP6). */
<> 135:176b8275d35d 322 #define LL_COMP_OUTPUT_TIM1_IC1 LL_COMP_OUTPUT_TIM1_IC1_COMP2 /*!< COMP output connected to TIM1 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 323 #define LL_COMP_OUTPUT_TIM1_OCCLR LL_COMP_OUTPUT_TIM1_OCCLR_COMP2 /*!< COMP output connected to TIM1 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 324 #define LL_COMP_OUTPUT_TIM2_IC2 LL_COMP_OUTPUT_TIM2_IC2_COMP6 /*!< COMP output connected to TIM2 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 325 #define LL_COMP_OUTPUT_TIM2_IC4 LL_COMP_OUTPUT_TIM2_IC4_COMP2 /*!< COMP output connected to TIM2 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 326 #define LL_COMP_OUTPUT_TIM3_IC1 LL_COMP_OUTPUT_TIM3_IC1_COMP2 /*!< COMP output connected to TIM3 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 327 #define LL_COMP_OUTPUT_TIM3_IC3 LL_COMP_OUTPUT_TIM3_IC3_COMP4 /*!< COMP output connected to TIM3 input capture 3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 328 #define LL_COMP_OUTPUT_TIM3_OCCLR LL_COMP_OUTPUT_TIM3_OCCLR_COMP2_4 /*!< COMP output connected to TIM3 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 329 #define LL_COMP_OUTPUT_TIM15_IC2 LL_COMP_OUTPUT_TIM15_IC2_COMP4 /*!< COMP output connected to TIM15 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 330 #define LL_COMP_OUTPUT_TIM15_OCCLR LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 /*!< COMP output connected to TIM15 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 331 #define LL_COMP_OUTPUT_TIM16_IC1 LL_COMP_OUTPUT_TIM16_IC1_COMP6 /*!< COMP output connected to TIM16 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 332 #define LL_COMP_OUTPUT_TIM16_OCCLR LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 /*!< COMP output connected to TIM16 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 333 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 334 /* partially generic naming grouping COMP instance constraints. */
<> 135:176b8275d35d 335 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 336 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 LL_COMP_OUTPUT_TIM2_OCCLR_COMP2 /*!< COMP output connected to TIM2 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 337
<> 135:176b8275d35d 338 #elif defined(STM32F302xC) || defined(STM32F302xE)
<> 135:176b8275d35d 339 /* Note: Output redirection specific to COMP instance: COMP1, COMP2, COMP4 */
<> 135:176b8275d35d 340 #define LL_COMP_OUTPUT_TIM3_OCCLR_COMP1_2_4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM3 OCREF clear (specific to COMP instance: COMP2, COMP4) */
<> 135:176b8275d35d 341 /* Note: Output redirection specific to COMP instance: COMP1, COMP2 */
<> 135:176b8275d35d 342 #define LL_COMP_OUTPUT_TIM1_IC1_COMP1_2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM1 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 343 #define LL_COMP_OUTPUT_TIM2_IC4_COMP1_2 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM2 input capture 4 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 344 #define LL_COMP_OUTPUT_TIM1_OCCLR_COMP1_2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM1 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 345 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 346 #define LL_COMP_OUTPUT_TIM3_IC1_COMP1_2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM3 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 347 /* Note: Output redirection specific to COMP instance: COMP4 */
<> 135:176b8275d35d 348 #define LL_COMP_OUTPUT_TIM3_IC3_COMP4 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM3 input capture 3 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 349 #define LL_COMP_OUTPUT_TIM4_IC2_COMP4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM4 input capture 2 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 350 #define LL_COMP_OUTPUT_TIM15_IC2_COMP4 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM15 input capture 1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 351 #define LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM15 OCREF clear (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 352 /* Note: Output redirection specific to COMP instance: COMP6 */
<> 135:176b8275d35d 353 #define LL_COMP_OUTPUT_TIM2_IC2_COMP6 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM2 input capture 2 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 354 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 355 #define LL_COMP_OUTPUT_TIM4_IC4_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM4 input capture 4 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 356 #define LL_COMP_OUTPUT_TIM16_IC1_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM16 input capture 1 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 357 #define LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM16 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 358
<> 135:176b8275d35d 359 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 360 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 361 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 362 /* Note: Some output redirections cannot have a generic naming, */
<> 135:176b8275d35d 363 /* due to literal value different depending on COMP instance. */
<> 135:176b8275d35d 364 /* (For exemple: LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2 and */
<> 135:176b8275d35d 365 /* LL_COMP_OUTPUT_TIM2_OCCLR_COMP6). */
<> 135:176b8275d35d 366 #define LL_COMP_OUTPUT_TIM1_IC1 LL_COMP_OUTPUT_TIM1_IC1_COMP1_2 /*!< COMP output connected to TIM1 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 367 #define LL_COMP_OUTPUT_TIM1_OCCLR LL_COMP_OUTPUT_TIM1_OCCLR_COMP1_2 /*!< COMP output connected to TIM1 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 368 #define LL_COMP_OUTPUT_TIM2_IC2 LL_COMP_OUTPUT_TIM2_IC2_COMP6 /*!< COMP output connected to TIM2 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 369 #define LL_COMP_OUTPUT_TIM2_IC4 LL_COMP_OUTPUT_TIM2_IC4_COMP1_2 /*!< COMP output connected to TIM2 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 370 #define LL_COMP_OUTPUT_TIM3_IC1 LL_COMP_OUTPUT_TIM3_IC1_COMP1_2 /*!< COMP output connected to TIM3 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 371 #define LL_COMP_OUTPUT_TIM3_IC3 LL_COMP_OUTPUT_TIM3_IC3_COMP4 /*!< COMP output connected to TIM3 input capture 3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 372 #define LL_COMP_OUTPUT_TIM3_OCCLR LL_COMP_OUTPUT_TIM3_OCCLR_COMP1_2_4 /*!< COMP output connected to TIM3 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 373 #define LL_COMP_OUTPUT_TIM4_IC2 LL_COMP_OUTPUT_TIM4_IC2_COMP4 /*!< COMP output connected to TIM4 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 374 #define LL_COMP_OUTPUT_TIM4_IC4 LL_COMP_OUTPUT_TIM4_IC4_COMP6 /*!< COMP output connected to TIM4 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 375 #define LL_COMP_OUTPUT_TIM15_IC2 LL_COMP_OUTPUT_TIM15_IC2_COMP4 /*!< COMP output connected to TIM15 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 376 #define LL_COMP_OUTPUT_TIM15_OCCLR LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 /*!< COMP output connected to TIM15 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 377 #define LL_COMP_OUTPUT_TIM16_IC1 LL_COMP_OUTPUT_TIM16_IC1_COMP6 /*!< COMP output connected to TIM16 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 378 #define LL_COMP_OUTPUT_TIM16_OCCLR LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 /*!< COMP output connected to TIM16 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 379 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 380 /* partially generic naming grouping COMP instance constraints. */
<> 135:176b8275d35d 381 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 382 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2 /*!< COMP output connected to TIM2 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 383
<> 135:176b8275d35d 384 #elif defined(STM32F303xC) || defined(STM32F358xx) || defined(STM32F303xE) || defined(STM32F398xx)
<> 135:176b8275d35d 385 /* Note: Output redirection common to all COMP instances */
<> 135:176b8275d35d 386 #define LL_COMP_OUTPUT_TIM8_BKIN (COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM8 break input (BKIN) */
<> 135:176b8275d35d 387 #define LL_COMP_OUTPUT_TIM8_BKIN2 (COMP_CSR_COMPxOUTSEL_2) /*!< COMP output connected to TIM8 break input 2 (BKIN2) */
<> 135:176b8275d35d 388 #define LL_COMP_OUTPUT_TIM1_TIM8_BKIN2 (COMP_CSR_COMPxOUTSEL_2| COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM1 break input 2 and TIM8 break input 2 (BKIN2) */
<> 135:176b8275d35d 389 #if defined(STM32F303xE) || defined(STM32F398xx)
<> 135:176b8275d35d 390 #define LL_COMP_OUTPUT_TIM20_BKIN (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_2) /*!< COMP output connected to TIM8 break input (BKIN) */
<> 135:176b8275d35d 391 #define LL_COMP_OUTPUT_TIM20_BKIN2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM8 break input 2 (BKIN2) */
<> 135:176b8275d35d 392 #define LL_COMP_OUTPUT_TIM1_TIM8_TIM20_BKIN2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_2| COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM1 break input 2, TIM8 break input 2 and TIM20 break input 2 (BKIN2) */
<> 135:176b8275d35d 393 #endif
<> 135:176b8275d35d 394 /* Note: Output redirection specific to COMP instance: COMP1, COMP2, COMP3, COMP7 */
<> 135:176b8275d35d 395 #define LL_COMP_OUTPUT_TIM1_OCCLR_COMP1_2_3_7 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM1 OCREF clear (specific to COMP instance: COMP1, COMP2, COMP3, COMP7) */
<> 135:176b8275d35d 396 /* Note: Output redirection specific to COMP instance: COMP1, COMP2, COMP3 */
<> 135:176b8275d35d 397 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP1, COMP2, COMP3) */
<> 135:176b8275d35d 398 /* Note: Output redirection specific to COMP instance: COMP1, COMP2, COMP4, COMP5 */
<> 135:176b8275d35d 399 #define LL_COMP_OUTPUT_TIM3_OCCLR_COMP1_2_4_5 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM3 OCREF clear (specific to COMP instance: COMP1, COMP2, COMP4, COMP5) */
<> 135:176b8275d35d 400 /* Note: Output redirection specific to COMP instance: COMP4, COMP5, COMP6, COMP7 */
<> 135:176b8275d35d 401 #define LL_COMP_OUTPUT_TIM8_OCCLR_COMP4_5_6_7 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM8 OCREF clear (specific to COMP instance: COMP4, COMP5, COMP6, COMP7) */
<> 135:176b8275d35d 402 /* Note: Output redirection specific to COMP instance: COMP1, COMP2 */
<> 135:176b8275d35d 403 #define LL_COMP_OUTPUT_TIM1_IC1_COMP1_2 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM1 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 404 #define LL_COMP_OUTPUT_TIM2_IC4_COMP1_2 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM2 input capture 4 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 405 #define LL_COMP_OUTPUT_TIM3_IC1_COMP1_2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM3 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 406 #if defined(STM32F303xE) || defined(STM32F398xx)
<> 135:176b8275d35d 407 #define LL_COMP_OUTPUT_TIM20_OCCLR_COMP2 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM20 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 408 #endif
<> 135:176b8275d35d 409 /* Note: Output redirection specific to COMP instance: COMP3 */
<> 135:176b8275d35d 410 #define LL_COMP_OUTPUT_TIM3_IC2_COMP3 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM3 input capture 2 (specific to COMP instance: COMP3) */
<> 135:176b8275d35d 411 #define LL_COMP_OUTPUT_TIM4_IC1_COMP3 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM4 input capture 1 (specific to COMP instance: COMP3) */
<> 135:176b8275d35d 412 #define LL_COMP_OUTPUT_TIM15_IC1_COMP3 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM15 input capture 1 (specific to COMP instance: COMP3) */
<> 135:176b8275d35d 413 #define LL_COMP_OUTPUT_TIM15_BKIN_COMP3 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM15 break input (BKIN) */
<> 135:176b8275d35d 414 /* Note: Output redirection specific to COMP instance: COMP4 */
<> 135:176b8275d35d 415 #define LL_COMP_OUTPUT_TIM3_IC3_COMP4 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM3 input capture 3 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 416 #define LL_COMP_OUTPUT_TIM4_IC2_COMP4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM4 input capture 2 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 417 #define LL_COMP_OUTPUT_TIM15_IC2_COMP4 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM15 input capture 1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 418 #define LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM15 OCREF clear (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 419 /* Note: Output redirection specific to COMP instance: COMP5 */
<> 135:176b8275d35d 420 #define LL_COMP_OUTPUT_TIM2_IC1_COMP5 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM2 input capture 1 (specific to COMP instance: COMP5) */
<> 135:176b8275d35d 421 #define LL_COMP_OUTPUT_TIM4_IC3_COMP5 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM4 input capture 3 (specific to COMP instance: COMP5) */
<> 135:176b8275d35d 422 #define LL_COMP_OUTPUT_TIM17_IC1_COMP5 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM17 input capture 1 (specific to COMP instance: COMP5) */
<> 135:176b8275d35d 423 #define LL_COMP_OUTPUT_TIM16_BKIN_COMP5 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM16 break input (BKIN) */
<> 135:176b8275d35d 424 /* Note: Output redirection specific to COMP instance: COMP6 */
<> 135:176b8275d35d 425 #define LL_COMP_OUTPUT_TIM2_IC2_COMP6 (COMP_CSR_COMPxOUTSEL_2 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM2 input capture 2 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 426 #define LL_COMP_OUTPUT_TIM2_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM2 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 427 #define LL_COMP_OUTPUT_TIM4_IC4_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM4 input capture 4 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 428 #define LL_COMP_OUTPUT_TIM16_IC1_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM16 input capture 1 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 429 #define LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM16 OCREF clear (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 430 /* Note: Output redirection specific to COMP instance: COMP7 */
<> 135:176b8275d35d 431 #define LL_COMP_OUTPUT_TIM1_IC2_COMP7 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM2 input capture 1 (specific to COMP instance: COMP7) */
<> 135:176b8275d35d 432 #define LL_COMP_OUTPUT_TIM2_IC3_COMP7 (COMP_CSR_COMPxOUTSEL_3) /*!< COMP output connected to TIM4 input capture 3 (specific to COMP instance: COMP7) */
<> 135:176b8275d35d 433 #define LL_COMP_OUTPUT_TIM17_OCCLR_COMP7 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1) /*!< COMP output connected to TIM17 OCREF clear (specific to COMP instance: COMP7) */
<> 135:176b8275d35d 434 #define LL_COMP_OUTPUT_TIM17_BKIN_COMP7 (COMP_CSR_COMPxOUTSEL_3 | COMP_CSR_COMPxOUTSEL_1 | COMP_CSR_COMPxOUTSEL_0) /*!< COMP output connected to TIM17 break input (BKIN) */
<> 135:176b8275d35d 435
<> 135:176b8275d35d 436 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 437 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 438 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 439 /* Note: Some output redirections cannot have a generic naming, */
<> 135:176b8275d35d 440 /* due to literal value different depending on COMP instance. */
<> 135:176b8275d35d 441 /* (For exemple: LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 and */
<> 135:176b8275d35d 442 /* LL_COMP_OUTPUT_TIM2_OCCLR_COMP6). */
<> 135:176b8275d35d 443 #define LL_COMP_OUTPUT_TIM1_IC1 LL_COMP_OUTPUT_TIM1_IC1_COMP1_2 /*!< COMP output connected to TIM1 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 444 #define LL_COMP_OUTPUT_TIM1_IC2 LL_COMP_OUTPUT_TIM1_IC2_COMP7 /*!< COMP output connected to TIM2 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 445 #define LL_COMP_OUTPUT_TIM1_OCCLR LL_COMP_OUTPUT_TIM1_OCCLR_COMP1_2_3_7 /*!< COMP output connected to TIM1 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 446 #define LL_COMP_OUTPUT_TIM2_IC1 LL_COMP_OUTPUT_TIM2_IC1_COMP5 /*!< COMP output connected to TIM2 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 447 #define LL_COMP_OUTPUT_TIM2_IC2 LL_COMP_OUTPUT_TIM2_IC2_COMP6 /*!< COMP output connected to TIM2 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 448 #define LL_COMP_OUTPUT_TIM2_IC3 LL_COMP_OUTPUT_TIM2_IC3_COMP7 /*!< COMP output connected to TIM4 input capture 3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 449 #define LL_COMP_OUTPUT_TIM2_IC4 LL_COMP_OUTPUT_TIM2_IC4_COMP1_2 /*!< COMP output connected to TIM2 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 450 #define LL_COMP_OUTPUT_TIM3_IC1 LL_COMP_OUTPUT_TIM3_IC1_COMP1_2 /*!< COMP output connected to TIM3 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 451 #define LL_COMP_OUTPUT_TIM3_IC2 LL_COMP_OUTPUT_TIM3_IC2_COMP3 /*!< COMP output connected to TIM3 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 452 #define LL_COMP_OUTPUT_TIM3_IC3 LL_COMP_OUTPUT_TIM3_IC3_COMP4 /*!< COMP output connected to TIM3 input capture 3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 453 #define LL_COMP_OUTPUT_TIM3_OCCLR LL_COMP_OUTPUT_TIM3_OCCLR_COMP1_2_4_5 /*!< COMP output connected to TIM3 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 454 #define LL_COMP_OUTPUT_TIM4_IC1 LL_COMP_OUTPUT_TIM4_IC1_COMP3 /*!< COMP output connected to TIM4 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 455 #define LL_COMP_OUTPUT_TIM4_IC2 LL_COMP_OUTPUT_TIM4_IC2_COMP4 /*!< COMP output connected to TIM4 input capture 2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 456 #define LL_COMP_OUTPUT_TIM4_IC3 LL_COMP_OUTPUT_TIM4_IC3_COMP5 /*!< COMP output connected to TIM4 input capture 3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 457 #define LL_COMP_OUTPUT_TIM4_IC4 LL_COMP_OUTPUT_TIM4_IC4_COMP6 /*!< COMP output connected to TIM4 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 458 #define LL_COMP_OUTPUT_TIM8_OCCLR LL_COMP_OUTPUT_TIM8_OCCLR_COMP4_5_6_7 /*!< COMP output connected to TIM8 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 459 #define LL_COMP_OUTPUT_TIM15_IC1 LL_COMP_OUTPUT_TIM15_IC1_COMP3 /*!< COMP output connected to TIM15 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 460 #define LL_COMP_OUTPUT_TIM15_IC2 LL_COMP_OUTPUT_TIM15_IC2_COMP4 /*!< COMP output connected to TIM15 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 461 #define LL_COMP_OUTPUT_TIM15_BKIN LL_COMP_OUTPUT_TIM15_BKIN_COMP3 /*!< COMP output connected to TIM15 break input (BKIN). Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 462 #define LL_COMP_OUTPUT_TIM15_OCCLR LL_COMP_OUTPUT_TIM15_OCCLR_COMP4 /*!< COMP output connected to TIM15 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 463 #define LL_COMP_OUTPUT_TIM16_IC1 LL_COMP_OUTPUT_TIM16_IC1_COMP6 /*!< COMP output connected to TIM16 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 464 #define LL_COMP_OUTPUT_TIM16_BKIN LL_COMP_OUTPUT_TIM16_BKIN_COMP5 /*!< COMP output connected to TIM16 break input (BKIN). Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 465 #define LL_COMP_OUTPUT_TIM16_OCCLR LL_COMP_OUTPUT_TIM16_OCCLR_COMP6 /*!< COMP output connected to TIM16 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 466 #define LL_COMP_OUTPUT_TIM17_IC1 LL_COMP_OUTPUT_TIM17_IC1_COMP5 /*!< COMP output connected to TIM17 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 467 #define LL_COMP_OUTPUT_TIM17_BKIN LL_COMP_OUTPUT_TIM17_BKIN_COMP7 /*!< COMP output connected to TIM17 break input (BKIN). Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 468 #define LL_COMP_OUTPUT_TIM17_OCCLR LL_COMP_OUTPUT_TIM17_OCCLR_COMP7 /*!< COMP output connected to TIM17 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 469 #if defined(STM32F303xE) || defined(STM32F398xx)
<> 135:176b8275d35d 470 #define LL_COMP_OUTPUT_TIM20_OCCLR LL_COMP_OUTPUT_TIM20_OCCLR_COMP2 /*!< COMP output connected to TIM20 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 471 #endif
<> 135:176b8275d35d 472
<> 135:176b8275d35d 473 #endif
<> 135:176b8275d35d 474 #endif
<> 135:176b8275d35d 475 /**
<> 135:176b8275d35d 476 * @}
<> 135:176b8275d35d 477 */
<> 135:176b8275d35d 478
<> 135:176b8275d35d 479 /** @defgroup COMP_LL_EC_OUTPUT_POLARITY Comparator output - Output polarity
<> 135:176b8275d35d 480 * @{
<> 135:176b8275d35d 481 */
<> 135:176b8275d35d 482 #define LL_COMP_OUTPUTPOL_NONINVERTED ((uint32_t)0x00000000U) /*!< COMP output polarity is not inverted: comparator output is high when the plus (non-inverting) input is at a higher voltage than the minus (inverting) input */
<> 135:176b8275d35d 483 #define LL_COMP_OUTPUTPOL_INVERTED (COMP_CSR_COMPxPOL) /*!< COMP output polarity is inverted: comparator output is low when the plus (non-inverting) input is at a lower voltage than the minus (inverting) input */
<> 135:176b8275d35d 484 /**
<> 135:176b8275d35d 485 * @}
<> 135:176b8275d35d 486 */
<> 135:176b8275d35d 487
<> 135:176b8275d35d 488 /** @defgroup COMP_LL_EC_OUTPUT_BLANKING_SOURCE Comparator output - Blanking source
<> 135:176b8275d35d 489 * @{
<> 135:176b8275d35d 490 */
<> 135:176b8275d35d 491 #define LL_COMP_BLANKINGSRC_NONE ((uint32_t)0x00000000U) /*!<Comparator output without blanking */
<> 135:176b8275d35d 492 #if defined(COMP_CSR_COMPxBLANKING)
<> 135:176b8275d35d 493 #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) || defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx)
<> 135:176b8275d35d 494 /* Note: Output blanking source specific to COMP instance: COMP2 */
<> 135:176b8275d35d 495 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 496 #define LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2 (COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM2 OC3 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 497 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2 (COMP_CSR_COMPxBLANKING_1 | COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 498 /* Note: Output blanking source specific to COMP instance: COMP4 */
<> 135:176b8275d35d 499 #define LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM3 OC4 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 500 #define LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 (COMP_CSR_COMPxBLANKING_0 | COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM15 OC1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 501 /* Note: Output blanking source specific to COMP instance: COMP6 */
<> 135:176b8275d35d 502 #define LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 (COMP_CSR_COMPxBLANKING_0 | COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM2 OC4 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 503 #define LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM15 OC2 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 504
<> 135:176b8275d35d 505 /* Note: Output blanking source specific to COMP instances, defined with */
<> 135:176b8275d35d 506 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 507 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 508 #define LL_COMP_BLANKINGSRC_TIM1_OC5 LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2 /*!< Comparator output blanking source TIM1 OC5. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 509 #define LL_COMP_BLANKINGSRC_TIM2_OC3 LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2 /*!< Comparator output blanking source TIM2 OC3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 510 #define LL_COMP_BLANKINGSRC_TIM2_OC4 LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 /*!< Comparator output blanking source TIM2 OC4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 511 #define LL_COMP_BLANKINGSRC_TIM3_OC3 LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2 /*!< Comparator output blanking source TIM3 OC3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 512 #define LL_COMP_BLANKINGSRC_TIM3_OC4 LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 /*!< Comparator output blanking source TIM3 OC4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 513 #define LL_COMP_BLANKINGSRC_TIM15_OC1 LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 /*!< Comparator output blanking source TIM15 OC1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 514 #define LL_COMP_BLANKINGSRC_TIM15_OC2 LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 /*!< Comparator output blanking source TIM15 OC2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 515
<> 135:176b8275d35d 516 #elif defined(STM32F302xE) || defined(STM32F302xC)
<> 135:176b8275d35d 517 /* Note: Output blanking source specific to COMP instance: COMP1, COMP2 */
<> 135:176b8275d35d 518 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP1, COMP2) */
<> 135:176b8275d35d 519 #define LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1_2 (COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM2 OC3 (specific to COMP instance: COMP1, COMP2) */
<> 135:176b8275d35d 520 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1_2 (COMP_CSR_COMPxBLANKING_1 | COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP1, COMP2) */
<> 135:176b8275d35d 521 /* Note: Output blanking source specific to COMP instance: COMP4 */
<> 135:176b8275d35d 522 #define LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM3 OC4 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 523 #define LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 (COMP_CSR_COMPxBLANKING_0 | COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM15 OC1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 524 /* Note: Output blanking source specific to COMP instance: COMP6 */
<> 135:176b8275d35d 525 #define LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 (COMP_CSR_COMPxBLANKING_0 | COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM2 OC4 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 526 #define LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM15 OC2 (specific to COMP instance: COMP6) */
<> 135:176b8275d35d 527
<> 135:176b8275d35d 528 /* Note: Output blanking source specific to COMP instances, defined with */
<> 135:176b8275d35d 529 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 530 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 531 #define LL_COMP_BLANKINGSRC_TIM1_OC5 LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2 /*!< Comparator output blanking source TIM1 OC5. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 532 #define LL_COMP_BLANKINGSRC_TIM2_OC3 LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1_2 /*!< Comparator output blanking source TIM2 OC3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 533 #define LL_COMP_BLANKINGSRC_TIM2_OC4 LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 /*!< Comparator output blanking source TIM2 OC4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 534 #define LL_COMP_BLANKINGSRC_TIM3_OC3 LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1_2 /*!< Comparator output blanking source TIM3 OC3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 535 #define LL_COMP_BLANKINGSRC_TIM3_OC4 LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 /*!< Comparator output blanking source TIM3 OC4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 536 #define LL_COMP_BLANKINGSRC_TIM15_OC1 LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 /*!< Comparator output blanking source TIM15 OC1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 537 #define LL_COMP_BLANKINGSRC_TIM15_OC2 LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 /*!< Comparator output blanking source TIM15 OC2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 538
<> 135:176b8275d35d 539 #elif defined(STM32F303xE) || defined(STM32F398xx) || defined(STM32F303xC) || defined(STM32F358xx)
<> 135:176b8275d35d 540 /* Note: Output blanking source specific to COMP instance: COMP1, COMP2, COMP7 */
<> 135:176b8275d35d 541 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2_7 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP1, COMP2, COMP7) */
<> 135:176b8275d35d 542 /* Note: Output blanking source specific to COMP instance: COMP1, COMP2 */
<> 135:176b8275d35d 543 #define LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1_2 (COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM2 OC3 (specific to COMP instance: COMP1, COMP2) */
<> 135:176b8275d35d 544 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1_2 (COMP_CSR_COMPxBLANKING_1 | COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP1, COMP2) */
<> 135:176b8275d35d 545 /* Note: Output blanking source specific to COMP instance: COMP3, COMP6 */
<> 135:176b8275d35d 546 #define LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3_6 (COMP_CSR_COMPxBLANKING_1 | COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM2 OC4 (specific to COMP instance: COMP3, COMP6) */
<> 135:176b8275d35d 547 /* Note: Output blanking source specific to COMP instance: COMP4, COMP5, COMP6, COMP7 */
<> 135:176b8275d35d 548 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4_5_6_7 (COMP_CSR_COMPxBLANKING_1) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP4, COMP5, COMP6, COMP7) */
<> 135:176b8275d35d 549 /* Note: Output blanling source specific to COMP instance: COMP6, COMP7 */
<> 135:176b8275d35d 550 #define LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6_7 (COMP_CSR_COMPxBLANKING_2) /*!< Comparator output blanking source TIM15 OC2 (specific to COMP instance: COMP6, COMP7) */
<> 135:176b8275d35d 551 /* Note: Output blanking source specific to COMP instance: COMP4 */
<> 135:176b8275d35d 552 #define LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 (COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM3 OC4 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 553 #define LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 (COMP_CSR_COMPxBLANKING_1 | COMP_CSR_COMPxBLANKING_0) /*!< Comparator output blanking source TIM15 OC1 (specific to COMP instance: COMP4) */
<> 135:176b8275d35d 554
<> 135:176b8275d35d 555 /* Note: Output blanking source specific to COMP instances, defined with */
<> 135:176b8275d35d 556 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 557 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 558 #define LL_COMP_BLANKINGSRC_TIM1_OC5 LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2_7 /*!< Comparator output blanking source TIM1 OC5. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 559 #define LL_COMP_BLANKINGSRC_TIM2_OC3 LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1_2 /*!< Comparator output blanking source TIM2 OC3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 560 #define LL_COMP_BLANKINGSRC_TIM2_OC4 LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3_6 /*!< Comparator output blanking source TIM2 OC4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 561 #define LL_COMP_BLANKINGSRC_TIM3_OC3 LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1_2 /*!< Comparator output blanking source TIM3 OC3. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 562 #define LL_COMP_BLANKINGSRC_TIM3_OC4 LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 /*!< Comparator output blanking source TIM3 OC4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 563 #define LL_COMP_BLANKINGSRC_TIM8_OC5 LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4_5_6_7 /*!< Comparator output blanking source TIM8 OC5. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 564 #define LL_COMP_BLANKINGSRC_TIM15_OC1 LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 /*!< Comparator output blanking source TIM15 OC1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 565 #define LL_COMP_BLANKINGSRC_TIM15_OC2 LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6_7 /*!< Comparator output blanking source TIM15 OC2. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 566
<> 135:176b8275d35d 567 #endif
<> 135:176b8275d35d 568 #endif
<> 135:176b8275d35d 569 /**
<> 135:176b8275d35d 570 * @}
<> 135:176b8275d35d 571 */
<> 135:176b8275d35d 572
<> 135:176b8275d35d 573 /** @defgroup COMP_LL_EC_OUTPUT_LEVEL Comparator output - Output level
<> 135:176b8275d35d 574 * @{
<> 135:176b8275d35d 575 */
<> 135:176b8275d35d 576 #define LL_COMP_OUTPUT_LEVEL_LOW ((uint32_t)0x00000000U) /*!< Comparator output level low (if the polarity is not inverted, otherwise to be complemented) */
<> 135:176b8275d35d 577 #define LL_COMP_OUTPUT_LEVEL_HIGH ((uint32_t)0x00000001U) /*!< Comparator output level high (if the polarity is not inverted, otherwise to be complemented) */
<> 135:176b8275d35d 578 /**
<> 135:176b8275d35d 579 * @}
<> 135:176b8275d35d 580 */
<> 135:176b8275d35d 581
<> 135:176b8275d35d 582 /** @defgroup COMP_LL_EC_HW_DELAYS Definitions of COMP hardware constraints delays
<> 135:176b8275d35d 583 * @note Only COMP IP HW delays are defined in COMP LL driver driver,
<> 135:176b8275d35d 584 * not timeout values.
<> 135:176b8275d35d 585 * For details on delays values, refer to descriptions in source code
<> 135:176b8275d35d 586 * above each literal definition.
<> 135:176b8275d35d 587 * @{
<> 135:176b8275d35d 588 */
<> 135:176b8275d35d 589
<> 135:176b8275d35d 590 /* Delay for comparator startup time. */
<> 135:176b8275d35d 591 /* Note: Delay required to reach propagation delay specification. */
<> 135:176b8275d35d 592 /* Literal set to maximum value (refer to device datasheet, */
<> 135:176b8275d35d 593 /* parameter "tSTART"). */
<> 135:176b8275d35d 594 /* Unit: us */
<> 135:176b8275d35d 595 #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx)
<> 135:176b8275d35d 596 #define LL_COMP_DELAY_STARTUP_US ((uint32_t) 60U) /*!< Delay for COMP startup time */
<> 135:176b8275d35d 597 #else
<> 135:176b8275d35d 598 #define LL_COMP_DELAY_STARTUP_US ((uint32_t) 10U) /*!< Delay for COMP startup time */
<> 135:176b8275d35d 599 #endif
<> 135:176b8275d35d 600
<> 135:176b8275d35d 601 /* Delay for comparator voltage scaler stabilization time. */
<> 135:176b8275d35d 602 /* Note: Voltage scaler is used when selecting comparator input */
<> 135:176b8275d35d 603 /* based on VrefInt: VrefInt or subdivision of VrefInt. */
<> 135:176b8275d35d 604 /* Literal set to maximum value (refer to device datasheet, */
<> 135:176b8275d35d 605 /* parameter "tS_SC"). */
<> 135:176b8275d35d 606 /* Unit: us */
<> 135:176b8275d35d 607 #define LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US ((uint32_t) 200U) /*!< Delay for COMP voltage scaler stabilization time */
<> 135:176b8275d35d 608
<> 135:176b8275d35d 609 /**
<> 135:176b8275d35d 610 * @}
<> 135:176b8275d35d 611 */
<> 135:176b8275d35d 612
<> 135:176b8275d35d 613 /**
<> 135:176b8275d35d 614 * @}
<> 135:176b8275d35d 615 */
<> 135:176b8275d35d 616
<> 135:176b8275d35d 617 /* Exported macro ------------------------------------------------------------*/
<> 135:176b8275d35d 618 /** @defgroup COMP_LL_Exported_Macros COMP Exported Macros
<> 135:176b8275d35d 619 * @{
<> 135:176b8275d35d 620 */
<> 135:176b8275d35d 621 /** @defgroup COMP_LL_EM_WRITE_READ Common write and read registers macro
<> 135:176b8275d35d 622 * @{
<> 135:176b8275d35d 623 */
<> 135:176b8275d35d 624
<> 135:176b8275d35d 625 /**
<> 135:176b8275d35d 626 * @brief Write a value in COMP register
<> 135:176b8275d35d 627 * @param __INSTANCE__ comparator instance
<> 135:176b8275d35d 628 * @param __REG__ Register to be written
<> 135:176b8275d35d 629 * @param __VALUE__ Value to be written in the register
<> 135:176b8275d35d 630 * @retval None
<> 135:176b8275d35d 631 */
<> 135:176b8275d35d 632 #define LL_COMP_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
<> 135:176b8275d35d 633
<> 135:176b8275d35d 634 /**
<> 135:176b8275d35d 635 * @brief Read a value in COMP register
<> 135:176b8275d35d 636 * @param __INSTANCE__ comparator instance
<> 135:176b8275d35d 637 * @param __REG__ Register to be read
<> 135:176b8275d35d 638 * @retval Register value
<> 135:176b8275d35d 639 */
<> 135:176b8275d35d 640 #define LL_COMP_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
<> 135:176b8275d35d 641 /**
<> 135:176b8275d35d 642 * @}
<> 135:176b8275d35d 643 */
<> 135:176b8275d35d 644
<> 135:176b8275d35d 645 /** @defgroup COMP_LL_EM_HELPER_MACRO COMP helper macro
<> 135:176b8275d35d 646 * @{
<> 135:176b8275d35d 647 */
<> 135:176b8275d35d 648
<> 135:176b8275d35d 649 /**
<> 135:176b8275d35d 650 * @brief Helper macro to select the COMP common instance
<> 135:176b8275d35d 651 * to which is belonging the selected COMP instance.
<> 135:176b8275d35d 652 * @note COMP common register instance can be used to
<> 135:176b8275d35d 653 * set parameters common to several COMP instances.
<> 135:176b8275d35d 654 * Refer to functions having argument "COMPxy_COMMON" as parameter.
<> 135:176b8275d35d 655 * @param __COMPx__ COMP instance
<> 135:176b8275d35d 656 * @retval COMP common instance or value "0" if there is no COMP common instance.
<> 135:176b8275d35d 657 */
<> 135:176b8275d35d 658 #if defined(COMP1) && defined(COMP2) && defined(COMP3) && defined(COMP4) && defined(COMP5) && defined(COMP6) && defined(COMP7)
<> 135:176b8275d35d 659 /* Note: On STM32F3 serie devices with 7 comparator instances, */
<> 135:176b8275d35d 660 /* COMP instance COMP7 has no other comparator instance to work */
<> 135:176b8275d35d 661 /* in pair with: window mode is not available for COMP7. */
<> 135:176b8275d35d 662 #define __LL_COMP_COMMON_INSTANCE(__COMPx__) \
<> 135:176b8275d35d 663 ((((__COMPx__) == COMP1) || ((__COMPx__) == COMP2)) \
<> 135:176b8275d35d 664 ? ( \
<> 135:176b8275d35d 665 (COMP12_COMMON) \
<> 135:176b8275d35d 666 ) \
<> 135:176b8275d35d 667 : \
<> 135:176b8275d35d 668 ((((__COMPx__) == COMP3) || ((__COMPx__) == COMP4)) \
<> 135:176b8275d35d 669 ? ( \
<> 135:176b8275d35d 670 (COMP34_COMMON) \
<> 135:176b8275d35d 671 ) \
<> 135:176b8275d35d 672 : \
<> 135:176b8275d35d 673 ((((__COMPx__) == COMP5) || ((__COMPx__) == COMP6)) \
<> 135:176b8275d35d 674 ? ( \
<> 135:176b8275d35d 675 (COMP56_COMMON) \
<> 135:176b8275d35d 676 ) \
<> 135:176b8275d35d 677 : \
<> 135:176b8275d35d 678 ( \
<> 135:176b8275d35d 679 ((uint32_t)0U) \
<> 135:176b8275d35d 680 ) \
<> 135:176b8275d35d 681 ) \
<> 135:176b8275d35d 682 ) \
<> 135:176b8275d35d 683 )
<> 135:176b8275d35d 684 #elif defined(COMP1) && defined(COMP2) && defined(COMP4) && defined(COMP6)
<> 135:176b8275d35d 685 #define __LL_COMP_COMMON_INSTANCE(__COMPx__) \
<> 135:176b8275d35d 686 ((((__COMPx__) == COMP1) || ((__COMPx__) == COMP2)) \
<> 135:176b8275d35d 687 ? ( \
<> 135:176b8275d35d 688 (COMP12_COMMON) \
<> 135:176b8275d35d 689 ) \
<> 135:176b8275d35d 690 : \
<> 135:176b8275d35d 691 ( \
<> 135:176b8275d35d 692 ((uint32_t)0U) \
<> 135:176b8275d35d 693 ) \
<> 135:176b8275d35d 694 )
<> 135:176b8275d35d 695 #elif defined(COMP2) && defined(COMP4) && defined(COMP6)
<> 135:176b8275d35d 696 /* Note: On STM32F3 serie devices with 3 comparator instances (COMP2, 4, 6) */
<> 135:176b8275d35d 697 /* COMP instances have no other comparator instance to work */
<> 135:176b8275d35d 698 /* in pair with: window mode is not available for all COMP instances. */
<> 135:176b8275d35d 699 #define __LL_COMP_COMMON_INSTANCE(__COMPx__) \
<> 135:176b8275d35d 700 ((uint32_t)0U)
<> 135:176b8275d35d 701 #endif
<> 135:176b8275d35d 702
<> 135:176b8275d35d 703 /**
<> 135:176b8275d35d 704 * @}
<> 135:176b8275d35d 705 */
<> 135:176b8275d35d 706
<> 135:176b8275d35d 707 /**
<> 135:176b8275d35d 708 * @}
<> 135:176b8275d35d 709 */
<> 135:176b8275d35d 710
<> 135:176b8275d35d 711 /* Exported functions --------------------------------------------------------*/
<> 135:176b8275d35d 712 /** @defgroup COMP_LL_Exported_Functions COMP Exported Functions
<> 135:176b8275d35d 713 * @{
<> 135:176b8275d35d 714 */
<> 135:176b8275d35d 715
<> 135:176b8275d35d 716 /** @defgroup COMP_LL_EF_Configuration_comparator_common Configuration of COMP hierarchical scope: common to several COMP instances
<> 135:176b8275d35d 717 * @{
<> 135:176b8275d35d 718 */
<> 135:176b8275d35d 719
<> 135:176b8275d35d 720 /**
<> 135:176b8275d35d 721 * @brief Set window mode of a pair of comparators instances
<> 135:176b8275d35d 722 * (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
<> 135:176b8275d35d 723 * @rmtoll CSR COMPxWNDWEN LL_COMP_SetCommonWindowMode
<> 135:176b8275d35d 724 * @param COMPxy_COMMON Comparator common instance
<> 135:176b8275d35d 725 * (can be set directly from CMSIS definition or by using helper macro @ref __LL_COMP_COMMON_INSTANCE() )
<> 135:176b8275d35d 726 * @param WindowMode This parameter can be one of the following values:
<> 135:176b8275d35d 727 * @arg @ref LL_COMP_WINDOWMODE_DISABLE
<> 135:176b8275d35d 728 * @arg @ref LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (1)
<> 135:176b8275d35d 729 * @arg @ref LL_COMP_WINDOWMODE_COMP3_INPUT_PLUS_COMMON (2)
<> 135:176b8275d35d 730 * @arg @ref LL_COMP_WINDOWMODE_COMP5_INPUT_PLUS_COMMON (2)
<> 135:176b8275d35d 731 *
<> 135:176b8275d35d 732 * (1) Parameter available on devices: STM32F302xB/C, STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 733 * (2) Parameter available on devices: STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 734 * @retval None
<> 135:176b8275d35d 735 */
<> 135:176b8275d35d 736 __STATIC_INLINE void LL_COMP_SetCommonWindowMode(COMP_Common_TypeDef *COMPxy_COMMON, uint32_t WindowMode)
<> 135:176b8275d35d 737 {
<> 135:176b8275d35d 738 #if defined(COMP_CSR_COMPxWNDWEN)
<> 135:176b8275d35d 739 MODIFY_REG(COMPxy_COMMON->CSR, COMP_CSR_COMPxWNDWEN, WindowMode);
<> 135:176b8275d35d 740 #else
<> 135:176b8275d35d 741 /* Device without pair of comparator working in window mode */
<> 135:176b8275d35d 742 /* No update of comparator register (corresponds to setting */
<> 135:176b8275d35d 743 /* "LL_COMP_WINDOWMODE_DISABLE"). */
<> 135:176b8275d35d 744 #endif
<> 135:176b8275d35d 745 }
<> 135:176b8275d35d 746
<> 135:176b8275d35d 747 /**
<> 135:176b8275d35d 748 * @brief Get window mode of a pair of comparators instances
<> 135:176b8275d35d 749 * (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
<> 135:176b8275d35d 750 * @rmtoll CSR COMPxWNDWEN LL_COMP_GetCommonWindowMode
<> 135:176b8275d35d 751 * @param COMPxy_COMMON Comparator common instance
<> 135:176b8275d35d 752 * (can be set directly from CMSIS definition or by using helper macro @ref __LL_COMP_COMMON_INSTANCE() )
<> 135:176b8275d35d 753 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 754 * @arg @ref LL_COMP_WINDOWMODE_DISABLE
<> 135:176b8275d35d 755 * @arg @ref LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (1)
<> 135:176b8275d35d 756 * @arg @ref LL_COMP_WINDOWMODE_COMP3_INPUT_PLUS_COMMON (2)
<> 135:176b8275d35d 757 * @arg @ref LL_COMP_WINDOWMODE_COMP5_INPUT_PLUS_COMMON (2)
<> 135:176b8275d35d 758 *
<> 135:176b8275d35d 759 * (1) Parameter available on devices: STM32F302xB/C, STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 760 * (2) Parameter available on devices: STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 761 */
<> 135:176b8275d35d 762 __STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode(COMP_Common_TypeDef *COMPxy_COMMON)
<> 135:176b8275d35d 763 {
<> 135:176b8275d35d 764 #if defined(COMP_CSR_COMPxWNDWEN)
<> 135:176b8275d35d 765 return (uint32_t)(READ_BIT(COMPxy_COMMON->CSR, COMP_CSR_COMPxWNDWEN));
<> 135:176b8275d35d 766 #else
<> 135:176b8275d35d 767 /* Device without pair of comparator working in window mode */
<> 135:176b8275d35d 768 return (LL_COMP_WINDOWMODE_DISABLE);
<> 135:176b8275d35d 769 #endif
<> 135:176b8275d35d 770 }
<> 135:176b8275d35d 771
<> 135:176b8275d35d 772 /**
<> 135:176b8275d35d 773 * @}
<> 135:176b8275d35d 774 */
<> 135:176b8275d35d 775
<> 135:176b8275d35d 776 /** @defgroup COMP_LL_EF_Configuration_comparator_modes Configuration of comparator modes
<> 135:176b8275d35d 777 * @{
<> 135:176b8275d35d 778 */
<> 135:176b8275d35d 779
<> 135:176b8275d35d 780 /**
<> 135:176b8275d35d 781 * @brief Set comparator instance operating mode to adjust power and speed.
<> 135:176b8275d35d 782 * @rmtoll CSR COMPxMODE LL_COMP_SetPowerMode
<> 135:176b8275d35d 783 * @param COMPx Comparator instance
<> 135:176b8275d35d 784 * @param PowerMode This parameter can be one of the following values:
<> 135:176b8275d35d 785 * @arg @ref LL_COMP_POWERMODE_HIGHSPEED
<> 135:176b8275d35d 786 * @arg @ref LL_COMP_POWERMODE_MEDIUMSPEED (1)
<> 135:176b8275d35d 787 * @arg @ref LL_COMP_POWERMODE_LOWPOWER (1)
<> 135:176b8275d35d 788 * @arg @ref LL_COMP_POWERMODE_ULTRALOWPOWER (1)
<> 135:176b8275d35d 789 *
<> 135:176b8275d35d 790 * (1) Parameter available only on devices: STM32F302xB/C, STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 791 * @retval None
<> 135:176b8275d35d 792 */
<> 135:176b8275d35d 793 __STATIC_INLINE void LL_COMP_SetPowerMode(COMP_TypeDef *COMPx, uint32_t PowerMode)
<> 135:176b8275d35d 794 {
<> 135:176b8275d35d 795 #if defined(COMP_CSR_COMPxMODE)
<> 135:176b8275d35d 796 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxMODE, PowerMode);
<> 135:176b8275d35d 797 #else
<> 135:176b8275d35d 798 /* Device without comparator power mode configurable */
<> 135:176b8275d35d 799 /* No update of comparator register (corresponds to setting */
<> 135:176b8275d35d 800 /* "LL_COMP_POWERMODE_HIGHSPEED"). */
<> 135:176b8275d35d 801 #endif
<> 135:176b8275d35d 802 }
<> 135:176b8275d35d 803
<> 135:176b8275d35d 804 /**
<> 135:176b8275d35d 805 * @brief Get comparator instance operating mode to adjust power and speed.
<> 135:176b8275d35d 806 * @rmtoll CSR COMPxMODE LL_COMP_GetPowerMode
<> 135:176b8275d35d 807 * @param COMPx Comparator instance
<> 135:176b8275d35d 808 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 809 * @arg @ref LL_COMP_POWERMODE_HIGHSPEED
<> 135:176b8275d35d 810 * @arg @ref LL_COMP_POWERMODE_MEDIUMSPEED (1)
<> 135:176b8275d35d 811 * @arg @ref LL_COMP_POWERMODE_LOWPOWER (1)
<> 135:176b8275d35d 812 * @arg @ref LL_COMP_POWERMODE_ULTRALOWPOWER (1)
<> 135:176b8275d35d 813 *
<> 135:176b8275d35d 814 * (1) Parameter available only on devices: STM32F302xB/C, STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 815 */
<> 135:176b8275d35d 816 __STATIC_INLINE uint32_t LL_COMP_GetPowerMode(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 817 {
<> 135:176b8275d35d 818 #if defined(COMP_CSR_COMPxMODE)
<> 135:176b8275d35d 819 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxMODE));
<> 135:176b8275d35d 820 #else
<> 135:176b8275d35d 821 /* Device without comparator power mode configurable */
<> 135:176b8275d35d 822 return (LL_COMP_POWERMODE_HIGHSPEED);
<> 135:176b8275d35d 823 #endif
<> 135:176b8275d35d 824 }
<> 135:176b8275d35d 825
<> 135:176b8275d35d 826 /**
<> 135:176b8275d35d 827 * @}
<> 135:176b8275d35d 828 */
<> 135:176b8275d35d 829
<> 135:176b8275d35d 830 /** @defgroup COMP_LL_EF_Configuration_comparator_inputs Configuration of comparator inputs
<> 135:176b8275d35d 831 * @{
<> 135:176b8275d35d 832 */
<> 135:176b8275d35d 833
<> 135:176b8275d35d 834 /**
<> 135:176b8275d35d 835 * @brief Set comparator inputs minus (inverting) and plus (non-inverting).
<> 135:176b8275d35d 836 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 837 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 838 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 839 * @note On this STM32 serie, a voltage scaler is used
<> 135:176b8275d35d 840 * when COMP input is based on VrefInt (VrefInt or subdivision
<> 135:176b8275d35d 841 * of VrefInt):
<> 135:176b8275d35d 842 * Voltage scaler requires a delay for voltage stabilization.
<> 135:176b8275d35d 843 * Refer to device datasheet, parameter "tS_SC".
<> 135:176b8275d35d 844 * @rmtoll CSR INMSEL LL_COMP_ConfigInputs\n
<> 135:176b8275d35d 845 * CSR NONINSEL LL_COMP_ConfigInputs
<> 135:176b8275d35d 846 * @param COMPx Comparator instance
<> 135:176b8275d35d 847 * @param InputMinus This parameter can be one of the following values:
<> 135:176b8275d35d 848 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 135:176b8275d35d 849 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 135:176b8275d35d 850 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 135:176b8275d35d 851 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 135:176b8275d35d 852 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 135:176b8275d35d 853 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 (3)
<> 135:176b8275d35d 854 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1 (2)
<> 135:176b8275d35d 855 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 135:176b8275d35d 856 * @arg @ref LL_COMP_INPUT_MINUS_IO2
<> 135:176b8275d35d 857 * @arg @ref LL_COMP_INPUT_MINUS_IO3 (1)
<> 135:176b8275d35d 858 * @arg @ref LL_COMP_INPUT_MINUS_IO4
<> 135:176b8275d35d 859 * (1) Parameter available on all devices except STM32F301x6/8, STM32F318x8, STM32F302x6/8, STM32F303x6/8, STM32F328xx, STM32F334xx.\n
<> 135:176b8275d35d 860 * (2) Parameter available only on devices STM32F303x6/8, STM32F328x8, STM32F334xx.\n
<> 135:176b8275d35d 861 * (3) Parameter available on all devices except STM32F301x6/8, STM32F318x8, STM32F302xx.\n
<> 135:176b8275d35d 862 * @param InputPlus This parameter can be one of the following values:
<> 135:176b8275d35d 863 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 135:176b8275d35d 864 * @arg @ref LL_COMP_INPUT_PLUS_IO2 (1)
<> 135:176b8275d35d 865 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1_COMP1 (2)
<> 135:176b8275d35d 866 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1_COMP2 (3)
<> 135:176b8275d35d 867 *
<> 135:176b8275d35d 868 * (1) Parameter available only on devices STM32F302xB/C, STM32F303xB/C, STM32F358xC.\n
<> 135:176b8275d35d 869 * (2) Parameter available on devices: STM32F302xB/C, STM32F302xD/E, STM32F303xB/C/D/E, STM32F358xC, STM32F398xE.\n
<> 135:176b8275d35d 870 * (3) Parameter available on devices: STM32F301x6/8, STM32F318xx, STM32F302x6/8.
<> 135:176b8275d35d 871 * @retval None
<> 135:176b8275d35d 872 */
<> 135:176b8275d35d 873 __STATIC_INLINE void LL_COMP_ConfigInputs(COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus)
<> 135:176b8275d35d 874 {
<> 135:176b8275d35d 875 #if defined(COMP_CSR_COMPxNONINSEL) && defined(COMP_CSR_COMPxSW1)
<> 135:176b8275d35d 876 MODIFY_REG(COMPx->CSR,
<> 135:176b8275d35d 877 COMP_CSR_COMPxINSEL | COMP_CSR_COMPxNONINSEL | COMP_CSR_COMPxSW1,
<> 135:176b8275d35d 878 InputMinus | InputPlus);
<> 135:176b8275d35d 879 #elif defined(COMP_CSR_COMPxNONINSEL)
<> 135:176b8275d35d 880 MODIFY_REG(COMPx->CSR,
<> 135:176b8275d35d 881 COMP_CSR_COMPxINSEL | COMP_CSR_COMPxNONINSEL,
<> 135:176b8275d35d 882 InputMinus | InputPlus);
<> 135:176b8275d35d 883 #elif defined(COMP_CSR_COMPxSW1)
<> 135:176b8275d35d 884 MODIFY_REG(COMPx->CSR,
<> 135:176b8275d35d 885 COMP_CSR_COMPxINSEL | COMP_CSR_COMPxSW1,
<> 135:176b8275d35d 886 InputMinus | InputPlus);
<> 135:176b8275d35d 887 #else
<> 135:176b8275d35d 888 /* Device without comparator input plus configurable */
<> 135:176b8275d35d 889 /* No update of comparator register (corresponds to setting */
<> 135:176b8275d35d 890 /* "LL_COMP_INPUT_PLUS_IO1" or "LL_COMP_INPUT_PLUS_IO2" compared to */
<> 135:176b8275d35d 891 /* other STM32F3 devices, depending on comparator instance */
<> 135:176b8275d35d 892 /* (refer to reference manual)). */
<> 135:176b8275d35d 893 MODIFY_REG(COMPx->CSR,
<> 135:176b8275d35d 894 COMP_CSR_COMPxINSEL,
<> 135:176b8275d35d 895 InputMinus);
<> 135:176b8275d35d 896 #endif
<> 135:176b8275d35d 897 }
<> 135:176b8275d35d 898
<> 135:176b8275d35d 899 /**
<> 135:176b8275d35d 900 * @brief Set comparator input plus (non-inverting).
<> 135:176b8275d35d 901 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 902 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 903 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 904 * @rmtoll CSR NONINSEL LL_COMP_SetInputPlus
<> 135:176b8275d35d 905 * @param COMPx Comparator instance
<> 135:176b8275d35d 906 * @param InputPlus This parameter can be one of the following values:
<> 135:176b8275d35d 907 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 135:176b8275d35d 908 * @arg @ref LL_COMP_INPUT_PLUS_IO2 (1)
<> 135:176b8275d35d 909 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1_COMP1 (2)
<> 135:176b8275d35d 910 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1_COMP2 (3)
<> 135:176b8275d35d 911 *
<> 135:176b8275d35d 912 * (1) Parameter available only on devices STM32F302xB/C, STM32F303xB/C, STM32F358xC.\n
<> 135:176b8275d35d 913 * (2) Parameter available on devices: STM32F302xB/C, STM32F302xD/E, STM32F303xB/C/D/E, STM32F358xC, STM32F398xE.\n
<> 135:176b8275d35d 914 * (3) Parameter available on devices: STM32F301x6/8, STM32F318xx, STM32F302x6/8.
<> 135:176b8275d35d 915 * @retval None
<> 135:176b8275d35d 916 */
<> 135:176b8275d35d 917 __STATIC_INLINE void LL_COMP_SetInputPlus(COMP_TypeDef *COMPx, uint32_t InputPlus)
<> 135:176b8275d35d 918 {
<> 135:176b8275d35d 919 #if defined(COMP_CSR_COMPxNONINSEL) && defined(COMP_CSR_COMPxSW1)
<> 135:176b8275d35d 920 MODIFY_REG(COMPx->CSR, (COMP_CSR_COMPxNONINSEL | COMP_CSR_COMPxSW1), InputPlus);
<> 135:176b8275d35d 921 #elif defined(COMP_CSR_COMPxNONINSEL)
<> 135:176b8275d35d 922 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxNONINSEL, InputPlus);
<> 135:176b8275d35d 923 #elif defined(COMP_CSR_COMPxSW1)
<> 135:176b8275d35d 924 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxSW1, InputPlus);
<> 135:176b8275d35d 925 #else
<> 135:176b8275d35d 926 /* Device without comparator input plus configurable */
<> 135:176b8275d35d 927 /* No update of comparator register (corresponds to setting */
<> 135:176b8275d35d 928 /* "LL_COMP_INPUT_PLUS_IO1" or "LL_COMP_INPUT_PLUS_IO2" compared to */
<> 135:176b8275d35d 929 /* other STM32F3 devices, depending on comparator instance */
<> 135:176b8275d35d 930 /* (refer to reference manual)). */
<> 135:176b8275d35d 931 #endif
<> 135:176b8275d35d 932 }
<> 135:176b8275d35d 933
<> 135:176b8275d35d 934 /**
<> 135:176b8275d35d 935 * @brief Get comparator input plus (non-inverting).
<> 135:176b8275d35d 936 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 937 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 938 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 939 * @rmtoll CSR NONINSEL LL_COMP_GetInputPlus
<> 135:176b8275d35d 940 * @param COMPx Comparator instance
<> 135:176b8275d35d 941 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 942 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 135:176b8275d35d 943 * @arg @ref LL_COMP_INPUT_PLUS_IO2 (1)
<> 135:176b8275d35d 944 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1_COMP1 (2)
<> 135:176b8275d35d 945 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1_COMP2 (3)
<> 135:176b8275d35d 946 *
<> 135:176b8275d35d 947 * (1) Parameter available only on devices STM32F302xB/C, STM32F303xB/C, STM32F358xC.\n
<> 135:176b8275d35d 948 * (2) Parameter available on devices: STM32F302xB/C, STM32F302xD/E, STM32F303xB/C/D/E, STM32F358xC, STM32F398xE.\n
<> 135:176b8275d35d 949 * (3) Parameter available on devices: STM32F301x6/8, STM32F318xx, STM32F302x6/8.
<> 135:176b8275d35d 950 */
<> 135:176b8275d35d 951 __STATIC_INLINE uint32_t LL_COMP_GetInputPlus(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 952 {
<> 135:176b8275d35d 953 #if defined(COMP_CSR_COMPxNONINSEL) && defined(COMP_CSR_COMPxSW1)
<> 135:176b8275d35d 954 return (uint32_t)(READ_BIT(COMPx->CSR, (COMP_CSR_COMPxNONINSEL | COMP_CSR_COMPxSW1)));
<> 135:176b8275d35d 955 #elif defined(COMP_CSR_COMPxNONINSEL)
<> 135:176b8275d35d 956 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxNONINSEL));
<> 135:176b8275d35d 957 #elif defined(COMP_CSR_COMPxSW1)
<> 135:176b8275d35d 958 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxSW1));
<> 135:176b8275d35d 959 #else
<> 135:176b8275d35d 960 /* Device without comparator input plus configurable */
<> 135:176b8275d35d 961 /* No update of comparator register (corresponds to setting */
<> 135:176b8275d35d 962 /* "LL_COMP_INPUT_PLUS_IO1" or "LL_COMP_INPUT_PLUS_IO2" compared to */
<> 135:176b8275d35d 963 /* other STM32F3 devices, depending on comparator instance */
<> 135:176b8275d35d 964 /* (refer to reference manual)). */
<> 135:176b8275d35d 965 return (LL_COMP_INPUT_PLUS_IO1);
<> 135:176b8275d35d 966 #endif
<> 135:176b8275d35d 967 }
<> 135:176b8275d35d 968
<> 135:176b8275d35d 969 /**
<> 135:176b8275d35d 970 * @brief Set comparator input minus (inverting).
<> 135:176b8275d35d 971 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 972 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 973 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 974 * @note On this STM32 serie, a voltage scaler is used
<> 135:176b8275d35d 975 * when COMP input is based on VrefInt (VrefInt or subdivision
<> 135:176b8275d35d 976 * of VrefInt):
<> 135:176b8275d35d 977 * Voltage scaler requires a delay for voltage stabilization.
<> 135:176b8275d35d 978 * Refer to device datasheet, parameter "tS_SC".
<> 135:176b8275d35d 979 * @rmtoll CSR INMSEL LL_COMP_SetInputMinus
<> 135:176b8275d35d 980 * @param COMPx Comparator instance
<> 135:176b8275d35d 981 * @param InputMinus This parameter can be one of the following values:
<> 135:176b8275d35d 982 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 135:176b8275d35d 983 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 135:176b8275d35d 984 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 135:176b8275d35d 985 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 135:176b8275d35d 986 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 135:176b8275d35d 987 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 (3)
<> 135:176b8275d35d 988 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1 (2)
<> 135:176b8275d35d 989 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 135:176b8275d35d 990 * @arg @ref LL_COMP_INPUT_MINUS_IO2
<> 135:176b8275d35d 991 * @arg @ref LL_COMP_INPUT_MINUS_IO3 (1)
<> 135:176b8275d35d 992 * @arg @ref LL_COMP_INPUT_MINUS_IO4
<> 135:176b8275d35d 993 * (1) Parameter available on all devices except STM32F301x6/8, STM32F318x8, STM32F302x6/8, STM32F303x6/8, STM32F328xx, STM32F334xx.\n
<> 135:176b8275d35d 994 * (2) Parameter available only on devices STM32F303x6/8, STM32F328x8, STM32F334xx.\n
<> 135:176b8275d35d 995 * (3) Parameter available on all devices except STM32F301x6/8, STM32F318x8, STM32F302xx.\n
<> 135:176b8275d35d 996 * @retval None
<> 135:176b8275d35d 997 */
<> 135:176b8275d35d 998 __STATIC_INLINE void LL_COMP_SetInputMinus(COMP_TypeDef *COMPx, uint32_t InputMinus)
<> 135:176b8275d35d 999 {
<> 135:176b8275d35d 1000 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxINSEL, InputMinus);
<> 135:176b8275d35d 1001 }
<> 135:176b8275d35d 1002
<> 135:176b8275d35d 1003 /**
<> 135:176b8275d35d 1004 * @brief Get comparator input minus (inverting).
<> 135:176b8275d35d 1005 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 1006 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 1007 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1008 * @rmtoll CSR INMSEL LL_COMP_GetInputMinus
<> 135:176b8275d35d 1009 * @param COMPx Comparator instance
<> 135:176b8275d35d 1010 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1011 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 135:176b8275d35d 1012 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 135:176b8275d35d 1013 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 135:176b8275d35d 1014 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 135:176b8275d35d 1015 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 135:176b8275d35d 1016 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 (3)
<> 135:176b8275d35d 1017 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1 (2)
<> 135:176b8275d35d 1018 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 135:176b8275d35d 1019 * @arg @ref LL_COMP_INPUT_MINUS_IO2
<> 135:176b8275d35d 1020 * @arg @ref LL_COMP_INPUT_MINUS_IO3 (1)
<> 135:176b8275d35d 1021 * @arg @ref LL_COMP_INPUT_MINUS_IO4
<> 135:176b8275d35d 1022 * (1) Parameter available on all devices except STM32F301x6/8, STM32F318x8, STM32F302x6/8, STM32F303x6/8, STM32F328xx, STM32F334xx.\n
<> 135:176b8275d35d 1023 * (2) Parameter available only on devices STM32F303x6/8, STM32F328x8, STM32F334xx.\n
<> 135:176b8275d35d 1024 * (3) Parameter available on all devices except STM32F301x6/8, STM32F318x8, STM32F302xx.\n
<> 135:176b8275d35d 1025 */
<> 135:176b8275d35d 1026 __STATIC_INLINE uint32_t LL_COMP_GetInputMinus(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1027 {
<> 135:176b8275d35d 1028 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxINSEL));
<> 135:176b8275d35d 1029 }
<> 135:176b8275d35d 1030
<> 135:176b8275d35d 1031 /**
<> 135:176b8275d35d 1032 * @brief Set comparator instance hysteresis mode of the input minus (inverting input).
<> 135:176b8275d35d 1033 * @rmtoll CSR COMPxHYST LL_COMP_SetInputHysteresis
<> 135:176b8275d35d 1034 * @param COMPx Comparator instance
<> 135:176b8275d35d 1035 * @param InputHysteresis This parameter can be one of the following values:
<> 135:176b8275d35d 1036 * @arg @ref LL_COMP_HYSTERESIS_NONE
<> 135:176b8275d35d 1037 * @arg @ref LL_COMP_HYSTERESIS_LOW (1)
<> 135:176b8275d35d 1038 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM (1)
<> 135:176b8275d35d 1039 * @arg @ref LL_COMP_HYSTERESIS_HIGH (1)
<> 135:176b8275d35d 1040 *
<> 135:176b8275d35d 1041 * (1) Parameter available only on devices: STM32F302xB/C, STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 1042 * @retval None
<> 135:176b8275d35d 1043 */
<> 135:176b8275d35d 1044 __STATIC_INLINE void LL_COMP_SetInputHysteresis(COMP_TypeDef *COMPx, uint32_t InputHysteresis)
<> 135:176b8275d35d 1045 {
<> 135:176b8275d35d 1046 #if defined(COMP_CSR_COMPxHYST)
<> 135:176b8275d35d 1047 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxHYST, InputHysteresis);
<> 135:176b8275d35d 1048 #else
<> 135:176b8275d35d 1049 /* Device without comparator input hysteresis */
<> 135:176b8275d35d 1050 /* No update of comparator register (corresponds to setting */
<> 135:176b8275d35d 1051 /* "LL_COMP_HYSTERESIS_NONE"). */
<> 135:176b8275d35d 1052 #endif
<> 135:176b8275d35d 1053 }
<> 135:176b8275d35d 1054
<> 135:176b8275d35d 1055 /**
<> 135:176b8275d35d 1056 * @brief Get comparator instance hysteresis mode of the minus (inverting) input.
<> 135:176b8275d35d 1057 * @rmtoll CSR COMPxHYST LL_COMP_GetInputHysteresis
<> 135:176b8275d35d 1058 * @param COMPx Comparator instance
<> 135:176b8275d35d 1059 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1060 * @arg @ref LL_COMP_HYSTERESIS_NONE
<> 135:176b8275d35d 1061 * @arg @ref LL_COMP_HYSTERESIS_LOW (1)
<> 135:176b8275d35d 1062 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM (1)
<> 135:176b8275d35d 1063 * @arg @ref LL_COMP_HYSTERESIS_HIGH (1)
<> 135:176b8275d35d 1064 *
<> 135:176b8275d35d 1065 * (1) Parameter available only on devices: STM32F302xB/C, STM32F303xB/C, STM32F358xC
<> 135:176b8275d35d 1066 */
<> 135:176b8275d35d 1067 __STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1068 {
<> 135:176b8275d35d 1069 #if defined(COMP_CSR_COMPxHYST)
<> 135:176b8275d35d 1070 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxHYST));
<> 135:176b8275d35d 1071 #else
<> 135:176b8275d35d 1072 /* Device without comparator input hysteresis */
<> 135:176b8275d35d 1073 return (LL_COMP_HYSTERESIS_NONE);
<> 135:176b8275d35d 1074 #endif
<> 135:176b8275d35d 1075 }
<> 135:176b8275d35d 1076
<> 135:176b8275d35d 1077 /**
<> 135:176b8275d35d 1078 * @}
<> 135:176b8275d35d 1079 */
<> 135:176b8275d35d 1080
<> 135:176b8275d35d 1081 /** @defgroup COMP_LL_EF_Configuration_comparator_output Configuration of comparator output
<> 135:176b8275d35d 1082 * @{
<> 135:176b8275d35d 1083 */
<> 135:176b8275d35d 1084
<> 135:176b8275d35d 1085 /**
<> 135:176b8275d35d 1086 * @brief Set comparator output selection.
<> 135:176b8275d35d 1087 * @note Availability of parameters of output selection to timer
<> 135:176b8275d35d 1088 * depends on timers availability on the selected device.
<> 135:176b8275d35d 1089 * @rmtoll CSR COMPxOUTSEL LL_COMP_SetOutputSelection
<> 135:176b8275d35d 1090 * @param COMPx Comparator instance
<> 135:176b8275d35d 1091 * @param OutputSelection This parameter can be one of the following values:
<> 135:176b8275d35d 1092 * @arg @ref LL_COMP_OUTPUT_NONE
<> 135:176b8275d35d 1093 * @arg @ref LL_COMP_OUTPUT_TIM1_BKIN
<> 135:176b8275d35d 1094 * @arg @ref LL_COMP_OUTPUT_TIM1_BKIN2
<> 135:176b8275d35d 1095 * @arg @ref LL_COMP_OUTPUT_TIM1_TIM8_BKIN2
<> 135:176b8275d35d 1096 * @arg @ref LL_COMP_OUTPUT_TIM8_BKIN (4)
<> 135:176b8275d35d 1097 * @arg @ref LL_COMP_OUTPUT_TIM8_BKIN2 (4)
<> 135:176b8275d35d 1098 * @arg @ref LL_COMP_OUTPUT_TIM1_TIM8_BKIN2 (4)
<> 135:176b8275d35d 1099 * @arg @ref LL_COMP_OUTPUT_TIM20_BKIN (5)
<> 135:176b8275d35d 1100 * @arg @ref LL_COMP_OUTPUT_TIM20_BKIN2 (5)
<> 135:176b8275d35d 1101 * @arg @ref LL_COMP_OUTPUT_TIM1_TIM8_TIM20_BKIN2 (5)
<> 135:176b8275d35d 1102 * @arg @ref LL_COMP_OUTPUT_TIM1_OCCLR_COMP1_2_3_7 (4)
<> 135:176b8275d35d 1103 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 (4)
<> 135:176b8275d35d 1104 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR_COMP1_2_4_5 (4)
<> 135:176b8275d35d 1105 * @arg @ref LL_COMP_OUTPUT_TIM8_OCCLR_COMP4_5_6_7 (4)
<> 135:176b8275d35d 1106 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR_COMP2_4 (6)
<> 135:176b8275d35d 1107 * @arg @ref LL_COMP_OUTPUT_TIM1_IC1_COMP2 (2)
<> 135:176b8275d35d 1108 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4_COMP2 (2)
<> 135:176b8275d35d 1109 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1_COMP2 (1)
<> 135:176b8275d35d 1110 * @arg @ref LL_COMP_OUTPUT_TIM1_IC1_COMP1_2 (3)
<> 135:176b8275d35d 1111 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4_COMP1_2 (3)
<> 135:176b8275d35d 1112 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1_COMP1_2 (3)
<> 135:176b8275d35d 1113 * @arg @ref LL_COMP_OUTPUT_TIM20_OCCLR_COMP2 (5)
<> 135:176b8275d35d 1114 * @arg @ref LL_COMP_OUTPUT_TIM3_IC2_COMP3 (4)
<> 135:176b8275d35d 1115 * @arg @ref LL_COMP_OUTPUT_TIM4_IC1_COMP3 (4)
<> 135:176b8275d35d 1116 * @arg @ref LL_COMP_OUTPUT_TIM15_IC1_COMP3 (4)
<> 135:176b8275d35d 1117 * @arg @ref LL_COMP_OUTPUT_TIM15_BKIN
<> 135:176b8275d35d 1118 * @arg @ref LL_COMP_OUTPUT_TIM3_IC3_COMP4 (1)
<> 135:176b8275d35d 1119 * @arg @ref LL_COMP_OUTPUT_TIM4_IC2_COMP4
<> 135:176b8275d35d 1120 * @arg @ref LL_COMP_OUTPUT_TIM15_IC2_COMP4
<> 135:176b8275d35d 1121 * @arg @ref LL_COMP_OUTPUT_TIM15_OCCLR_COMP4
<> 135:176b8275d35d 1122 * @arg @ref LL_COMP_OUTPUT_TIM2_IC1_COMP5 (4)
<> 135:176b8275d35d 1123 * @arg @ref LL_COMP_OUTPUT_TIM4_IC3_COMP5 (4)
<> 135:176b8275d35d 1124 * @arg @ref LL_COMP_OUTPUT_TIM17_IC1_COMP5 (4)
<> 135:176b8275d35d 1125 * @arg @ref LL_COMP_OUTPUT_TIM16_BKIN
<> 135:176b8275d35d 1126 * @arg @ref LL_COMP_OUTPUT_TIM2_IC2_COMP6
<> 135:176b8275d35d 1127 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR_COMP6
<> 135:176b8275d35d 1128 * @arg @ref LL_COMP_OUTPUT_TIM4_IC4_COMP6
<> 135:176b8275d35d 1129 * @arg @ref LL_COMP_OUTPUT_TIM16_IC1_COMP6
<> 135:176b8275d35d 1130 * @arg @ref LL_COMP_OUTPUT_TIM16_OCCLR_COMP6
<> 135:176b8275d35d 1131 * @arg @ref LL_COMP_OUTPUT_TIM1_IC2_COMP7 (4)
<> 135:176b8275d35d 1132 * @arg @ref LL_COMP_OUTPUT_TIM2_IC3_COMP7 (4)
<> 135:176b8275d35d 1133 * @arg @ref LL_COMP_OUTPUT_TIM17_OCCLR_COMP7 (4)
<> 135:176b8275d35d 1134 * @arg @ref LL_COMP_OUTPUT_TIM17_BKIN (4)
<> 135:176b8275d35d 1135 *
<> 135:176b8275d35d 1136 * (1) Parameter available on devices: STM32F302x8, STM32F318xx, STM32F303x8, STM32F328xx, STM32F334x8, STM32F302xC, STM32F302xE, STM32F303xC, STM32F358xx, STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1137 * (2) Parameter available on devices: STM32F301x8, STM32F302x8, STM32F318xx, STM32F303x8, STM32F328xx, STM32F334x8.\n
<> 135:176b8275d35d 1138 * (3) Parameter available on devices: STM32F302xC, STM32F302xE, STM32F303xC, STM32F358xx, STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1139 * (4) Parameter available on devices: STM32F303xC, STM32F358xx, STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1140 * (5) Parameter available on devices: STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1141 * (6) Parameter available on devices: STM32F303x8, STM32F328xx, STM32F334x8.
<> 135:176b8275d35d 1142 * @retval None
<> 135:176b8275d35d 1143 */
<> 135:176b8275d35d 1144 __STATIC_INLINE void LL_COMP_SetOutputSelection(COMP_TypeDef *COMPx, uint32_t OutputSelection)
<> 135:176b8275d35d 1145 {
<> 135:176b8275d35d 1146 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxOUTSEL , OutputSelection);
<> 135:176b8275d35d 1147 }
<> 135:176b8275d35d 1148
<> 135:176b8275d35d 1149 /**
<> 135:176b8275d35d 1150 * @brief Get comparator output selection.
<> 135:176b8275d35d 1151 * @note Availability of parameters of output selection to timer
<> 135:176b8275d35d 1152 * depends on timers availability on the selected device.
<> 135:176b8275d35d 1153 * @rmtoll CSR COMPxOUTSEL LL_COMP_GetOutputSelection
<> 135:176b8275d35d 1154 * @param COMPx Comparator instance
<> 135:176b8275d35d 1155 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1156 * @arg @ref LL_COMP_OUTPUT_NONE
<> 135:176b8275d35d 1157 * @arg @ref LL_COMP_OUTPUT_TIM1_BKIN
<> 135:176b8275d35d 1158 * @arg @ref LL_COMP_OUTPUT_TIM1_BKIN2
<> 135:176b8275d35d 1159 * @arg @ref LL_COMP_OUTPUT_TIM1_TIM8_BKIN2
<> 135:176b8275d35d 1160 * @arg @ref LL_COMP_OUTPUT_TIM8_BKIN (4)
<> 135:176b8275d35d 1161 * @arg @ref LL_COMP_OUTPUT_TIM8_BKIN2 (4)
<> 135:176b8275d35d 1162 * @arg @ref LL_COMP_OUTPUT_TIM1_TIM8_BKIN2 (4)
<> 135:176b8275d35d 1163 * @arg @ref LL_COMP_OUTPUT_TIM20_BKIN (5)
<> 135:176b8275d35d 1164 * @arg @ref LL_COMP_OUTPUT_TIM20_BKIN2 (5)
<> 135:176b8275d35d 1165 * @arg @ref LL_COMP_OUTPUT_TIM1_TIM8_TIM20_BKIN2 (5)
<> 135:176b8275d35d 1166 * @arg @ref LL_COMP_OUTPUT_TIM1_OCCLR_COMP1_2_3_7 (4)
<> 135:176b8275d35d 1167 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR_COMP1_2_3 (4)
<> 135:176b8275d35d 1168 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR_COMP1_2_4_5 (4)
<> 135:176b8275d35d 1169 * @arg @ref LL_COMP_OUTPUT_TIM8_OCCLR_COMP4_5_6_7 (4)
<> 135:176b8275d35d 1170 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR_COMP2_4 (6)
<> 135:176b8275d35d 1171 * @arg @ref LL_COMP_OUTPUT_TIM1_IC1_COMP2 (2)
<> 135:176b8275d35d 1172 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4_COMP2 (2)
<> 135:176b8275d35d 1173 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1_COMP2 (1)
<> 135:176b8275d35d 1174 * @arg @ref LL_COMP_OUTPUT_TIM1_IC1_COMP1_2 (3)
<> 135:176b8275d35d 1175 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4_COMP1_2 (3)
<> 135:176b8275d35d 1176 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1_COMP1_2 (3)
<> 135:176b8275d35d 1177 * @arg @ref LL_COMP_OUTPUT_TIM20_OCCLR_COMP2 (5)
<> 135:176b8275d35d 1178 * @arg @ref LL_COMP_OUTPUT_TIM3_IC2_COMP3 (4)
<> 135:176b8275d35d 1179 * @arg @ref LL_COMP_OUTPUT_TIM4_IC1_COMP3 (4)
<> 135:176b8275d35d 1180 * @arg @ref LL_COMP_OUTPUT_TIM15_IC1_COMP3 (4)
<> 135:176b8275d35d 1181 * @arg @ref LL_COMP_OUTPUT_TIM15_BKIN
<> 135:176b8275d35d 1182 * @arg @ref LL_COMP_OUTPUT_TIM3_IC3_COMP4 (1)
<> 135:176b8275d35d 1183 * @arg @ref LL_COMP_OUTPUT_TIM4_IC2_COMP4
<> 135:176b8275d35d 1184 * @arg @ref LL_COMP_OUTPUT_TIM15_IC2_COMP4
<> 135:176b8275d35d 1185 * @arg @ref LL_COMP_OUTPUT_TIM15_OCCLR_COMP4
<> 135:176b8275d35d 1186 * @arg @ref LL_COMP_OUTPUT_TIM2_IC1_COMP5 (4)
<> 135:176b8275d35d 1187 * @arg @ref LL_COMP_OUTPUT_TIM4_IC3_COMP5 (4)
<> 135:176b8275d35d 1188 * @arg @ref LL_COMP_OUTPUT_TIM17_IC1_COMP5 (4)
<> 135:176b8275d35d 1189 * @arg @ref LL_COMP_OUTPUT_TIM16_BKIN
<> 135:176b8275d35d 1190 * @arg @ref LL_COMP_OUTPUT_TIM2_IC2_COMP6
<> 135:176b8275d35d 1191 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR_COMP6
<> 135:176b8275d35d 1192 * @arg @ref LL_COMP_OUTPUT_TIM4_IC4_COMP6
<> 135:176b8275d35d 1193 * @arg @ref LL_COMP_OUTPUT_TIM16_IC1_COMP6
<> 135:176b8275d35d 1194 * @arg @ref LL_COMP_OUTPUT_TIM16_OCCLR_COMP6
<> 135:176b8275d35d 1195 * @arg @ref LL_COMP_OUTPUT_TIM1_IC2_COMP7 (4)
<> 135:176b8275d35d 1196 * @arg @ref LL_COMP_OUTPUT_TIM2_IC3_COMP7 (4)
<> 135:176b8275d35d 1197 * @arg @ref LL_COMP_OUTPUT_TIM17_OCCLR_COMP7 (4)
<> 135:176b8275d35d 1198 * @arg @ref LL_COMP_OUTPUT_TIM17_BKIN (4)
<> 135:176b8275d35d 1199 *
<> 135:176b8275d35d 1200 * (1) Parameter available on devices: STM32F302x8, STM32F318xx, STM32F303x8, STM32F328xx, STM32F334x8, STM32F302xC, STM32F302xE, STM32F303xC, STM32F358xx, STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1201 * (2) Parameter available on devices: STM32F301x8, STM32F302x8, STM32F318xx, STM32F303x8, STM32F328xx, STM32F334x8.\n
<> 135:176b8275d35d 1202 * (3) Parameter available on devices: STM32F302xC, STM32F302xE, STM32F303xC, STM32F358xx, STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1203 * (4) Parameter available on devices: STM32F303xC, STM32F358xx, STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1204 * (5) Parameter available on devices: STM32F303xE, STM32F398xx.\n
<> 135:176b8275d35d 1205 * (6) Parameter available on devices: STM32F303x8, STM32F328xx, STM32F334x8.
<> 135:176b8275d35d 1206 */
<> 135:176b8275d35d 1207 __STATIC_INLINE uint32_t LL_COMP_GetOutputSelection(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1208 {
<> 135:176b8275d35d 1209 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxOUTSEL));
<> 135:176b8275d35d 1210 }
<> 135:176b8275d35d 1211
<> 135:176b8275d35d 1212 /**
<> 135:176b8275d35d 1213 * @brief Set comparator instance output polarity.
<> 135:176b8275d35d 1214 * @rmtoll CSR COMPxPOL LL_COMP_SetOutputPolarity
<> 135:176b8275d35d 1215 * @param COMPx Comparator instance
<> 135:176b8275d35d 1216 * @param OutputPolarity This parameter can be one of the following values:
<> 135:176b8275d35d 1217 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
<> 135:176b8275d35d 1218 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
<> 135:176b8275d35d 1219 * @retval None
<> 135:176b8275d35d 1220 */
<> 135:176b8275d35d 1221 __STATIC_INLINE void LL_COMP_SetOutputPolarity(COMP_TypeDef *COMPx, uint32_t OutputPolarity)
<> 135:176b8275d35d 1222 {
<> 135:176b8275d35d 1223 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxPOL, OutputPolarity);
<> 135:176b8275d35d 1224 }
<> 135:176b8275d35d 1225
<> 135:176b8275d35d 1226 /**
<> 135:176b8275d35d 1227 * @brief Get comparator instance output polarity.
<> 135:176b8275d35d 1228 * @rmtoll CSR COMPxPOL LL_COMP_GetOutputPolarity
<> 135:176b8275d35d 1229 * @param COMPx Comparator instance
<> 135:176b8275d35d 1230 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1231 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
<> 135:176b8275d35d 1232 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
<> 135:176b8275d35d 1233 */
<> 135:176b8275d35d 1234 __STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1235 {
<> 135:176b8275d35d 1236 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxPOL));
<> 135:176b8275d35d 1237 }
<> 135:176b8275d35d 1238
<> 135:176b8275d35d 1239 /**
<> 135:176b8275d35d 1240 * @brief Set comparator instance blanking source.
<> 135:176b8275d35d 1241 * @note Blanking source may be specific to each comparator instance.
<> 135:176b8275d35d 1242 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1243 * @note Availability of parameters of blanking source from timer
<> 135:176b8275d35d 1244 * depends on timers availability on the selected device.
<> 135:176b8275d35d 1245 * @rmtoll CSR COMPxBLANKING LL_COMP_SetOutputBlankingSource
<> 135:176b8275d35d 1246 * @param COMPx Comparator instance
<> 135:176b8275d35d 1247 * @param BlankingSource This parameter can be one of the following values:
<> 135:176b8275d35d 1248 * @arg @ref LL_COMP_BLANKINGSRC_NONE
<> 135:176b8275d35d 1249 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2 (1)
<> 135:176b8275d35d 1250 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2 (1)
<> 135:176b8275d35d 1251 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2 (1)
<> 135:176b8275d35d 1252 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2 (2)(3)
<> 135:176b8275d35d 1253 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1_2 (2)(3)
<> 135:176b8275d35d 1254 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1_2 (2)(3)
<> 135:176b8275d35d 1255 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4
<> 135:176b8275d35d 1256 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4
<> 135:176b8275d35d 1257 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 (2)
<> 135:176b8275d35d 1258 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 (1)(2)
<> 135:176b8275d35d 1259 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2_7 (3)
<> 135:176b8275d35d 1260 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3_6 (3)
<> 135:176b8275d35d 1261 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4_5_6_7 (3)
<> 135:176b8275d35d 1262 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6_7 (3)
<> 135:176b8275d35d 1263 *
<> 135:176b8275d35d 1264 * (1) Parameter available on devices: STM32F301x8, STM32F302x8, STM32F318xx, STM32F303x8, STM32F334x8, STM32F328xx.\n
<> 135:176b8275d35d 1265 * (2) Parameter available on devices: STM32F302xE, STM32F302xC.\n
<> 135:176b8275d35d 1266 * (3) Parameter available on devices: STM32F303xE, STM32F398xx, STM32F303xC, STM32F358xx.
<> 135:176b8275d35d 1267 * @retval None
<> 135:176b8275d35d 1268 */
<> 135:176b8275d35d 1269 __STATIC_INLINE void LL_COMP_SetOutputBlankingSource(COMP_TypeDef *COMPx, uint32_t BlankingSource)
<> 135:176b8275d35d 1270 {
<> 135:176b8275d35d 1271 MODIFY_REG(COMPx->CSR, COMP_CSR_COMPxBLANKING, BlankingSource);
<> 135:176b8275d35d 1272 }
<> 135:176b8275d35d 1273
<> 135:176b8275d35d 1274 /**
<> 135:176b8275d35d 1275 * @brief Get comparator instance blanking source.
<> 135:176b8275d35d 1276 * @note Availability of parameters of blanking source from timer
<> 135:176b8275d35d 1277 * depends on timers availability on the selected device.
<> 135:176b8275d35d 1278 * @note Blanking source may be specific to each comparator instance.
<> 135:176b8275d35d 1279 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1280 * @rmtoll CSR COMPxBLANKING LL_COMP_GetOutputBlankingSource
<> 135:176b8275d35d 1281 * @param COMPx Comparator instance
<> 135:176b8275d35d 1282 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1283 * @arg @ref LL_COMP_BLANKINGSRC_NONE
<> 135:176b8275d35d 1284 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2 (1)
<> 135:176b8275d35d 1285 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2 (1)
<> 135:176b8275d35d 1286 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2 (1)
<> 135:176b8275d35d 1287 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2 (2)(3)
<> 135:176b8275d35d 1288 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1_2 (2)(3)
<> 135:176b8275d35d 1289 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1_2 (2)(3)
<> 135:176b8275d35d 1290 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4
<> 135:176b8275d35d 1291 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4
<> 135:176b8275d35d 1292 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 (2)
<> 135:176b8275d35d 1293 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 (1)(2)
<> 135:176b8275d35d 1294 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1_2_7 (3)
<> 135:176b8275d35d 1295 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3_6 (3)
<> 135:176b8275d35d 1296 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4_5_6_7 (3)
<> 135:176b8275d35d 1297 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6_7 (3)
<> 135:176b8275d35d 1298 *
<> 135:176b8275d35d 1299 * (1) Parameter available on devices: STM32F301x8, STM32F302x8, STM32F318xx, STM32F303x8, STM32F334x8, STM32F328xx.\n
<> 135:176b8275d35d 1300 * (2) Parameter available on devices: STM32F302xE, STM32F302xC.\n
<> 135:176b8275d35d 1301 * (3) Parameter available on devices: STM32F303xE, STM32F398xx, STM32F303xC, STM32F358xx.
<> 135:176b8275d35d 1302 */
<> 135:176b8275d35d 1303 __STATIC_INLINE uint32_t LL_COMP_GetOutputBlankingSource(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1304 {
<> 135:176b8275d35d 1305 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxBLANKING));
<> 135:176b8275d35d 1306 }
<> 135:176b8275d35d 1307
<> 135:176b8275d35d 1308 /**
<> 135:176b8275d35d 1309 * @}
<> 135:176b8275d35d 1310 */
<> 135:176b8275d35d 1311
<> 135:176b8275d35d 1312 /** @defgroup COMP_LL_EF_Operation Operation on comparator instance
<> 135:176b8275d35d 1313 * @{
<> 135:176b8275d35d 1314 */
<> 135:176b8275d35d 1315
<> 135:176b8275d35d 1316 /**
<> 135:176b8275d35d 1317 * @brief Enable comparator instance.
<> 135:176b8275d35d 1318 * @note After enable from off state, comparator requires a delay
<> 135:176b8275d35d 1319 * to reach reach propagation delay specification.
<> 135:176b8275d35d 1320 * Refer to device datasheet, parameter "tSTART".
<> 135:176b8275d35d 1321 * @rmtoll CSR COMPxEN LL_COMP_Enable
<> 135:176b8275d35d 1322 * @param COMPx Comparator instance
<> 135:176b8275d35d 1323 * @retval None
<> 135:176b8275d35d 1324 */
<> 135:176b8275d35d 1325 __STATIC_INLINE void LL_COMP_Enable(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1326 {
<> 135:176b8275d35d 1327 SET_BIT(COMPx->CSR, COMP_CSR_COMPxEN);
<> 135:176b8275d35d 1328 }
<> 135:176b8275d35d 1329
<> 135:176b8275d35d 1330 /**
<> 135:176b8275d35d 1331 * @brief Disable comparator instance.
<> 135:176b8275d35d 1332 * @rmtoll CSR COMPxEN LL_COMP_Disable
<> 135:176b8275d35d 1333 * @param COMPx Comparator instance
<> 135:176b8275d35d 1334 * @retval None
<> 135:176b8275d35d 1335 */
<> 135:176b8275d35d 1336 __STATIC_INLINE void LL_COMP_Disable(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1337 {
<> 135:176b8275d35d 1338 CLEAR_BIT(COMPx->CSR, COMP_CSR_COMPxEN);
<> 135:176b8275d35d 1339 }
<> 135:176b8275d35d 1340
<> 135:176b8275d35d 1341 /**
<> 135:176b8275d35d 1342 * @brief Get comparator enable state
<> 135:176b8275d35d 1343 * (0: COMP is disabled, 1: COMP is enabled)
<> 135:176b8275d35d 1344 * @rmtoll CSR COMPxEN LL_COMP_IsEnabled
<> 135:176b8275d35d 1345 * @param COMPx Comparator instance
<> 135:176b8275d35d 1346 * @retval State of bit (1 or 0).
<> 135:176b8275d35d 1347 */
<> 135:176b8275d35d 1348 __STATIC_INLINE uint32_t LL_COMP_IsEnabled(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1349 {
<> 135:176b8275d35d 1350 return (READ_BIT(COMPx->CSR, COMP_CSR_COMPxEN) == (COMP_CSR_COMPxEN));
<> 135:176b8275d35d 1351 }
<> 135:176b8275d35d 1352
<> 135:176b8275d35d 1353 /**
<> 135:176b8275d35d 1354 * @brief Lock comparator instance.
<> 135:176b8275d35d 1355 * @note Once locked, comparator configuration can be accessed in read-only.
<> 135:176b8275d35d 1356 * @note The only way to unlock the comparator is a device hardware reset.
<> 135:176b8275d35d 1357 * @rmtoll CSR COMPxLOCK LL_COMP_Lock
<> 135:176b8275d35d 1358 * @param COMPx Comparator instance
<> 135:176b8275d35d 1359 * @retval None
<> 135:176b8275d35d 1360 */
<> 135:176b8275d35d 1361 __STATIC_INLINE void LL_COMP_Lock(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1362 {
<> 135:176b8275d35d 1363 SET_BIT(COMPx->CSR, COMP_CSR_COMPxLOCK);
<> 135:176b8275d35d 1364 }
<> 135:176b8275d35d 1365
<> 135:176b8275d35d 1366 /**
<> 135:176b8275d35d 1367 * @brief Get comparator lock state
<> 135:176b8275d35d 1368 * (0: COMP is unlocked, 1: COMP is locked).
<> 135:176b8275d35d 1369 * @note Once locked, comparator configuration can be accessed in read-only.
<> 135:176b8275d35d 1370 * @note The only way to unlock the comparator is a device hardware reset.
<> 135:176b8275d35d 1371 * @rmtoll CSR COMPxLOCK LL_COMP_IsLocked
<> 135:176b8275d35d 1372 * @param COMPx Comparator instance
<> 135:176b8275d35d 1373 * @retval State of bit (1 or 0).
<> 135:176b8275d35d 1374 */
<> 135:176b8275d35d 1375 __STATIC_INLINE uint32_t LL_COMP_IsLocked(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1376 {
<> 135:176b8275d35d 1377 return (READ_BIT(COMPx->CSR, COMP_CSR_COMPxLOCK) == (COMP_CSR_COMPxLOCK));
<> 135:176b8275d35d 1378 }
<> 135:176b8275d35d 1379
<> 135:176b8275d35d 1380 /**
<> 135:176b8275d35d 1381 * @brief Read comparator instance output level.
<> 135:176b8275d35d 1382 * @note The comparator output level depends on the selected polarity
<> 135:176b8275d35d 1383 * (Refer to function @ref LL_COMP_SetOutputPolarity()).
<> 135:176b8275d35d 1384 * If the comparator polarity is not inverted:
<> 135:176b8275d35d 1385 * - Comparator output is low when the input plus
<> 135:176b8275d35d 1386 * is at a lower voltage than the input minus
<> 135:176b8275d35d 1387 * - Comparator output is high when the input plus
<> 135:176b8275d35d 1388 * is at a higher voltage than the input minus
<> 135:176b8275d35d 1389 * If the comparator polarity is inverted:
<> 135:176b8275d35d 1390 * - Comparator output is high when the input plus
<> 135:176b8275d35d 1391 * is at a lower voltage than the input minus
<> 135:176b8275d35d 1392 * - Comparator output is low when the input plus
<> 135:176b8275d35d 1393 * is at a higher voltage than the input minus
<> 135:176b8275d35d 1394 * @rmtoll CSR COMPxOUT LL_COMP_ReadOutputLevel
<> 135:176b8275d35d 1395 * @param COMPx Comparator instance
<> 135:176b8275d35d 1396 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1397 * @arg @ref LL_COMP_OUTPUT_LEVEL_LOW
<> 135:176b8275d35d 1398 * @arg @ref LL_COMP_OUTPUT_LEVEL_HIGH
<> 135:176b8275d35d 1399 */
<> 135:176b8275d35d 1400 __STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1401 {
<> 135:176b8275d35d 1402 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_COMPxOUT)
<> 135:176b8275d35d 1403 >> LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS);
<> 135:176b8275d35d 1404 }
<> 135:176b8275d35d 1405
<> 135:176b8275d35d 1406 /**
<> 135:176b8275d35d 1407 * @}
<> 135:176b8275d35d 1408 */
<> 135:176b8275d35d 1409
<> 135:176b8275d35d 1410 #if defined(USE_FULL_LL_DRIVER)
<> 135:176b8275d35d 1411 /** @defgroup COMP_LL_EF_Init Initialization and de-initialization functions
<> 135:176b8275d35d 1412 * @{
<> 135:176b8275d35d 1413 */
<> 135:176b8275d35d 1414
<> 135:176b8275d35d 1415 ErrorStatus LL_COMP_DeInit(COMP_TypeDef *COMPx);
<> 135:176b8275d35d 1416 ErrorStatus LL_COMP_Init(COMP_TypeDef *COMPx, LL_COMP_InitTypeDef *COMP_InitStruct);
<> 135:176b8275d35d 1417 void LL_COMP_StructInit(LL_COMP_InitTypeDef *COMP_InitStruct);
<> 135:176b8275d35d 1418
<> 135:176b8275d35d 1419 /**
<> 135:176b8275d35d 1420 * @}
<> 135:176b8275d35d 1421 */
<> 135:176b8275d35d 1422 #endif /* USE_FULL_LL_DRIVER */
<> 135:176b8275d35d 1423
<> 135:176b8275d35d 1424 /**
<> 135:176b8275d35d 1425 * @}
<> 135:176b8275d35d 1426 */
<> 135:176b8275d35d 1427
<> 135:176b8275d35d 1428 /**
<> 135:176b8275d35d 1429 * @}
<> 135:176b8275d35d 1430 */
<> 135:176b8275d35d 1431
<> 135:176b8275d35d 1432 #endif /* COMP1 || COMP2 || COMP3 || COMP4 || COMP5 || COMP6 || COMP7 */
<> 135:176b8275d35d 1433
<> 135:176b8275d35d 1434
<> 135:176b8275d35d 1435 #endif /* STM32F301x8 || STM32F302x8 || STM32F302xC || STM32F302xE || STM32F303x8 || STM32F303xC || STM32F303xE || STM32F318xx || STM32F328xx || STM32F334x8 || STM32F358xx || STM32F398xx */
<> 135:176b8275d35d 1436
<> 135:176b8275d35d 1437 #if defined (COMP_V1_1_0_0)
<> 135:176b8275d35d 1438
<> 135:176b8275d35d 1439 #if defined (COMP1) || defined (COMP2)
<> 135:176b8275d35d 1440
<> 135:176b8275d35d 1441 /** @defgroup COMP_LL COMP
<> 135:176b8275d35d 1442 * @{
<> 135:176b8275d35d 1443 */
<> 135:176b8275d35d 1444
<> 135:176b8275d35d 1445 /* Private types -------------------------------------------------------------*/
<> 135:176b8275d35d 1446 /* Private variables ---------------------------------------------------------*/
<> 135:176b8275d35d 1447 /* Private constants ---------------------------------------------------------*/
<> 135:176b8275d35d 1448 /** @defgroup COMP_LL_Private_Constants COMP Private Constants
<> 135:176b8275d35d 1449 * @{
<> 135:176b8275d35d 1450 */
<> 135:176b8275d35d 1451
<> 135:176b8275d35d 1452 /* Differentiation between COMP instances */
<> 135:176b8275d35d 1453 /* Note: Value not corresponding to a register offset since both */
<> 135:176b8275d35d 1454 /* COMP instances are sharing the same register) . */
<> 135:176b8275d35d 1455 #define COMPX_BASE COMP_BASE
<> 135:176b8275d35d 1456 #define COMPX (COMP1 - COMP2)
<> 135:176b8275d35d 1457
<> 135:176b8275d35d 1458 /* COMP registers bits positions */
<> 135:176b8275d35d 1459 #define LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS ((uint32_t)14U) /* Value equivalent to POSITION_VAL(COMP_CSR_COMP1OUT) */
<> 135:176b8275d35d 1460
<> 135:176b8275d35d 1461 /**
<> 135:176b8275d35d 1462 * @}
<> 135:176b8275d35d 1463 */
<> 135:176b8275d35d 1464
<> 135:176b8275d35d 1465 /* Private macros ------------------------------------------------------------*/
<> 135:176b8275d35d 1466 /** @defgroup COMP_LL_Private_Macros COMP Private Macros
<> 135:176b8275d35d 1467 * @{
<> 135:176b8275d35d 1468 */
<> 135:176b8275d35d 1469
<> 135:176b8275d35d 1470 /**
<> 135:176b8275d35d 1471 * @brief Driver macro reserved for internal use: if COMP instance selected
<> 135:176b8275d35d 1472 * is odd (COMP1, COMP3, ...), return value '1', else return '0'.
<> 135:176b8275d35d 1473 * @param __COMP_INSTANCE__ COMP instance
<> 135:176b8275d35d 1474 * @retval If COMP instance is odd, value '1'. Else, value '0'.
<> 135:176b8275d35d 1475 */
<> 135:176b8275d35d 1476 #define __COMP_IS_INSTANCE_ODD(__COMP_INSTANCE__) \
<> 135:176b8275d35d 1477 ((~(((uint32_t)(__COMP_INSTANCE__) - COMP_BASE) >> 1U)) & 0x00000001)
<> 135:176b8275d35d 1478
<> 135:176b8275d35d 1479 /**
<> 135:176b8275d35d 1480 * @brief Driver macro reserved for internal use: if COMP instance selected
<> 135:176b8275d35d 1481 * is even (COMP2, COMP4, ...), return value '1', else return '0'.
<> 135:176b8275d35d 1482 * @param __COMP_INSTANCE__ COMP instance
<> 135:176b8275d35d 1483 * @retval If COMP instance is even, value '1'. Else, value '0'.
<> 135:176b8275d35d 1484 */
<> 135:176b8275d35d 1485 #define __COMP_IS_INSTANCE_EVEN(__COMP_INSTANCE__) \
<> 135:176b8275d35d 1486 (((uint32_t)(__COMP_INSTANCE__) - COMP_BASE) >> 1U)
<> 135:176b8275d35d 1487
<> 135:176b8275d35d 1488 /**
<> 135:176b8275d35d 1489 * @brief Driver macro reserved for internal use: from COMP instance
<> 135:176b8275d35d 1490 * selected, set offset of bits into COMP register.
<> 135:176b8275d35d 1491 * @note Since both COMP instances are sharing the same register
<> 135:176b8275d35d 1492 * with 2 area of bits with an offset of 16 bits, this function
<> 135:176b8275d35d 1493 * returns value "0" if COMP1 is selected and "16" if COMP2 is
<> 135:176b8275d35d 1494 * selected.
<> 135:176b8275d35d 1495 * @param __COMP_INSTANCE__ COMP instance
<> 135:176b8275d35d 1496 * @retval Bits offset in register 32 bits
<> 135:176b8275d35d 1497 */
<> 135:176b8275d35d 1498 #define __COMP_BITOFFSET_INSTANCE(__COMP_INSTANCE__) \
<> 135:176b8275d35d 1499 (((uint32_t)(__COMP_INSTANCE__) - COMP_BASE) << 3U)
<> 135:176b8275d35d 1500
<> 135:176b8275d35d 1501 /**
<> 135:176b8275d35d 1502 * @}
<> 135:176b8275d35d 1503 */
<> 135:176b8275d35d 1504
<> 135:176b8275d35d 1505 /* Exported types ------------------------------------------------------------*/
<> 135:176b8275d35d 1506 #if defined(USE_FULL_LL_DRIVER)
<> 135:176b8275d35d 1507 /** @defgroup COMP_LL_ES_INIT COMP Exported Init structure
<> 135:176b8275d35d 1508 * @{
<> 135:176b8275d35d 1509 */
<> 135:176b8275d35d 1510
<> 135:176b8275d35d 1511 /**
<> 135:176b8275d35d 1512 * @brief Structure definition of some features of COMP instance.
<> 135:176b8275d35d 1513 */
<> 135:176b8275d35d 1514 typedef struct
<> 135:176b8275d35d 1515 {
<> 135:176b8275d35d 1516 uint32_t PowerMode; /*!< Set comparator operating mode to adjust power and speed.
<> 135:176b8275d35d 1517 This parameter can be a value of @ref COMP_LL_EC_POWERMODE
<> 135:176b8275d35d 1518
<> 135:176b8275d35d 1519 This feature can be modified afterwards using unitary function @ref LL_COMP_SetPowerMode(). */
<> 135:176b8275d35d 1520
<> 135:176b8275d35d 1521 uint32_t InputPlus; /*!< Set comparator input plus (non-inverting input).
<> 135:176b8275d35d 1522 This parameter can be a value of @ref COMP_LL_EC_INPUT_PLUS
<> 135:176b8275d35d 1523
<> 135:176b8275d35d 1524 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputPlus(). */
<> 135:176b8275d35d 1525
<> 135:176b8275d35d 1526 uint32_t InputMinus; /*!< Set comparator input minus (inverting input).
<> 135:176b8275d35d 1527 This parameter can be a value of @ref COMP_LL_EC_INPUT_MINUS
<> 135:176b8275d35d 1528
<> 135:176b8275d35d 1529 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputMinus(). */
<> 135:176b8275d35d 1530
<> 135:176b8275d35d 1531 uint32_t InputHysteresis; /*!< Set comparator hysteresis mode of the input minus.
<> 135:176b8275d35d 1532 This parameter can be a value of @ref COMP_LL_EC_INPUT_HYSTERESIS
<> 135:176b8275d35d 1533
<> 135:176b8275d35d 1534 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputHysteresis(). */
<> 135:176b8275d35d 1535
<> 135:176b8275d35d 1536 uint32_t OutputSelection; /*!< Set comparator output selection.
<> 135:176b8275d35d 1537 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_SELECTION
<> 135:176b8275d35d 1538
<> 135:176b8275d35d 1539 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputSelection(). */
<> 135:176b8275d35d 1540
<> 135:176b8275d35d 1541 uint32_t OutputPolarity; /*!< Set comparator output polarity.
<> 135:176b8275d35d 1542 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_POLARITY
<> 135:176b8275d35d 1543
<> 135:176b8275d35d 1544 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputPolarity(). */
<> 135:176b8275d35d 1545
<> 135:176b8275d35d 1546 } LL_COMP_InitTypeDef;
<> 135:176b8275d35d 1547
<> 135:176b8275d35d 1548 /**
<> 135:176b8275d35d 1549 * @}
<> 135:176b8275d35d 1550 */
<> 135:176b8275d35d 1551 #endif /* USE_FULL_LL_DRIVER */
<> 135:176b8275d35d 1552
<> 135:176b8275d35d 1553 /* Exported constants --------------------------------------------------------*/
<> 135:176b8275d35d 1554 /** @defgroup COMP_LL_Exported_Constants COMP Exported Constants
<> 135:176b8275d35d 1555 * @{
<> 135:176b8275d35d 1556 */
<> 135:176b8275d35d 1557
<> 135:176b8275d35d 1558 /** @defgroup COMP_LL_EC_COMMON_WINDOWMODE Comparator common modes - Window mode
<> 135:176b8275d35d 1559 * @{
<> 135:176b8275d35d 1560 */
<> 135:176b8275d35d 1561 #define LL_COMP_WINDOWMODE_DISABLE ((uint32_t)0x00000000U) /*!< Window mode disable: Comparators 1 and 2 are independent */
<> 135:176b8275d35d 1562 #define LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WNDWEN) /*!< Window mode enable: Comparators instances pair COMP1 and COMP2 have their input plus connected together. The common input is COMP1 input plus (COMP2 input plus is no more accessible). */
<> 135:176b8275d35d 1563 /**
<> 135:176b8275d35d 1564 * @}
<> 135:176b8275d35d 1565 */
<> 135:176b8275d35d 1566
<> 135:176b8275d35d 1567 /** @defgroup COMP_LL_EC_POWERMODE Comparator modes - Power mode
<> 135:176b8275d35d 1568 * @{
<> 135:176b8275d35d 1569 */
<> 135:176b8275d35d 1570 #define LL_COMP_POWERMODE_HIGHSPEED ((uint32_t)0x00000000U) /*!< COMP power mode to high speed */
<> 135:176b8275d35d 1571 #define LL_COMP_POWERMODE_MEDIUMSPEED (COMP_CSR_COMP1MODE_0) /*!< COMP power mode to medium speed */
<> 135:176b8275d35d 1572 #define LL_COMP_POWERMODE_LOWPOWER (COMP_CSR_COMP1MODE_1) /*!< COMP power mode to low power */
<> 135:176b8275d35d 1573 #define LL_COMP_POWERMODE_ULTRALOWPOWER (COMP_CSR_COMP1MODE_1 | COMP_CSR_COMP1MODE_0) /*!< COMP power mode to ultra-low power */
<> 135:176b8275d35d 1574 /**
<> 135:176b8275d35d 1575 * @}
<> 135:176b8275d35d 1576 */
<> 135:176b8275d35d 1577
<> 135:176b8275d35d 1578 /** @defgroup COMP_LL_EC_INPUT_PLUS Comparator inputs - Input plus (input non-inverting) selection
<> 135:176b8275d35d 1579 * @{
<> 135:176b8275d35d 1580 */
<> 135:176b8275d35d 1581 #define LL_COMP_INPUT_PLUS_IO1 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, pin PA3 for COMP2) */
<> 135:176b8275d35d 1582 #define LL_COMP_INPUT_PLUS_DAC1_CH1 (COMP_CSR_COMP1SW1) /*!< Comparator input plus connected to DAC1 channel 1 (DAC_OUT1), through dedicated switch (Note: this switch is solely intended to redirect signals onto high impedance input, such as COMP1 input plus (highly resistive switch)) (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 1583 /**
<> 135:176b8275d35d 1584 * @}
<> 135:176b8275d35d 1585 */
<> 135:176b8275d35d 1586
<> 135:176b8275d35d 1587 /** @defgroup COMP_LL_EC_INPUT_MINUS Comparator inputs - Input minus (input inverting) selection
<> 135:176b8275d35d 1588 * @{
<> 135:176b8275d35d 1589 */
<> 135:176b8275d35d 1590 #define LL_COMP_INPUT_MINUS_1_4VREFINT ((uint32_t)0x00000000U) /*!< Comparator input minus connected to 1/4 VrefInt */
<> 135:176b8275d35d 1591 #define LL_COMP_INPUT_MINUS_1_2VREFINT ( COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to 1/2 VrefInt */
<> 135:176b8275d35d 1592 #define LL_COMP_INPUT_MINUS_3_4VREFINT ( COMP_CSR_COMP1INSEL_1 ) /*!< Comparator input minus connected to 3/4 VrefInt */
<> 135:176b8275d35d 1593 #define LL_COMP_INPUT_MINUS_VREFINT ( COMP_CSR_COMP1INSEL_1 | COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to VrefInt */
<> 135:176b8275d35d 1594 #define LL_COMP_INPUT_MINUS_DAC1_CH1 (COMP_CSR_COMP1INSEL_2 ) /*!< Comparator input minus connected to DAC1 channel 1 (DAC_OUT1) */
<> 135:176b8275d35d 1595 #define LL_COMP_INPUT_MINUS_DAC1_CH2 (COMP_CSR_COMP1INSEL_2 | COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to DAC1 channel 2 (DAC_OUT2) */
<> 135:176b8275d35d 1596 #define LL_COMP_INPUT_MINUS_IO1 (COMP_CSR_COMP1INSEL_2 | COMP_CSR_COMP1INSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PA0 for COMP1, pin PA2 for COMP2) */
<> 135:176b8275d35d 1597 #define LL_COMP_INPUT_MINUS_IO2 (COMP_CSR_COMP1INSEL_2 | COMP_CSR_COMP1INSEL_1 | COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to IO2 (pin PA6 for COMP1 & COMP2) */
<> 135:176b8275d35d 1598 #define LL_COMP_INPUT_MINUS_IO3 (COMP_CSR_COMP1INSEL_2 | COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to IO3 (pin PA5 for COMP1 & COMP2) */
<> 135:176b8275d35d 1599 #define LL_COMP_INPUT_MINUS_IO4 (COMP_CSR_COMP1INSEL_2 ) /*!< Comparator input minus connected to IO4 (pin PA4 for COMP1 & COMP2) */
<> 135:176b8275d35d 1600 #define LL_COMP_INPUT_MINUS_DAC2_CH1 (COMP_CSR_COMP1INSEL_2 | COMP_CSR_COMP1INSEL_1 | COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to DAC2 channel 1 (DAC2_OUT1) */
<> 135:176b8275d35d 1601 /**
<> 135:176b8275d35d 1602 * @}
<> 135:176b8275d35d 1603 */
<> 135:176b8275d35d 1604
<> 135:176b8275d35d 1605 /** @defgroup COMP_LL_EC_INPUT_HYSTERESIS Comparator input - Hysteresis
<> 135:176b8275d35d 1606 * @{
<> 135:176b8275d35d 1607 */
<> 135:176b8275d35d 1608 #define LL_COMP_HYSTERESIS_NONE ((uint32_t)0x00000000U) /*!< No hysteresis */
<> 135:176b8275d35d 1609 #define LL_COMP_HYSTERESIS_LOW ( COMP_CSR_COMP1HYST_0) /*!< Hysteresis level low */
<> 135:176b8275d35d 1610 #define LL_COMP_HYSTERESIS_MEDIUM (COMP_CSR_COMP1HYST_1 ) /*!< Hysteresis level medium */
<> 135:176b8275d35d 1611 #define LL_COMP_HYSTERESIS_HIGH (COMP_CSR_COMP1HYST_1 | COMP_CSR_COMP1HYST_0) /*!< Hysteresis level high */
<> 135:176b8275d35d 1612 /**
<> 135:176b8275d35d 1613 * @}
<> 135:176b8275d35d 1614 */
<> 135:176b8275d35d 1615
<> 135:176b8275d35d 1616 /** @defgroup COMP_LL_EC_OUTPUT_SELECTION Comparator output - Output selection
<> 135:176b8275d35d 1617 * @{
<> 135:176b8275d35d 1618 */
<> 135:176b8275d35d 1619 /* Note: Output redirection is common for COMP1 and COMP2 */
<> 135:176b8275d35d 1620 #define LL_COMP_OUTPUT_NONE ((uint32_t)0x00000000U) /*!< COMP output is not connected to other peripherals (except GPIO and EXTI that are always connected to COMP output) */
<> 135:176b8275d35d 1621 #define LL_COMP_OUTPUT_TIM2_IC4 (COMP_CSR_COMP1OUTSEL_2) /*!< COMP output connected to TIM2 input capture 4 */
<> 135:176b8275d35d 1622 #define LL_COMP_OUTPUT_TIM2_OCCLR (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM2 OCREF clear */
<> 135:176b8275d35d 1623
<> 135:176b8275d35d 1624 /* Note: Output redirection specific to COMP instance: COMP1 */
<> 135:176b8275d35d 1625 #define LL_COMP_OUTPUT_TIM15_BKIN_COMP1 (COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM15 break input (BKIN) (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 1626 #define LL_COMP_OUTPUT_TIM3_IC1_COMP1 (COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM3 input capture 1 (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 1627 #define LL_COMP_OUTPUT_TIM3_OCCLR_COMP1 (COMP_CSR_COMP1OUTSEL_1 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM3 OCREF clear (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 1628 #define LL_COMP_OUTPUT_TIM5_IC4_COMP1 (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM5 input capture 4 (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 1629 #define LL_COMP_OUTPUT_TIM5_OCCLR_COMP1 (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_1 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM5 OCREF clear (specific to COMP instance: COMP1) */
<> 135:176b8275d35d 1630
<> 135:176b8275d35d 1631 /* Note: Output redirection specific to COMP instance: COMP2 */
<> 135:176b8275d35d 1632 #define LL_COMP_OUTPUT_TIM16_BKIN_COMP2 (COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM16 break input (BKIN) (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 1633 #define LL_COMP_OUTPUT_TIM4_IC1_COMP2 (COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM4 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 1634 #define LL_COMP_OUTPUT_TIM4_OCCLR_COMP2 (COMP_CSR_COMP1OUTSEL_1 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM4 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 1635 #define LL_COMP_OUTPUT_TIM3_IC1_COMP2 (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM3 input capture 1 (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 1636 #define LL_COMP_OUTPUT_TIM3_OCCLR_COMP2 (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_1 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM3 OCREF clear (specific to COMP instance: COMP2) */
<> 135:176b8275d35d 1637
<> 135:176b8275d35d 1638 /* Note: Output redirection specific to COMP instances, defined with */
<> 135:176b8275d35d 1639 /* generic naming not taking into account COMP instance constraints. */
<> 135:176b8275d35d 1640 /* Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1641 /* Note: Some output redirections cannot have a generic naming, */
<> 135:176b8275d35d 1642 /* due to literal value different depending on COMP instance. */
<> 135:176b8275d35d 1643 /* (For exemple: LL_COMP_OUTPUT_TIM3_IC1_COMP1 and */
<> 135:176b8275d35d 1644 /* LL_COMP_OUTPUT_TIM3_IC1_COMP2). */
<> 135:176b8275d35d 1645 #define LL_COMP_OUTPUT_TIM15_BKIN LL_COMP_OUTPUT_TIM15_BKIN_COMP1 /*!< COMP output connected to TIM15 break input (BKIN). Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1646 #define LL_COMP_OUTPUT_TIM16_BKIN LL_COMP_OUTPUT_TIM16_BKIN_COMP2 /*!< COMP output connected to TIM16 break input (BKIN). Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1647 #define LL_COMP_OUTPUT_TIM4_IC1 LL_COMP_OUTPUT_TIM4_IC1_COMP2 /*!< COMP output connected to TIM4 input capture 1. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1648 #define LL_COMP_OUTPUT_TIM4_OCCLR LL_COMP_OUTPUT_TIM4_OCCLR_COMP2 /*!< COMP output connected to TIM4 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1649 #define LL_COMP_OUTPUT_TIM5_IC4 LL_COMP_OUTPUT_TIM5_IC1_COMP1 /*!< COMP output connected to TIM5 input capture 4. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1650 #define LL_COMP_OUTPUT_TIM5_OCCLR LL_COMP_OUTPUT_TIM5_OCCLR_COMP1 /*!< COMP output connected to TIM5 OCREF clear. Caution: Parameter specific to COMP instances, defined with generic naming, not taking into account COMP instance constraints. Refer to literal definitions above for COMP instance constraints. */
<> 135:176b8275d35d 1651 /**
<> 135:176b8275d35d 1652 * @}
<> 135:176b8275d35d 1653 */
<> 135:176b8275d35d 1654
<> 135:176b8275d35d 1655 /** @defgroup COMP_LL_EC_OUTPUT_POLARITY Comparator output - Output polarity
<> 135:176b8275d35d 1656 * @{
<> 135:176b8275d35d 1657 */
<> 135:176b8275d35d 1658 #define LL_COMP_OUTPUTPOL_NONINVERTED ((uint32_t)0x00000000U) /*!< COMP output polarity is not inverted: comparator output is high when the plus (non-inverting) input is at a higher voltage than the minus (inverting) input */
<> 135:176b8275d35d 1659 #define LL_COMP_OUTPUTPOL_INVERTED (COMP_CSR_COMP1POL) /*!< COMP output polarity is inverted: comparator output is low when the plus (non-inverting) input is at a lower voltage than the minus (inverting) input */
<> 135:176b8275d35d 1660 /**
<> 135:176b8275d35d 1661 * @}
<> 135:176b8275d35d 1662 */
<> 135:176b8275d35d 1663
<> 135:176b8275d35d 1664 /** @defgroup COMP_LL_EC_OUTPUT_LEVEL Comparator output - Output level
<> 135:176b8275d35d 1665 * @{
<> 135:176b8275d35d 1666 */
<> 135:176b8275d35d 1667 #define LL_COMP_OUTPUT_LEVEL_LOW ((uint32_t)0x00000000U) /*!< Comparator output level low (if the polarity is not inverted, otherwise to be complemented) */
<> 135:176b8275d35d 1668 #define LL_COMP_OUTPUT_LEVEL_HIGH ((uint32_t)0x00000001U) /*!< Comparator output level high (if the polarity is not inverted, otherwise to be complemented) */
<> 135:176b8275d35d 1669 /**
<> 135:176b8275d35d 1670 * @}
<> 135:176b8275d35d 1671 */
<> 135:176b8275d35d 1672
<> 135:176b8275d35d 1673 /** @defgroup COMP_LL_EC_HW_DELAYS Definitions of COMP hardware constraints delays
<> 135:176b8275d35d 1674 * @note Only COMP IP HW delays are defined in COMP LL driver driver,
<> 135:176b8275d35d 1675 * not timeout values.
<> 135:176b8275d35d 1676 * For details on delays values, refer to descriptions in source code
<> 135:176b8275d35d 1677 * above each literal definition.
<> 135:176b8275d35d 1678 * @{
<> 135:176b8275d35d 1679 */
<> 135:176b8275d35d 1680
<> 135:176b8275d35d 1681 /* Delay for comparator startup time. */
<> 135:176b8275d35d 1682 /* Note: Delay required to reach propagation delay specification. */
<> 135:176b8275d35d 1683 /* Literal set to maximum value (refer to device datasheet, */
<> 135:176b8275d35d 1684 /* parameter "tSTART"). */
<> 135:176b8275d35d 1685 /* Unit: us */
<> 135:176b8275d35d 1686 #define LL_COMP_DELAY_STARTUP_US ((uint32_t) 60U) /*!< Delay for COMP startup time */
<> 135:176b8275d35d 1687
<> 135:176b8275d35d 1688 /* Delay for comparator voltage scaler stabilization time */
<> 135:176b8275d35d 1689 /* (voltage from VrefInt, delay based on VrefInt startup time). */
<> 135:176b8275d35d 1690 /* Literal set to maximum value (refer to device datasheet, */
<> 135:176b8275d35d 1691 /* parameter "tS_SC"). */
<> 135:176b8275d35d 1692 /* Unit: us */
<> 135:176b8275d35d 1693 #define LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US ((uint32_t) 200U) /*!< Delay for COMP voltage scaler stabilization time */
<> 135:176b8275d35d 1694
<> 135:176b8275d35d 1695
<> 135:176b8275d35d 1696 /**
<> 135:176b8275d35d 1697 * @}
<> 135:176b8275d35d 1698 */
<> 135:176b8275d35d 1699
<> 135:176b8275d35d 1700 /**
<> 135:176b8275d35d 1701 * @}
<> 135:176b8275d35d 1702 */
<> 135:176b8275d35d 1703
<> 135:176b8275d35d 1704 /* Exported macro ------------------------------------------------------------*/
<> 135:176b8275d35d 1705 /** @defgroup COMP_LL_Exported_Macros COMP Exported Macros
<> 135:176b8275d35d 1706 * @{
<> 135:176b8275d35d 1707 */
<> 135:176b8275d35d 1708 /** @defgroup COMP_LL_EM_WRITE_READ Common write and read registers macro
<> 135:176b8275d35d 1709 * @{
<> 135:176b8275d35d 1710 */
<> 135:176b8275d35d 1711
<> 135:176b8275d35d 1712 /**
<> 135:176b8275d35d 1713 * @brief Write a value in COMP register
<> 135:176b8275d35d 1714 * @param __INSTANCE__ comparator instance
<> 135:176b8275d35d 1715 * @param __REG__ Register to be written
<> 135:176b8275d35d 1716 * @param __VALUE__ Value to be written in the register
<> 135:176b8275d35d 1717 * @retval None
<> 135:176b8275d35d 1718 */
<> 135:176b8275d35d 1719 #define LL_COMP_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
<> 135:176b8275d35d 1720
<> 135:176b8275d35d 1721 /**
<> 135:176b8275d35d 1722 * @brief Read a value in COMP register
<> 135:176b8275d35d 1723 * @param __INSTANCE__ comparator instance
<> 135:176b8275d35d 1724 * @param __REG__ Register to be read
<> 135:176b8275d35d 1725 * @retval Register value
<> 135:176b8275d35d 1726 */
<> 135:176b8275d35d 1727 #define LL_COMP_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
<> 135:176b8275d35d 1728 /**
<> 135:176b8275d35d 1729 * @}
<> 135:176b8275d35d 1730 */
<> 135:176b8275d35d 1731
<> 135:176b8275d35d 1732 /** @defgroup COMP_LL_EM_HELPER_MACRO COMP helper macro
<> 135:176b8275d35d 1733 * @{
<> 135:176b8275d35d 1734 */
<> 135:176b8275d35d 1735
<> 135:176b8275d35d 1736 /**
<> 135:176b8275d35d 1737 * @brief Helper macro to select the COMP common instance
<> 135:176b8275d35d 1738 * to which is belonging the selected COMP instance.
<> 135:176b8275d35d 1739 * @note COMP common register instance can be used to
<> 135:176b8275d35d 1740 * set parameters common to several COMP instances.
<> 135:176b8275d35d 1741 * Refer to functions having argument "COMPxy_COMMON" as parameter.
<> 135:176b8275d35d 1742 * @param __COMPx__ COMP instance
<> 135:176b8275d35d 1743 * @retval COMP common instance or value "0" if there is no COMP common instance.
<> 135:176b8275d35d 1744 */
<> 135:176b8275d35d 1745 #define __LL_COMP_COMMON_INSTANCE(__COMPx__) \
<> 135:176b8275d35d 1746 (COMP12_COMMON)
<> 135:176b8275d35d 1747
<> 135:176b8275d35d 1748 /**
<> 135:176b8275d35d 1749 * @}
<> 135:176b8275d35d 1750 */
<> 135:176b8275d35d 1751
<> 135:176b8275d35d 1752 /**
<> 135:176b8275d35d 1753 * @}
<> 135:176b8275d35d 1754 */
<> 135:176b8275d35d 1755
<> 135:176b8275d35d 1756 /* Exported functions --------------------------------------------------------*/
<> 135:176b8275d35d 1757 /** @defgroup COMP_LL_Exported_Functions COMP Exported Functions
<> 135:176b8275d35d 1758 * @{
<> 135:176b8275d35d 1759 */
<> 135:176b8275d35d 1760
<> 135:176b8275d35d 1761 /** @defgroup COMP_LL_EF_Configuration_comparator_common Configuration of COMP hierarchical scope: common to several COMP instances
<> 135:176b8275d35d 1762 * @{
<> 135:176b8275d35d 1763 */
<> 135:176b8275d35d 1764
<> 135:176b8275d35d 1765 /**
<> 135:176b8275d35d 1766 * @brief Set window mode of a pair of comparators instances
<> 135:176b8275d35d 1767 * (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
<> 135:176b8275d35d 1768 * @rmtoll CSR WNDWEN LL_COMP_SetCommonWindowMode
<> 135:176b8275d35d 1769 * @param COMPxy_COMMON Comparator common instance
<> 135:176b8275d35d 1770 * (can be set directly from CMSIS definition or by using helper macro @ref __LL_COMP_COMMON_INSTANCE() )
<> 135:176b8275d35d 1771 * @param WindowMode This parameter can be one of the following values:
<> 135:176b8275d35d 1772 * @arg @ref LL_COMP_WINDOWMODE_DISABLE
<> 135:176b8275d35d 1773 * @arg @ref LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
<> 135:176b8275d35d 1774 * @retval None
<> 135:176b8275d35d 1775 */
<> 135:176b8275d35d 1776 __STATIC_INLINE void LL_COMP_SetCommonWindowMode(COMP_Common_TypeDef *COMPxy_COMMON, uint32_t WindowMode)
<> 135:176b8275d35d 1777 {
<> 135:176b8275d35d 1778 MODIFY_REG(COMPxy_COMMON->CSR, COMP_CSR_WNDWEN, WindowMode);
<> 135:176b8275d35d 1779 }
<> 135:176b8275d35d 1780
<> 135:176b8275d35d 1781 /**
<> 135:176b8275d35d 1782 * @brief Get window mode of a pair of comparators instances
<> 135:176b8275d35d 1783 * (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
<> 135:176b8275d35d 1784 * @rmtoll CSR WNDWEN LL_COMP_GetCommonWindowMode
<> 135:176b8275d35d 1785 * @param COMPxy_COMMON Comparator common instance
<> 135:176b8275d35d 1786 * (can be set directly from CMSIS definition or by using helper macro @ref __LL_COMP_COMMON_INSTANCE() )
<> 135:176b8275d35d 1787 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1788 * @arg @ref LL_COMP_WINDOWMODE_DISABLE
<> 135:176b8275d35d 1789 * @arg @ref LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
<> 135:176b8275d35d 1790 */
<> 135:176b8275d35d 1791 __STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode(COMP_Common_TypeDef *COMPxy_COMMON)
<> 135:176b8275d35d 1792 {
<> 135:176b8275d35d 1793 return (uint32_t)(READ_BIT(COMPxy_COMMON->CSR, COMP_CSR_WNDWEN));
<> 135:176b8275d35d 1794 }
<> 135:176b8275d35d 1795
<> 135:176b8275d35d 1796 /**
<> 135:176b8275d35d 1797 * @}
<> 135:176b8275d35d 1798 */
<> 135:176b8275d35d 1799
<> 135:176b8275d35d 1800 /** @defgroup COMP_LL_EF_Configuration_comparator_modes Configuration of comparator modes
<> 135:176b8275d35d 1801 * @{
<> 135:176b8275d35d 1802 */
<> 135:176b8275d35d 1803
<> 135:176b8275d35d 1804 /**
<> 135:176b8275d35d 1805 * @brief Set comparator instance operating mode to adjust power and speed.
<> 135:176b8275d35d 1806 * @rmtoll CSR COMP1MODE LL_COMP_SetPowerMode\n
<> 135:176b8275d35d 1807 * COMP2MODE LL_COMP_SetPowerMode
<> 135:176b8275d35d 1808 * @param COMPx Comparator instance
<> 135:176b8275d35d 1809 * @param PowerMode This parameter can be one of the following values:
<> 135:176b8275d35d 1810 * @arg @ref LL_COMP_POWERMODE_HIGHSPEED
<> 135:176b8275d35d 1811 * @arg @ref LL_COMP_POWERMODE_MEDIUMSPEED
<> 135:176b8275d35d 1812 * @arg @ref LL_COMP_POWERMODE_LOWPOWER
<> 135:176b8275d35d 1813 * @arg @ref LL_COMP_POWERMODE_ULTRALOWPOWER
<> 135:176b8275d35d 1814 * @retval None
<> 135:176b8275d35d 1815 */
<> 135:176b8275d35d 1816 __STATIC_INLINE void LL_COMP_SetPowerMode(COMP_TypeDef *COMPx, uint32_t PowerMode)
<> 135:176b8275d35d 1817 {
<> 135:176b8275d35d 1818 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 1819 COMP_CSR_COMP1MODE << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 1820 PowerMode << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 1821 }
<> 135:176b8275d35d 1822
<> 135:176b8275d35d 1823 /**
<> 135:176b8275d35d 1824 * @brief Get comparator instance operating mode to adjust power and speed.
<> 135:176b8275d35d 1825 * @rmtoll CSR COMP1MODE LL_COMP_GetPowerMode\n
<> 135:176b8275d35d 1826 * COMP2MODE LL_COMP_GetPowerMode
<> 135:176b8275d35d 1827 * @param COMPx Comparator instance
<> 135:176b8275d35d 1828 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1829 * @arg @ref LL_COMP_POWERMODE_HIGHSPEED
<> 135:176b8275d35d 1830 * @arg @ref LL_COMP_POWERMODE_MEDIUMSPEED
<> 135:176b8275d35d 1831 * @arg @ref LL_COMP_POWERMODE_LOWPOWER
<> 135:176b8275d35d 1832 * @arg @ref LL_COMP_POWERMODE_ULTRALOWPOWER
<> 135:176b8275d35d 1833 */
<> 135:176b8275d35d 1834 __STATIC_INLINE uint32_t LL_COMP_GetPowerMode(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1835 {
<> 135:176b8275d35d 1836 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 1837 COMP_CSR_COMP1MODE << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 1838 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 135:176b8275d35d 1839 );
<> 135:176b8275d35d 1840 }
<> 135:176b8275d35d 1841
<> 135:176b8275d35d 1842 /**
<> 135:176b8275d35d 1843 * @}
<> 135:176b8275d35d 1844 */
<> 135:176b8275d35d 1845
<> 135:176b8275d35d 1846 /** @defgroup COMP_LL_EF_Configuration_comparator_inputs Configuration of comparator inputs
<> 135:176b8275d35d 1847 * @{
<> 135:176b8275d35d 1848 */
<> 135:176b8275d35d 1849
<> 135:176b8275d35d 1850 /**
<> 135:176b8275d35d 1851 * @brief Set comparator inputs minus (inverting) and plus (non-inverting).
<> 135:176b8275d35d 1852 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 1853 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 1854 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1855 * @rmtoll CSR COMP1INSEL LL_COMP_ConfigInputs\n
<> 135:176b8275d35d 1856 * CSR COMP2INSEL LL_COMP_ConfigInputs\n
<> 135:176b8275d35d 1857 * CSR COMP1SW1 LL_COMP_ConfigInputs
<> 135:176b8275d35d 1858 * @param COMPx Comparator instance
<> 135:176b8275d35d 1859 * @param InputMinus This parameter can be one of the following values:
<> 135:176b8275d35d 1860 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 135:176b8275d35d 1861 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 135:176b8275d35d 1862 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 135:176b8275d35d 1863 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 135:176b8275d35d 1864 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 135:176b8275d35d 1865 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2
<> 135:176b8275d35d 1866 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 135:176b8275d35d 1867 * @arg @ref LL_COMP_INPUT_MINUS_IO2
<> 135:176b8275d35d 1868 * @arg @ref LL_COMP_INPUT_MINUS_IO3
<> 135:176b8275d35d 1869 * @arg @ref LL_COMP_INPUT_MINUS_IO4
<> 135:176b8275d35d 1870 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1
<> 135:176b8275d35d 1871 * @param InputPlus This parameter can be one of the following values:
<> 135:176b8275d35d 1872 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 135:176b8275d35d 1873 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
<> 135:176b8275d35d 1874 *
<> 135:176b8275d35d 1875 * (1) Parameter available only on COMP instance: COMP1.
<> 135:176b8275d35d 1876 * @retval None
<> 135:176b8275d35d 1877 */
<> 135:176b8275d35d 1878 __STATIC_INLINE void LL_COMP_ConfigInputs(COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus)
<> 135:176b8275d35d 1879 {
<> 135:176b8275d35d 1880 /* Note: Connection switch is applicable only to COMP instance COMP1, */
<> 135:176b8275d35d 1881 /* therefore if COMP2 is selected the equivalent bit is */
<> 135:176b8275d35d 1882 /* kept unmodified. */
<> 135:176b8275d35d 1883 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 1884 (COMP_CSR_COMP1INSEL | (COMP_CSR_COMP1SW1 * __COMP_IS_INSTANCE_ODD(COMPx))) << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 1885 (InputMinus | InputPlus) << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 1886 }
<> 135:176b8275d35d 1887
<> 135:176b8275d35d 1888 /**
<> 135:176b8275d35d 1889 * @brief Set comparator input plus (non-inverting).
<> 135:176b8275d35d 1890 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 1891 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 1892 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1893 * @rmtoll CSR COMP1INSEL LL_COMP_SetInputPlus\n
<> 135:176b8275d35d 1894 * CSR COMP2INSEL LL_COMP_SetInputPlus
<> 135:176b8275d35d 1895 * @param COMPx Comparator instance
<> 135:176b8275d35d 1896 * @param InputPlus This parameter can be one of the following values:
<> 135:176b8275d35d 1897 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 135:176b8275d35d 1898 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
<> 135:176b8275d35d 1899 *
<> 135:176b8275d35d 1900 * (1) Parameter available only on COMP instance: COMP1.
<> 135:176b8275d35d 1901 * @retval None
<> 135:176b8275d35d 1902 */
<> 135:176b8275d35d 1903 __STATIC_INLINE void LL_COMP_SetInputPlus(COMP_TypeDef *COMPx, uint32_t InputPlus)
<> 135:176b8275d35d 1904 {
<> 135:176b8275d35d 1905 /* Note: Connection switch is applicable only to COMP instance COMP1, */
<> 135:176b8275d35d 1906 /* therefore if COMP2 is selected the equivalent bit is */
<> 135:176b8275d35d 1907 /* kept unmodified. */
<> 135:176b8275d35d 1908 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 1909 (COMP_CSR_COMP1SW1 * __COMP_IS_INSTANCE_ODD(COMPx)) << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 1910 InputPlus << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 1911 }
<> 135:176b8275d35d 1912
<> 135:176b8275d35d 1913 /**
<> 135:176b8275d35d 1914 * @brief Get comparator input plus (non-inverting).
<> 135:176b8275d35d 1915 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 1916 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 1917 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1918 * @rmtoll CSR COMP1INSEL LL_COMP_GetInputPlus\n
<> 135:176b8275d35d 1919 * CSR COMP2INSEL LL_COMP_GetInputPlus
<> 135:176b8275d35d 1920 * @param COMPx Comparator instance
<> 135:176b8275d35d 1921 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1922 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 135:176b8275d35d 1923 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
<> 135:176b8275d35d 1924 *
<> 135:176b8275d35d 1925 * (1) Parameter available only on COMP instance: COMP1.
<> 135:176b8275d35d 1926 */
<> 135:176b8275d35d 1927 __STATIC_INLINE uint32_t LL_COMP_GetInputPlus(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1928 {
<> 135:176b8275d35d 1929 /* Note: Connection switch is applicable only to COMP instance COMP1, */
<> 135:176b8275d35d 1930 /* therefore is COMP2 is selected the returned value will be null. */
<> 135:176b8275d35d 1931 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 1932 COMP_CSR_COMP1SW1 << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 1933 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 135:176b8275d35d 1934 );
<> 135:176b8275d35d 1935 }
<> 135:176b8275d35d 1936
<> 135:176b8275d35d 1937 /**
<> 135:176b8275d35d 1938 * @brief Set comparator input minus (inverting).
<> 135:176b8275d35d 1939 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 1940 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 1941 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1942 * @rmtoll CSR COMP1SW1 LL_COMP_SetInputMinus
<> 135:176b8275d35d 1943 * @param COMPx Comparator instance
<> 135:176b8275d35d 1944 * @param InputMinus This parameter can be one of the following values:
<> 135:176b8275d35d 1945 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 135:176b8275d35d 1946 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 135:176b8275d35d 1947 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 135:176b8275d35d 1948 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 135:176b8275d35d 1949 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 135:176b8275d35d 1950 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2
<> 135:176b8275d35d 1951 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 135:176b8275d35d 1952 * @arg @ref LL_COMP_INPUT_MINUS_IO2
<> 135:176b8275d35d 1953 * @arg @ref LL_COMP_INPUT_MINUS_IO3
<> 135:176b8275d35d 1954 * @arg @ref LL_COMP_INPUT_MINUS_IO4
<> 135:176b8275d35d 1955 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1
<> 135:176b8275d35d 1956 * @retval None
<> 135:176b8275d35d 1957 */
<> 135:176b8275d35d 1958 __STATIC_INLINE void LL_COMP_SetInputMinus(COMP_TypeDef *COMPx, uint32_t InputMinus)
<> 135:176b8275d35d 1959 {
<> 135:176b8275d35d 1960 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 1961 COMP_CSR_COMP1INSEL << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 1962 InputMinus << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 1963 }
<> 135:176b8275d35d 1964
<> 135:176b8275d35d 1965 /**
<> 135:176b8275d35d 1966 * @brief Get comparator input minus (inverting).
<> 135:176b8275d35d 1967 * @note In case of comparator input selected to be connected to IO:
<> 135:176b8275d35d 1968 * GPIO pins are specific to each comparator instance.
<> 135:176b8275d35d 1969 * Refer to description of parameters or to reference manual.
<> 135:176b8275d35d 1970 * @rmtoll CSR COMP1SW1 LL_COMP_GetInputMinus
<> 135:176b8275d35d 1971 * @param COMPx Comparator instance
<> 135:176b8275d35d 1972 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 1973 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 135:176b8275d35d 1974 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 135:176b8275d35d 1975 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 135:176b8275d35d 1976 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 135:176b8275d35d 1977 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 135:176b8275d35d 1978 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2
<> 135:176b8275d35d 1979 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 135:176b8275d35d 1980 * @arg @ref LL_COMP_INPUT_MINUS_IO2
<> 135:176b8275d35d 1981 * @arg @ref LL_COMP_INPUT_MINUS_IO3
<> 135:176b8275d35d 1982 * @arg @ref LL_COMP_INPUT_MINUS_IO4
<> 135:176b8275d35d 1983 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1
<> 135:176b8275d35d 1984 */
<> 135:176b8275d35d 1985 __STATIC_INLINE uint32_t LL_COMP_GetInputMinus(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 1986 {
<> 135:176b8275d35d 1987 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 1988 COMP_CSR_COMP1INSEL << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 1989 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 135:176b8275d35d 1990 );
<> 135:176b8275d35d 1991 }
<> 135:176b8275d35d 1992
<> 135:176b8275d35d 1993 /**
<> 135:176b8275d35d 1994 * @brief Set comparator instance hysteresis mode of the input minus (inverting input).
<> 135:176b8275d35d 1995 * @rmtoll CSR COMP1HYST LL_COMP_SetInputHysteresis\n
<> 135:176b8275d35d 1996 * COMP2HYST LL_COMP_SetInputHysteresis
<> 135:176b8275d35d 1997 * @param COMPx Comparator instance
<> 135:176b8275d35d 1998 * @param InputHysteresis This parameter can be one of the following values:
<> 135:176b8275d35d 1999 * @arg @ref LL_COMP_HYSTERESIS_NONE
<> 135:176b8275d35d 2000 * @arg @ref LL_COMP_HYSTERESIS_LOW
<> 135:176b8275d35d 2001 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM
<> 135:176b8275d35d 2002 * @arg @ref LL_COMP_HYSTERESIS_HIGH
<> 135:176b8275d35d 2003 * @retval None
<> 135:176b8275d35d 2004 */
<> 135:176b8275d35d 2005 __STATIC_INLINE void LL_COMP_SetInputHysteresis(COMP_TypeDef *COMPx, uint32_t InputHysteresis)
<> 135:176b8275d35d 2006 {
<> 135:176b8275d35d 2007 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 2008 COMP_CSR_COMP1HYST << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 2009 InputHysteresis << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 2010 }
<> 135:176b8275d35d 2011
<> 135:176b8275d35d 2012 /**
<> 135:176b8275d35d 2013 * @brief Get comparator instance hysteresis mode of the minus (inverting) input.
<> 135:176b8275d35d 2014 * @rmtoll CSR COMP1HYST LL_COMP_GetInputHysteresis\n
<> 135:176b8275d35d 2015 * COMP2HYST LL_COMP_GetInputHysteresis
<> 135:176b8275d35d 2016 * @param COMPx Comparator instance
<> 135:176b8275d35d 2017 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 2018 * @arg @ref LL_COMP_HYSTERESIS_NONE
<> 135:176b8275d35d 2019 * @arg @ref LL_COMP_HYSTERESIS_LOW
<> 135:176b8275d35d 2020 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM
<> 135:176b8275d35d 2021 * @arg @ref LL_COMP_HYSTERESIS_HIGH
<> 135:176b8275d35d 2022 */
<> 135:176b8275d35d 2023 __STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2024 {
<> 135:176b8275d35d 2025 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 2026 COMP_CSR_COMP1HYST << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 2027 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 135:176b8275d35d 2028 );
<> 135:176b8275d35d 2029
<> 135:176b8275d35d 2030 }
<> 135:176b8275d35d 2031
<> 135:176b8275d35d 2032 /**
<> 135:176b8275d35d 2033 * @}
<> 135:176b8275d35d 2034 */
<> 135:176b8275d35d 2035
<> 135:176b8275d35d 2036 /** @defgroup COMP_LL_EF_Configuration_comparator_output Configuration of comparator output
<> 135:176b8275d35d 2037 * @{
<> 135:176b8275d35d 2038 */
<> 135:176b8275d35d 2039
<> 135:176b8275d35d 2040 /**
<> 135:176b8275d35d 2041 * @brief Set comparator output selection.
<> 135:176b8275d35d 2042 * @note Availability of parameters of output selection to timer
<> 135:176b8275d35d 2043 * depends on timers availability on the selected device.
<> 135:176b8275d35d 2044 * @rmtoll CSR COMP1OUTSEL LL_COMP_SetOutputSelection\n
<> 135:176b8275d35d 2045 * COMP2OUTSEL LL_COMP_SetOutputSelection
<> 135:176b8275d35d 2046 * @param COMPx Comparator instance
<> 135:176b8275d35d 2047 * @param OutputSelection This parameter can be one of the following values:
<> 135:176b8275d35d 2048 * @arg @ref LL_COMP_OUTPUT_NONE
<> 135:176b8275d35d 2049 * @arg @ref LL_COMP_OUTPUT_TIM16_BKIN (1)
<> 135:176b8275d35d 2050 * @arg @ref LL_COMP_OUTPUT_TIM4_IC1 (1)
<> 135:176b8275d35d 2051 * @arg @ref LL_COMP_OUTPUT_TIM4_OCCLR (1)
<> 135:176b8275d35d 2052 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4 (1)
<> 135:176b8275d35d 2053 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR (1)
<> 135:176b8275d35d 2054 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1 (1)
<> 135:176b8275d35d 2055 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR (1)
<> 135:176b8275d35d 2056 *
<> 135:176b8275d35d 2057 * (1) Parameter availability depending on timer availability
<> 135:176b8275d35d 2058 * on the selected device.
<> 135:176b8275d35d 2059 * @retval None
<> 135:176b8275d35d 2060 */
<> 135:176b8275d35d 2061 __STATIC_INLINE void LL_COMP_SetOutputSelection(COMP_TypeDef *COMPx, uint32_t OutputSelection)
<> 135:176b8275d35d 2062 {
<> 135:176b8275d35d 2063 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 2064 COMP_CSR_COMP1OUTSEL << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 2065 OutputSelection << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 2066 }
<> 135:176b8275d35d 2067
<> 135:176b8275d35d 2068 /**
<> 135:176b8275d35d 2069 * @brief Get comparator output selection.
<> 135:176b8275d35d 2070 * @note Availability of parameters of output selection to timer
<> 135:176b8275d35d 2071 * depends on timers availability on the selected device.
<> 135:176b8275d35d 2072 * @rmtoll CSR COMP1OUTSEL LL_COMP_GetOutputSelection\n
<> 135:176b8275d35d 2073 * COMP2OUTSEL LL_COMP_GetOutputSelection
<> 135:176b8275d35d 2074 * @param COMPx Comparator instance
<> 135:176b8275d35d 2075 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 2076 * @arg @ref LL_COMP_OUTPUT_NONE
<> 135:176b8275d35d 2077 * @arg @ref LL_COMP_OUTPUT_TIM16_BKIN (1)
<> 135:176b8275d35d 2078 * @arg @ref LL_COMP_OUTPUT_TIM4_IC1 (1)
<> 135:176b8275d35d 2079 * @arg @ref LL_COMP_OUTPUT_TIM4_OCCLR (1)
<> 135:176b8275d35d 2080 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4 (1)
<> 135:176b8275d35d 2081 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR (1)
<> 135:176b8275d35d 2082 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1 (1)
<> 135:176b8275d35d 2083 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR (1)
<> 135:176b8275d35d 2084 *
<> 135:176b8275d35d 2085 * (1) Parameter availability depending on timer availability
<> 135:176b8275d35d 2086 * on the selected device.
<> 135:176b8275d35d 2087 */
<> 135:176b8275d35d 2088 __STATIC_INLINE uint32_t LL_COMP_GetOutputSelection(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2089 {
<> 135:176b8275d35d 2090 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 2091 COMP_CSR_COMP1OUTSEL << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 2092 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 135:176b8275d35d 2093 );
<> 135:176b8275d35d 2094 }
<> 135:176b8275d35d 2095
<> 135:176b8275d35d 2096 /**
<> 135:176b8275d35d 2097 * @brief Set comparator instance output polarity.
<> 135:176b8275d35d 2098 * @rmtoll CSR COMP1POL LL_COMP_SetOutputPolarity\n
<> 135:176b8275d35d 2099 * COMP2POL LL_COMP_SetOutputPolarity
<> 135:176b8275d35d 2100 * @param COMPx Comparator instance
<> 135:176b8275d35d 2101 * @param OutputPolarity This parameter can be one of the following values:
<> 135:176b8275d35d 2102 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
<> 135:176b8275d35d 2103 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
<> 135:176b8275d35d 2104 * @retval None
<> 135:176b8275d35d 2105 */
<> 135:176b8275d35d 2106 __STATIC_INLINE void LL_COMP_SetOutputPolarity(COMP_TypeDef *COMPx, uint32_t OutputPolarity)
<> 135:176b8275d35d 2107 {
<> 135:176b8275d35d 2108 MODIFY_REG(COMP->CSR,
<> 135:176b8275d35d 2109 COMP_CSR_COMP1POL << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 135:176b8275d35d 2110 OutputPolarity << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 135:176b8275d35d 2111 }
<> 135:176b8275d35d 2112
<> 135:176b8275d35d 2113 /**
<> 135:176b8275d35d 2114 * @brief Get comparator instance output polarity.
<> 135:176b8275d35d 2115 * @rmtoll CSR COMP1POL LL_COMP_GetOutputPolarity\n
<> 135:176b8275d35d 2116 * COMP2POL LL_COMP_GetOutputPolarity
<> 135:176b8275d35d 2117 * @param COMPx Comparator instance
<> 135:176b8275d35d 2118 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 2119 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
<> 135:176b8275d35d 2120 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
<> 135:176b8275d35d 2121 */
<> 135:176b8275d35d 2122 __STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2123 {
<> 135:176b8275d35d 2124 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 2125 COMP_CSR_COMP1POL << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 2126 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 135:176b8275d35d 2127 );
<> 135:176b8275d35d 2128 }
<> 135:176b8275d35d 2129
<> 135:176b8275d35d 2130 /**
<> 135:176b8275d35d 2131 * @}
<> 135:176b8275d35d 2132 */
<> 135:176b8275d35d 2133
<> 135:176b8275d35d 2134 /** @defgroup COMP_LL_EF_Operation Operation on comparator instance
<> 135:176b8275d35d 2135 * @{
<> 135:176b8275d35d 2136 */
<> 135:176b8275d35d 2137
<> 135:176b8275d35d 2138 /**
<> 135:176b8275d35d 2139 * @brief Enable comparator instance.
<> 135:176b8275d35d 2140 * @note After enable from off state, comparator requires a delay
<> 135:176b8275d35d 2141 * to reach reach propagation delay specification.
<> 135:176b8275d35d 2142 * Refer to device datasheet, parameter "tSTART".
<> 135:176b8275d35d 2143 * @rmtoll CSR COMP1EN LL_COMP_Enable\n
<> 135:176b8275d35d 2144 * COMP2EN LL_COMP_Enable
<> 135:176b8275d35d 2145 * @param COMPx Comparator instance
<> 135:176b8275d35d 2146 * @retval None
<> 135:176b8275d35d 2147 */
<> 135:176b8275d35d 2148 __STATIC_INLINE void LL_COMP_Enable(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2149 {
<> 135:176b8275d35d 2150 SET_BIT(COMP->CSR, COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 135:176b8275d35d 2151 }
<> 135:176b8275d35d 2152
<> 135:176b8275d35d 2153 /**
<> 135:176b8275d35d 2154 * @brief Disable comparator instance.
<> 135:176b8275d35d 2155 * @rmtoll CSR COMP1EN LL_COMP_Disable\n
<> 135:176b8275d35d 2156 * COMP2EN LL_COMP_Disable
<> 135:176b8275d35d 2157 * @param COMPx Comparator instance
<> 135:176b8275d35d 2158 * @retval None
<> 135:176b8275d35d 2159 */
<> 135:176b8275d35d 2160 __STATIC_INLINE void LL_COMP_Disable(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2161 {
<> 135:176b8275d35d 2162 CLEAR_BIT(COMP->CSR, COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 135:176b8275d35d 2163 }
<> 135:176b8275d35d 2164
<> 135:176b8275d35d 2165 /**
<> 135:176b8275d35d 2166 * @brief Get comparator enable state
<> 135:176b8275d35d 2167 * (0: COMP is disabled, 1: COMP is enabled)
<> 135:176b8275d35d 2168 * @rmtoll CSR COMP1EN LL_COMP_IsEnabled\n
<> 135:176b8275d35d 2169 * COMP2EN LL_COMP_IsEnabled
<> 135:176b8275d35d 2170 * @param COMPx Comparator instance
<> 135:176b8275d35d 2171 * @retval State of bit (1 or 0).
<> 135:176b8275d35d 2172 */
<> 135:176b8275d35d 2173 __STATIC_INLINE uint32_t LL_COMP_IsEnabled(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2174 {
<> 135:176b8275d35d 2175 return (READ_BIT(COMP->CSR, COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx)) == COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 135:176b8275d35d 2176 }
<> 135:176b8275d35d 2177
<> 135:176b8275d35d 2178 /**
<> 135:176b8275d35d 2179 * @brief Lock comparator instance.
<> 135:176b8275d35d 2180 * @note Once locked, comparator configuration can be accessed in read-only.
<> 135:176b8275d35d 2181 * @note The only way to unlock the comparator is a device hardware reset.
<> 135:176b8275d35d 2182 * @rmtoll CSR COMP1LOCK LL_COMP_Lock\n
<> 135:176b8275d35d 2183 * COMP2LOCK LL_COMP_Lock
<> 135:176b8275d35d 2184 * @param COMPx Comparator instance
<> 135:176b8275d35d 2185 * @retval None
<> 135:176b8275d35d 2186 */
<> 135:176b8275d35d 2187 __STATIC_INLINE void LL_COMP_Lock(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2188 {
<> 135:176b8275d35d 2189 SET_BIT(COMP->CSR, COMP_CSR_COMP1LOCK << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 135:176b8275d35d 2190 }
<> 135:176b8275d35d 2191
<> 135:176b8275d35d 2192 /**
<> 135:176b8275d35d 2193 * @brief Get comparator lock state
<> 135:176b8275d35d 2194 * (0: COMP is unlocked, 1: COMP is locked).
<> 135:176b8275d35d 2195 * @note Once locked, comparator configuration can be accessed in read-only.
<> 135:176b8275d35d 2196 * @note The only way to unlock the comparator is a device hardware reset.
<> 135:176b8275d35d 2197 * @rmtoll CSR COMP1LOCK LL_COMP_IsLocked\n
<> 135:176b8275d35d 2198 * COMP2LOCK LL_COMP_IsLocked
<> 135:176b8275d35d 2199 * @param COMPx Comparator instance
<> 135:176b8275d35d 2200 * @retval State of bit (1 or 0).
<> 135:176b8275d35d 2201 */
<> 135:176b8275d35d 2202 __STATIC_INLINE uint32_t LL_COMP_IsLocked(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2203 {
<> 135:176b8275d35d 2204 return (READ_BIT(COMP->CSR, COMP_CSR_COMP1LOCK << __COMP_BITOFFSET_INSTANCE(COMPx)) == COMP_CSR_COMP1LOCK << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 135:176b8275d35d 2205 }
<> 135:176b8275d35d 2206
<> 135:176b8275d35d 2207 /**
<> 135:176b8275d35d 2208 * @brief Read comparator instance output level.
<> 135:176b8275d35d 2209 * @note The comparator output level depends on the selected polarity
<> 135:176b8275d35d 2210 * (Refer to function @ref LL_COMP_SetOutputPolarity()).
<> 135:176b8275d35d 2211 * If the comparator polarity is not inverted:
<> 135:176b8275d35d 2212 * - Comparator output is low when the input plus
<> 135:176b8275d35d 2213 * is at a lower voltage than the input minus
<> 135:176b8275d35d 2214 * - Comparator output is high when the input plus
<> 135:176b8275d35d 2215 * is at a higher voltage than the input minus
<> 135:176b8275d35d 2216 * If the comparator polarity is inverted:
<> 135:176b8275d35d 2217 * - Comparator output is high when the input plus
<> 135:176b8275d35d 2218 * is at a lower voltage than the input minus
<> 135:176b8275d35d 2219 * - Comparator output is low when the input plus
<> 135:176b8275d35d 2220 * is at a higher voltage than the input minus
<> 135:176b8275d35d 2221 * @rmtoll CSR COMP1OUT LL_COMP_ReadOutputLevel\n
<> 135:176b8275d35d 2222 * COMP2OUT LL_COMP_ReadOutputLevel
<> 135:176b8275d35d 2223 * @param COMPx Comparator instance
<> 135:176b8275d35d 2224 * @retval Returned value can be one of the following values:
<> 135:176b8275d35d 2225 * @arg @ref LL_COMP_OUTPUT_LEVEL_LOW
<> 135:176b8275d35d 2226 * @arg @ref LL_COMP_OUTPUT_LEVEL_HIGH
<> 135:176b8275d35d 2227 */
<> 135:176b8275d35d 2228 __STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel(COMP_TypeDef *COMPx)
<> 135:176b8275d35d 2229 {
<> 135:176b8275d35d 2230 return (uint32_t)(READ_BIT(COMP->CSR,
<> 135:176b8275d35d 2231 COMP_CSR_COMP1OUT << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 135:176b8275d35d 2232 >> (__COMP_BITOFFSET_INSTANCE(COMPx) + LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS)
<> 135:176b8275d35d 2233 );
<> 135:176b8275d35d 2234 }
<> 135:176b8275d35d 2235
<> 135:176b8275d35d 2236 /**
<> 135:176b8275d35d 2237 * @}
<> 135:176b8275d35d 2238 */
<> 135:176b8275d35d 2239
<> 135:176b8275d35d 2240 #if defined(USE_FULL_LL_DRIVER)
<> 135:176b8275d35d 2241 /** @defgroup COMP_LL_EF_Init Initialization and de-initialization functions
<> 135:176b8275d35d 2242 * @{
<> 135:176b8275d35d 2243 */
<> 135:176b8275d35d 2244
<> 135:176b8275d35d 2245 ErrorStatus LL_COMP_DeInit(COMP_TypeDef *COMPx);
<> 135:176b8275d35d 2246 ErrorStatus LL_COMP_Init(COMP_TypeDef *COMPx, LL_COMP_InitTypeDef *COMP_InitStruct);
<> 135:176b8275d35d 2247 void LL_COMP_StructInit(LL_COMP_InitTypeDef *COMP_InitStruct);
<> 135:176b8275d35d 2248
<> 135:176b8275d35d 2249 /**
<> 135:176b8275d35d 2250 * @}
<> 135:176b8275d35d 2251 */
<> 135:176b8275d35d 2252 #endif /* USE_FULL_LL_DRIVER */
<> 135:176b8275d35d 2253
<> 135:176b8275d35d 2254 /**
<> 135:176b8275d35d 2255 * @}
<> 135:176b8275d35d 2256 */
<> 135:176b8275d35d 2257
<> 135:176b8275d35d 2258 /**
<> 135:176b8275d35d 2259 * @}
<> 135:176b8275d35d 2260 */
<> 135:176b8275d35d 2261
<> 135:176b8275d35d 2262 #endif /* COMP1 || COMP2 */
<> 135:176b8275d35d 2263
<> 135:176b8275d35d 2264
<> 135:176b8275d35d 2265 #endif /* STM32F373xC || STM32F378xx */
<> 135:176b8275d35d 2266
<> 135:176b8275d35d 2267 /**
<> 135:176b8275d35d 2268 * @}
<> 135:176b8275d35d 2269 */
<> 135:176b8275d35d 2270
<> 135:176b8275d35d 2271 #ifdef __cplusplus
<> 135:176b8275d35d 2272 }
<> 135:176b8275d35d 2273 #endif
<> 135:176b8275d35d 2274
<> 135:176b8275d35d 2275 #endif /* __STM32F3xx_LL_COMP_H */
<> 135:176b8275d35d 2276
<> 135:176b8275d35d 2277 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/