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:
Anna Bridge
Date:
Wed Jan 17 16:13:02 2018 +0000
Revision:
160:5571c4ff569f
Parent:
134:ad3be0349dc5
mbed library. Release version 158

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 134:ad3be0349dc5 1 /**
<> 134:ad3be0349dc5 2 ******************************************************************************
<> 134:ad3be0349dc5 3 * @file stm32f0xx_ll_comp.h
<> 134:ad3be0349dc5 4 * @author MCD Application Team
<> 134:ad3be0349dc5 5 * @brief Header file of COMP LL module.
<> 134:ad3be0349dc5 6 ******************************************************************************
<> 134:ad3be0349dc5 7 * @attention
<> 134:ad3be0349dc5 8 *
<> 134:ad3be0349dc5 9 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
<> 134:ad3be0349dc5 10 *
<> 134:ad3be0349dc5 11 * Redistribution and use in source and binary forms, with or without modification,
<> 134:ad3be0349dc5 12 * are permitted provided that the following conditions are met:
<> 134:ad3be0349dc5 13 * 1. Redistributions of source code must retain the above copyright notice,
<> 134:ad3be0349dc5 14 * this list of conditions and the following disclaimer.
<> 134:ad3be0349dc5 15 * 2. Redistributions in binary form must reproduce the above copyright notice,
<> 134:ad3be0349dc5 16 * this list of conditions and the following disclaimer in the documentation
<> 134:ad3be0349dc5 17 * and/or other materials provided with the distribution.
<> 134:ad3be0349dc5 18 * 3. Neither the name of STMicroelectronics nor the names of its contributors
<> 134:ad3be0349dc5 19 * may be used to endorse or promote products derived from this software
<> 134:ad3be0349dc5 20 * without specific prior written permission.
<> 134:ad3be0349dc5 21 *
<> 134:ad3be0349dc5 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
<> 134:ad3be0349dc5 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
<> 134:ad3be0349dc5 24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 134:ad3be0349dc5 25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
<> 134:ad3be0349dc5 26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
<> 134:ad3be0349dc5 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
<> 134:ad3be0349dc5 28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
<> 134:ad3be0349dc5 29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<> 134:ad3be0349dc5 30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<> 134:ad3be0349dc5 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 134:ad3be0349dc5 32 *
<> 134:ad3be0349dc5 33 ******************************************************************************
<> 134:ad3be0349dc5 34 */
<> 134:ad3be0349dc5 35
<> 134:ad3be0349dc5 36 /* Define to prevent recursive inclusion -------------------------------------*/
<> 134:ad3be0349dc5 37 #ifndef __STM32F0xx_LL_COMP_H
<> 134:ad3be0349dc5 38 #define __STM32F0xx_LL_COMP_H
<> 134:ad3be0349dc5 39
<> 134:ad3be0349dc5 40 #ifdef __cplusplus
<> 134:ad3be0349dc5 41 extern "C" {
<> 134:ad3be0349dc5 42 #endif
<> 134:ad3be0349dc5 43
<> 134:ad3be0349dc5 44 /* Includes ------------------------------------------------------------------*/
<> 134:ad3be0349dc5 45 #include "stm32f0xx.h"
<> 134:ad3be0349dc5 46
<> 134:ad3be0349dc5 47 /** @addtogroup STM32F0xx_LL_Driver
<> 134:ad3be0349dc5 48 * @{
<> 134:ad3be0349dc5 49 */
<> 134:ad3be0349dc5 50
<> 134:ad3be0349dc5 51 #if defined (COMP1) || defined (COMP2)
<> 134:ad3be0349dc5 52
<> 134:ad3be0349dc5 53 /** @defgroup COMP_LL COMP
<> 134:ad3be0349dc5 54 * @{
<> 134:ad3be0349dc5 55 */
<> 134:ad3be0349dc5 56
<> 134:ad3be0349dc5 57 /* Private types -------------------------------------------------------------*/
<> 134:ad3be0349dc5 58 /* Private variables ---------------------------------------------------------*/
<> 134:ad3be0349dc5 59 /* Private constants ---------------------------------------------------------*/
<> 134:ad3be0349dc5 60 /** @defgroup COMP_LL_Private_Constants COMP Private Constants
<> 134:ad3be0349dc5 61 * @{
<> 134:ad3be0349dc5 62 */
<> 134:ad3be0349dc5 63
<> 134:ad3be0349dc5 64 /* Differentiation between COMP instances */
<> 134:ad3be0349dc5 65 /* Note: Value not corresponding to a register offset since both */
<> 134:ad3be0349dc5 66 /* COMP instances are sharing the same register) . */
<> 134:ad3be0349dc5 67 #define COMPX_BASE COMP_BASE
<> 134:ad3be0349dc5 68 #define COMPX (COMP1 - COMP2)
<> 134:ad3be0349dc5 69
<> 134:ad3be0349dc5 70 /* COMP registers bits positions */
<> 134:ad3be0349dc5 71 #define LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS ((uint32_t)14U) /* Value equivalent to POSITION_VAL(COMP_CSR_COMP1OUT) */
<> 134:ad3be0349dc5 72
<> 134:ad3be0349dc5 73 /**
<> 134:ad3be0349dc5 74 * @}
<> 134:ad3be0349dc5 75 */
<> 134:ad3be0349dc5 76
<> 134:ad3be0349dc5 77 /* Private macros ------------------------------------------------------------*/
<> 134:ad3be0349dc5 78 /** @defgroup COMP_LL_Private_Macros COMP Private Macros
<> 134:ad3be0349dc5 79 * @{
<> 134:ad3be0349dc5 80 */
<> 134:ad3be0349dc5 81
<> 134:ad3be0349dc5 82 /**
<> 134:ad3be0349dc5 83 * @brief Driver macro reserved for internal use: if COMP instance selected
<> 134:ad3be0349dc5 84 * is odd (COMP1, COMP3, ...), return value '1', else return '0'.
<> 134:ad3be0349dc5 85 * @param __COMP_INSTANCE__ COMP instance
<> 134:ad3be0349dc5 86 * @retval If COMP instance is odd, value '1'. Else, value '0'.
<> 134:ad3be0349dc5 87 */
<> 134:ad3be0349dc5 88 #define __COMP_IS_INSTANCE_ODD(__COMP_INSTANCE__) \
<> 134:ad3be0349dc5 89 ((~(((uint32_t)(__COMP_INSTANCE__) - COMP_BASE) >> 1U)) & 0x00000001)
<> 134:ad3be0349dc5 90
<> 134:ad3be0349dc5 91 /**
<> 134:ad3be0349dc5 92 * @brief Driver macro reserved for internal use: if COMP instance selected
<> 134:ad3be0349dc5 93 * is even (COMP2, COMP4, ...), return value '1', else return '0'.
<> 134:ad3be0349dc5 94 * @param __COMP_INSTANCE__ COMP instance
<> 134:ad3be0349dc5 95 * @retval If COMP instance is even, value '1'. Else, value '0'.
<> 134:ad3be0349dc5 96 */
<> 134:ad3be0349dc5 97 #define __COMP_IS_INSTANCE_EVEN(__COMP_INSTANCE__) \
<> 134:ad3be0349dc5 98 (((uint32_t)(__COMP_INSTANCE__) - COMP_BASE) >> 1U)
<> 134:ad3be0349dc5 99
<> 134:ad3be0349dc5 100 /**
<> 134:ad3be0349dc5 101 * @brief Driver macro reserved for internal use: from COMP instance
<> 134:ad3be0349dc5 102 * selected, set offset of bits into COMP register.
<> 134:ad3be0349dc5 103 * @note Since both COMP instances are sharing the same register
<> 134:ad3be0349dc5 104 * with 2 area of bits with an offset of 16 bits, this function
<> 134:ad3be0349dc5 105 * returns value "0" if COMP1 is selected and "16" if COMP2 is
<> 134:ad3be0349dc5 106 * selected.
<> 134:ad3be0349dc5 107 * @param __COMP_INSTANCE__ COMP instance
<> 134:ad3be0349dc5 108 * @retval Bits offset in register 32 bits
<> 134:ad3be0349dc5 109 */
<> 134:ad3be0349dc5 110 #define __COMP_BITOFFSET_INSTANCE(__COMP_INSTANCE__) \
<> 134:ad3be0349dc5 111 (((uint32_t)(__COMP_INSTANCE__) - COMP_BASE) << 3U)
<> 134:ad3be0349dc5 112
<> 134:ad3be0349dc5 113 /**
<> 134:ad3be0349dc5 114 * @}
<> 134:ad3be0349dc5 115 */
<> 134:ad3be0349dc5 116
<> 134:ad3be0349dc5 117 /* Exported types ------------------------------------------------------------*/
<> 134:ad3be0349dc5 118 #if defined(USE_FULL_LL_DRIVER)
<> 134:ad3be0349dc5 119 /** @defgroup COMP_LL_ES_INIT COMP Exported Init structure
<> 134:ad3be0349dc5 120 * @{
<> 134:ad3be0349dc5 121 */
<> 134:ad3be0349dc5 122
<> 134:ad3be0349dc5 123 /**
<> 134:ad3be0349dc5 124 * @brief Structure definition of some features of COMP instance.
<> 134:ad3be0349dc5 125 */
<> 134:ad3be0349dc5 126 typedef struct
<> 134:ad3be0349dc5 127 {
<> 134:ad3be0349dc5 128 uint32_t PowerMode; /*!< Set comparator operating mode to adjust power and speed.
<> 134:ad3be0349dc5 129 This parameter can be a value of @ref COMP_LL_EC_POWERMODE
<> 134:ad3be0349dc5 130
<> 134:ad3be0349dc5 131 This feature can be modified afterwards using unitary function @ref LL_COMP_SetPowerMode(). */
<> 134:ad3be0349dc5 132
<> 134:ad3be0349dc5 133 uint32_t InputPlus; /*!< Set comparator input plus (non-inverting input).
<> 134:ad3be0349dc5 134 This parameter can be a value of @ref COMP_LL_EC_INPUT_PLUS
<> 134:ad3be0349dc5 135
<> 134:ad3be0349dc5 136 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputPlus(). */
<> 134:ad3be0349dc5 137
<> 134:ad3be0349dc5 138 uint32_t InputMinus; /*!< Set comparator input minus (inverting input).
<> 134:ad3be0349dc5 139 This parameter can be a value of @ref COMP_LL_EC_INPUT_MINUS
<> 134:ad3be0349dc5 140
<> 134:ad3be0349dc5 141 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputMinus(). */
<> 134:ad3be0349dc5 142
<> 134:ad3be0349dc5 143 uint32_t InputHysteresis; /*!< Set comparator hysteresis mode of the input minus.
<> 134:ad3be0349dc5 144 This parameter can be a value of @ref COMP_LL_EC_INPUT_HYSTERESIS
<> 134:ad3be0349dc5 145
<> 134:ad3be0349dc5 146 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputHysteresis(). */
<> 134:ad3be0349dc5 147
<> 134:ad3be0349dc5 148 uint32_t OutputSelection; /*!< Set comparator output selection.
<> 134:ad3be0349dc5 149 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_SELECTION
<> 134:ad3be0349dc5 150
<> 134:ad3be0349dc5 151 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputSelection(). */
<> 134:ad3be0349dc5 152
<> 134:ad3be0349dc5 153 uint32_t OutputPolarity; /*!< Set comparator output polarity.
<> 134:ad3be0349dc5 154 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_POLARITY
<> 134:ad3be0349dc5 155
<> 134:ad3be0349dc5 156 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputPolarity(). */
<> 134:ad3be0349dc5 157
<> 134:ad3be0349dc5 158 } LL_COMP_InitTypeDef;
<> 134:ad3be0349dc5 159
<> 134:ad3be0349dc5 160 /**
<> 134:ad3be0349dc5 161 * @}
<> 134:ad3be0349dc5 162 */
<> 134:ad3be0349dc5 163 #endif /* USE_FULL_LL_DRIVER */
<> 134:ad3be0349dc5 164
<> 134:ad3be0349dc5 165 /* Exported constants --------------------------------------------------------*/
<> 134:ad3be0349dc5 166 /** @defgroup COMP_LL_Exported_Constants COMP Exported Constants
<> 134:ad3be0349dc5 167 * @{
<> 134:ad3be0349dc5 168 */
<> 134:ad3be0349dc5 169
<> 134:ad3be0349dc5 170 /** @defgroup COMP_LL_EC_COMMON_WINDOWMODE Comparator common modes - Window mode
<> 134:ad3be0349dc5 171 * @{
<> 134:ad3be0349dc5 172 */
<> 134:ad3be0349dc5 173 #define LL_COMP_WINDOWMODE_DISABLE ((uint32_t)0x00000000U) /*!< Window mode disable: Comparators 1 and 2 are independent */
<> 134:ad3be0349dc5 174 #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). */
<> 134:ad3be0349dc5 175 /**
<> 134:ad3be0349dc5 176 * @}
<> 134:ad3be0349dc5 177 */
<> 134:ad3be0349dc5 178
<> 134:ad3be0349dc5 179 /** @defgroup COMP_LL_EC_POWERMODE Comparator modes - Power mode
<> 134:ad3be0349dc5 180 * @{
<> 134:ad3be0349dc5 181 */
<> 134:ad3be0349dc5 182 #define LL_COMP_POWERMODE_HIGHSPEED ((uint32_t)0x00000000U) /*!< COMP power mode to high speed */
<> 134:ad3be0349dc5 183 #define LL_COMP_POWERMODE_MEDIUMSPEED (COMP_CSR_COMP1MODE_0) /*!< COMP power mode to medium speed */
<> 134:ad3be0349dc5 184 #define LL_COMP_POWERMODE_LOWPOWER (COMP_CSR_COMP1MODE_1) /*!< COMP power mode to low power */
<> 134:ad3be0349dc5 185 #define LL_COMP_POWERMODE_ULTRALOWPOWER (COMP_CSR_COMP1MODE_1 | COMP_CSR_COMP1MODE_0) /*!< COMP power mode to ultra-low power */
<> 134:ad3be0349dc5 186 /**
<> 134:ad3be0349dc5 187 * @}
<> 134:ad3be0349dc5 188 */
<> 134:ad3be0349dc5 189
<> 134:ad3be0349dc5 190 /** @defgroup COMP_LL_EC_INPUT_PLUS Comparator inputs - Input plus (input non-inverting) selection
<> 134:ad3be0349dc5 191 * @{
<> 134:ad3be0349dc5 192 */
<> 134:ad3be0349dc5 193 #define LL_COMP_INPUT_PLUS_IO1 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, pin PA3 for COMP2) */
<> 134:ad3be0349dc5 194 #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) */
<> 134:ad3be0349dc5 195 /**
<> 134:ad3be0349dc5 196 * @}
<> 134:ad3be0349dc5 197 */
<> 134:ad3be0349dc5 198
<> 134:ad3be0349dc5 199 /** @defgroup COMP_LL_EC_INPUT_MINUS Comparator inputs - Input minus (input inverting) selection
<> 134:ad3be0349dc5 200 * @{
<> 134:ad3be0349dc5 201 */
<> 134:ad3be0349dc5 202 #define LL_COMP_INPUT_MINUS_1_4VREFINT ((uint32_t)0x00000000U) /*!< Comparator input minus connected to 1/4 VrefInt */
<> 134:ad3be0349dc5 203 #define LL_COMP_INPUT_MINUS_1_2VREFINT ( COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to 1/2 VrefInt */
<> 134:ad3be0349dc5 204 #define LL_COMP_INPUT_MINUS_3_4VREFINT ( COMP_CSR_COMP1INSEL_1 ) /*!< Comparator input minus connected to 3/4 VrefInt */
<> 134:ad3be0349dc5 205 #define LL_COMP_INPUT_MINUS_VREFINT ( COMP_CSR_COMP1INSEL_1 | COMP_CSR_COMP1INSEL_0) /*!< Comparator input minus connected to VrefInt */
<> 134:ad3be0349dc5 206 #define LL_COMP_INPUT_MINUS_DAC1_CH1 (COMP_CSR_COMP1INSEL_2 ) /*!< Comparator input minus connected to DAC1 channel 1 (DAC_OUT1) */
<> 134:ad3be0349dc5 207 #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) */
<> 134:ad3be0349dc5 208 #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) */
<> 134:ad3be0349dc5 209 /**
<> 134:ad3be0349dc5 210 * @}
<> 134:ad3be0349dc5 211 */
<> 134:ad3be0349dc5 212
<> 134:ad3be0349dc5 213 /** @defgroup COMP_LL_EC_INPUT_HYSTERESIS Comparator input - Hysteresis
<> 134:ad3be0349dc5 214 * @{
<> 134:ad3be0349dc5 215 */
<> 134:ad3be0349dc5 216 #define LL_COMP_HYSTERESIS_NONE ((uint32_t)0x00000000U) /*!< No hysteresis */
<> 134:ad3be0349dc5 217 #define LL_COMP_HYSTERESIS_LOW ( COMP_CSR_COMP1HYST_0) /*!< Hysteresis level low */
<> 134:ad3be0349dc5 218 #define LL_COMP_HYSTERESIS_MEDIUM (COMP_CSR_COMP1HYST_1 ) /*!< Hysteresis level medium */
<> 134:ad3be0349dc5 219 #define LL_COMP_HYSTERESIS_HIGH (COMP_CSR_COMP1HYST_1 | COMP_CSR_COMP1HYST_0) /*!< Hysteresis level high */
<> 134:ad3be0349dc5 220 /**
<> 134:ad3be0349dc5 221 * @}
<> 134:ad3be0349dc5 222 */
<> 134:ad3be0349dc5 223
<> 134:ad3be0349dc5 224 /** @defgroup COMP_LL_EC_OUTPUT_SELECTION Comparator output - Output selection
<> 134:ad3be0349dc5 225 * @{
<> 134:ad3be0349dc5 226 */
<> 134:ad3be0349dc5 227 /* Note: Output redirection is common for COMP1 and COMP2 */
<> 134:ad3be0349dc5 228 #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) */
<> 134:ad3be0349dc5 229 #define LL_COMP_OUTPUT_TIM1_BKIN (COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM1 break input (BKIN) */
<> 134:ad3be0349dc5 230 #define LL_COMP_OUTPUT_TIM1_IC1 (COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM1 input capture 1 */
<> 134:ad3be0349dc5 231 #define LL_COMP_OUTPUT_TIM1_OCCLR (COMP_CSR_COMP1OUTSEL_1 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM1 OCREF clear */
<> 134:ad3be0349dc5 232 #define LL_COMP_OUTPUT_TIM2_IC4 (COMP_CSR_COMP1OUTSEL_2) /*!< COMP output connected to TIM2 input capture 4 */
<> 134:ad3be0349dc5 233 #define LL_COMP_OUTPUT_TIM2_OCCLR (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM2 OCREF clear */
<> 134:ad3be0349dc5 234 #define LL_COMP_OUTPUT_TIM3_IC1 (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM3 input capture 1 */
<> 134:ad3be0349dc5 235 #define LL_COMP_OUTPUT_TIM3_OCCLR (COMP_CSR_COMP1OUTSEL_2 | COMP_CSR_COMP1OUTSEL_1 | COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM3 OCREF clear */
<> 134:ad3be0349dc5 236 /**
<> 134:ad3be0349dc5 237 * @}
<> 134:ad3be0349dc5 238 */
<> 134:ad3be0349dc5 239
<> 134:ad3be0349dc5 240 /** @defgroup COMP_LL_EC_OUTPUT_POLARITY Comparator output - Output polarity
<> 134:ad3be0349dc5 241 * @{
<> 134:ad3be0349dc5 242 */
<> 134:ad3be0349dc5 243 #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 */
<> 134:ad3be0349dc5 244 #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 */
<> 134:ad3be0349dc5 245 /**
<> 134:ad3be0349dc5 246 * @}
<> 134:ad3be0349dc5 247 */
<> 134:ad3be0349dc5 248
<> 134:ad3be0349dc5 249 /** @defgroup COMP_LL_EC_OUTPUT_LEVEL Comparator output - Output level
<> 134:ad3be0349dc5 250 * @{
<> 134:ad3be0349dc5 251 */
<> 134:ad3be0349dc5 252 #define LL_COMP_OUTPUT_LEVEL_LOW ((uint32_t)0x00000000U) /*!< Comparator output level low (if the polarity is not inverted, otherwise to be complemented) */
<> 134:ad3be0349dc5 253 #define LL_COMP_OUTPUT_LEVEL_HIGH ((uint32_t)0x00000001U) /*!< Comparator output level high (if the polarity is not inverted, otherwise to be complemented) */
<> 134:ad3be0349dc5 254 /**
<> 134:ad3be0349dc5 255 * @}
<> 134:ad3be0349dc5 256 */
<> 134:ad3be0349dc5 257
<> 134:ad3be0349dc5 258 /** @defgroup COMP_LL_EC_HW_DELAYS Definitions of COMP hardware constraints delays
<> 134:ad3be0349dc5 259 * @note Only COMP IP HW delays are defined in COMP LL driver driver,
<> 134:ad3be0349dc5 260 * not timeout values.
<> 134:ad3be0349dc5 261 * For details on delays values, refer to descriptions in source code
<> 134:ad3be0349dc5 262 * above each literal definition.
<> 134:ad3be0349dc5 263 * @{
<> 134:ad3be0349dc5 264 */
<> 134:ad3be0349dc5 265
<> 134:ad3be0349dc5 266 /* Delay for comparator startup time. */
<> 134:ad3be0349dc5 267 /* Note: Delay required to reach propagation delay specification. */
<> 134:ad3be0349dc5 268 /* Literal set to maximum value (refer to device datasheet, */
<> 134:ad3be0349dc5 269 /* parameter "tSTART"). */
<> 134:ad3be0349dc5 270 /* Unit: us */
<> 134:ad3be0349dc5 271 #define LL_COMP_DELAY_STARTUP_US ((uint32_t) 60U) /*!< Delay for COMP startup time */
<> 134:ad3be0349dc5 272
<> 134:ad3be0349dc5 273 /* Delay for comparator voltage scaler stabilization time */
<> 134:ad3be0349dc5 274 /* (voltage from VrefInt, delay based on VrefInt startup time). */
<> 134:ad3be0349dc5 275 /* Literal set to maximum value (refer to device datasheet, */
<> 134:ad3be0349dc5 276 /* parameter "tS_SC"). */
<> 134:ad3be0349dc5 277 /* Unit: us */
<> 134:ad3be0349dc5 278 #define LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US ((uint32_t) 200U) /*!< Delay for COMP voltage scaler stabilization time */
<> 134:ad3be0349dc5 279
<> 134:ad3be0349dc5 280
<> 134:ad3be0349dc5 281 /**
<> 134:ad3be0349dc5 282 * @}
<> 134:ad3be0349dc5 283 */
<> 134:ad3be0349dc5 284
<> 134:ad3be0349dc5 285 /**
<> 134:ad3be0349dc5 286 * @}
<> 134:ad3be0349dc5 287 */
<> 134:ad3be0349dc5 288
<> 134:ad3be0349dc5 289 /* Exported macro ------------------------------------------------------------*/
<> 134:ad3be0349dc5 290 /** @defgroup COMP_LL_Exported_Macros COMP Exported Macros
<> 134:ad3be0349dc5 291 * @{
<> 134:ad3be0349dc5 292 */
<> 134:ad3be0349dc5 293 /** @defgroup COMP_LL_EM_WRITE_READ Common write and read registers macro
<> 134:ad3be0349dc5 294 * @{
<> 134:ad3be0349dc5 295 */
<> 134:ad3be0349dc5 296
<> 134:ad3be0349dc5 297 /**
<> 134:ad3be0349dc5 298 * @brief Write a value in COMP register
<> 134:ad3be0349dc5 299 * @param __INSTANCE__ comparator instance
<> 134:ad3be0349dc5 300 * @param __REG__ Register to be written
<> 134:ad3be0349dc5 301 * @param __VALUE__ Value to be written in the register
<> 134:ad3be0349dc5 302 * @retval None
<> 134:ad3be0349dc5 303 */
<> 134:ad3be0349dc5 304 #define LL_COMP_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
<> 134:ad3be0349dc5 305
<> 134:ad3be0349dc5 306 /**
<> 134:ad3be0349dc5 307 * @brief Read a value in COMP register
<> 134:ad3be0349dc5 308 * @param __INSTANCE__ comparator instance
<> 134:ad3be0349dc5 309 * @param __REG__ Register to be read
<> 134:ad3be0349dc5 310 * @retval Register value
<> 134:ad3be0349dc5 311 */
<> 134:ad3be0349dc5 312 #define LL_COMP_ReadReg(__INSTANCE__, __REG__) READ_REG(__INSTANCE__->__REG__)
<> 134:ad3be0349dc5 313 /**
<> 134:ad3be0349dc5 314 * @}
<> 134:ad3be0349dc5 315 */
<> 134:ad3be0349dc5 316
<> 134:ad3be0349dc5 317 /** @defgroup COMP_LL_EM_HELPER_MACRO COMP helper macro
<> 134:ad3be0349dc5 318 * @{
<> 134:ad3be0349dc5 319 */
<> 134:ad3be0349dc5 320
<> 134:ad3be0349dc5 321 /**
<> 134:ad3be0349dc5 322 * @brief Helper macro to select the COMP common instance
<> 134:ad3be0349dc5 323 * to which is belonging the selected COMP instance.
<> 134:ad3be0349dc5 324 * @note COMP common register instance can be used to
<> 134:ad3be0349dc5 325 * set parameters common to several COMP instances.
<> 134:ad3be0349dc5 326 * Refer to functions having argument "COMPxy_COMMON" as parameter.
<> 134:ad3be0349dc5 327 * @param __COMPx__ COMP instance
<> 134:ad3be0349dc5 328 * @retval COMP common instance or value "0" if there is no COMP common instance.
<> 134:ad3be0349dc5 329 */
<> 134:ad3be0349dc5 330 #define __LL_COMP_COMMON_INSTANCE(__COMPx__) \
<> 134:ad3be0349dc5 331 (COMP12_COMMON)
<> 134:ad3be0349dc5 332
<> 134:ad3be0349dc5 333 /**
<> 134:ad3be0349dc5 334 * @}
<> 134:ad3be0349dc5 335 */
<> 134:ad3be0349dc5 336
<> 134:ad3be0349dc5 337 /**
<> 134:ad3be0349dc5 338 * @}
<> 134:ad3be0349dc5 339 */
<> 134:ad3be0349dc5 340
<> 134:ad3be0349dc5 341 /* Exported functions --------------------------------------------------------*/
<> 134:ad3be0349dc5 342 /** @defgroup COMP_LL_Exported_Functions COMP Exported Functions
<> 134:ad3be0349dc5 343 * @{
<> 134:ad3be0349dc5 344 */
<> 134:ad3be0349dc5 345
<> 134:ad3be0349dc5 346 /** @defgroup COMP_LL_EF_Configuration_comparator_common Configuration of COMP hierarchical scope: common to several COMP instances
<> 134:ad3be0349dc5 347 * @{
<> 134:ad3be0349dc5 348 */
<> 134:ad3be0349dc5 349
<> 134:ad3be0349dc5 350 /**
<> 134:ad3be0349dc5 351 * @brief Set window mode of a pair of comparators instances
<> 134:ad3be0349dc5 352 * (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
<> 134:ad3be0349dc5 353 * @rmtoll CSR WNDWEN LL_COMP_SetCommonWindowMode
<> 134:ad3be0349dc5 354 * @param COMPxy_COMMON Comparator common instance
<> 134:ad3be0349dc5 355 * (can be set directly from CMSIS definition or by using helper macro @ref __LL_COMP_COMMON_INSTANCE() )
<> 134:ad3be0349dc5 356 * @param WindowMode This parameter can be one of the following values:
<> 134:ad3be0349dc5 357 * @arg @ref LL_COMP_WINDOWMODE_DISABLE
<> 134:ad3be0349dc5 358 * @arg @ref LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
<> 134:ad3be0349dc5 359 * @retval None
<> 134:ad3be0349dc5 360 */
<> 134:ad3be0349dc5 361 __STATIC_INLINE void LL_COMP_SetCommonWindowMode(COMP_Common_TypeDef *COMPxy_COMMON, uint32_t WindowMode)
<> 134:ad3be0349dc5 362 {
<> 134:ad3be0349dc5 363 MODIFY_REG(COMPxy_COMMON->CSR, COMP_CSR_WNDWEN, WindowMode);
<> 134:ad3be0349dc5 364 }
<> 134:ad3be0349dc5 365
<> 134:ad3be0349dc5 366 /**
<> 134:ad3be0349dc5 367 * @brief Get window mode of a pair of comparators instances
<> 134:ad3be0349dc5 368 * (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
<> 134:ad3be0349dc5 369 * @rmtoll CSR WNDWEN LL_COMP_GetCommonWindowMode
<> 134:ad3be0349dc5 370 * @param COMPxy_COMMON Comparator common instance
<> 134:ad3be0349dc5 371 * (can be set directly from CMSIS definition or by using helper macro @ref __LL_COMP_COMMON_INSTANCE() )
<> 134:ad3be0349dc5 372 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 373 * @arg @ref LL_COMP_WINDOWMODE_DISABLE
<> 134:ad3be0349dc5 374 * @arg @ref LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON
<> 134:ad3be0349dc5 375 */
<> 134:ad3be0349dc5 376 __STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode(COMP_Common_TypeDef *COMPxy_COMMON)
<> 134:ad3be0349dc5 377 {
<> 134:ad3be0349dc5 378 return (uint32_t)(READ_BIT(COMPxy_COMMON->CSR, COMP_CSR_WNDWEN));
<> 134:ad3be0349dc5 379 }
<> 134:ad3be0349dc5 380
<> 134:ad3be0349dc5 381 /**
<> 134:ad3be0349dc5 382 * @}
<> 134:ad3be0349dc5 383 */
<> 134:ad3be0349dc5 384
<> 134:ad3be0349dc5 385 /** @defgroup COMP_LL_EF_Configuration_comparator_modes Configuration of comparator modes
<> 134:ad3be0349dc5 386 * @{
<> 134:ad3be0349dc5 387 */
<> 134:ad3be0349dc5 388
<> 134:ad3be0349dc5 389 /**
<> 134:ad3be0349dc5 390 * @brief Set comparator instance operating mode to adjust power and speed.
<> 134:ad3be0349dc5 391 * @rmtoll CSR COMP1MODE LL_COMP_SetPowerMode\n
<> 134:ad3be0349dc5 392 * COMP2MODE LL_COMP_SetPowerMode
<> 134:ad3be0349dc5 393 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 394 * @param PowerMode This parameter can be one of the following values:
<> 134:ad3be0349dc5 395 * @arg @ref LL_COMP_POWERMODE_HIGHSPEED
<> 134:ad3be0349dc5 396 * @arg @ref LL_COMP_POWERMODE_MEDIUMSPEED
<> 134:ad3be0349dc5 397 * @arg @ref LL_COMP_POWERMODE_LOWPOWER
<> 134:ad3be0349dc5 398 * @arg @ref LL_COMP_POWERMODE_ULTRALOWPOWER
<> 134:ad3be0349dc5 399 * @retval None
<> 134:ad3be0349dc5 400 */
<> 134:ad3be0349dc5 401 __STATIC_INLINE void LL_COMP_SetPowerMode(COMP_TypeDef *COMPx, uint32_t PowerMode)
<> 134:ad3be0349dc5 402 {
<> 134:ad3be0349dc5 403 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 404 COMP_CSR_COMP1MODE << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 405 PowerMode << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 406 }
<> 134:ad3be0349dc5 407
<> 134:ad3be0349dc5 408 /**
<> 134:ad3be0349dc5 409 * @brief Get comparator instance operating mode to adjust power and speed.
<> 134:ad3be0349dc5 410 * @rmtoll CSR COMP1MODE LL_COMP_GetPowerMode\n
<> 134:ad3be0349dc5 411 * COMP2MODE LL_COMP_GetPowerMode
<> 134:ad3be0349dc5 412 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 413 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 414 * @arg @ref LL_COMP_POWERMODE_HIGHSPEED
<> 134:ad3be0349dc5 415 * @arg @ref LL_COMP_POWERMODE_MEDIUMSPEED
<> 134:ad3be0349dc5 416 * @arg @ref LL_COMP_POWERMODE_LOWPOWER
<> 134:ad3be0349dc5 417 * @arg @ref LL_COMP_POWERMODE_ULTRALOWPOWER
<> 134:ad3be0349dc5 418 */
<> 134:ad3be0349dc5 419 __STATIC_INLINE uint32_t LL_COMP_GetPowerMode(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 420 {
<> 134:ad3be0349dc5 421 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 422 COMP_CSR_COMP1MODE << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 423 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 134:ad3be0349dc5 424 );
<> 134:ad3be0349dc5 425 }
<> 134:ad3be0349dc5 426
<> 134:ad3be0349dc5 427 /**
<> 134:ad3be0349dc5 428 * @}
<> 134:ad3be0349dc5 429 */
<> 134:ad3be0349dc5 430
<> 134:ad3be0349dc5 431 /** @defgroup COMP_LL_EF_Configuration_comparator_inputs Configuration of comparator inputs
<> 134:ad3be0349dc5 432 * @{
<> 134:ad3be0349dc5 433 */
<> 134:ad3be0349dc5 434
<> 134:ad3be0349dc5 435 /**
<> 134:ad3be0349dc5 436 * @brief Set comparator inputs minus (inverting) and plus (non-inverting).
<> 134:ad3be0349dc5 437 * @note In case of comparator input selected to be connected to IO:
<> 134:ad3be0349dc5 438 * GPIO pins are specific to each comparator instance.
<> 134:ad3be0349dc5 439 * Refer to description of parameters or to reference manual.
<> 134:ad3be0349dc5 440 * @rmtoll CSR COMP1INSEL LL_COMP_ConfigInputs\n
<> 134:ad3be0349dc5 441 * CSR COMP2INSEL LL_COMP_ConfigInputs\n
<> 134:ad3be0349dc5 442 * CSR COMP1SW1 LL_COMP_ConfigInputs
<> 134:ad3be0349dc5 443 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 444 * @param InputMinus This parameter can be one of the following values:
<> 134:ad3be0349dc5 445 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 134:ad3be0349dc5 446 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 134:ad3be0349dc5 447 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 134:ad3be0349dc5 448 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 134:ad3be0349dc5 449 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 134:ad3be0349dc5 450 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2
<> 134:ad3be0349dc5 451 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 134:ad3be0349dc5 452 * @param InputPlus This parameter can be one of the following values:
<> 134:ad3be0349dc5 453 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 134:ad3be0349dc5 454 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
<> 134:ad3be0349dc5 455 *
<> 134:ad3be0349dc5 456 * (1) Parameter available only on COMP instance: COMP1.
<> 134:ad3be0349dc5 457 * @retval None
<> 134:ad3be0349dc5 458 */
<> 134:ad3be0349dc5 459 __STATIC_INLINE void LL_COMP_ConfigInputs(COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus)
<> 134:ad3be0349dc5 460 {
<> 134:ad3be0349dc5 461 /* Note: Connection switch is applicable only to COMP instance COMP1, */
<> 134:ad3be0349dc5 462 /* therefore if COMP2 is selected the equivalent bit is */
<> 134:ad3be0349dc5 463 /* kept unmodified. */
<> 134:ad3be0349dc5 464 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 465 (COMP_CSR_COMP1INSEL | (COMP_CSR_COMP1SW1 * __COMP_IS_INSTANCE_ODD(COMPx))) << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 466 (InputMinus | InputPlus) << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 467 }
<> 134:ad3be0349dc5 468
<> 134:ad3be0349dc5 469 /**
<> 134:ad3be0349dc5 470 * @brief Set comparator input plus (non-inverting).
<> 134:ad3be0349dc5 471 * @note In case of comparator input selected to be connected to IO:
<> 134:ad3be0349dc5 472 * GPIO pins are specific to each comparator instance.
<> 134:ad3be0349dc5 473 * Refer to description of parameters or to reference manual.
<> 134:ad3be0349dc5 474 * @rmtoll CSR COMP1INSEL LL_COMP_SetInputPlus\n
<> 134:ad3be0349dc5 475 * CSR COMP2INSEL LL_COMP_SetInputPlus
<> 134:ad3be0349dc5 476 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 477 * @param InputPlus This parameter can be one of the following values:
<> 134:ad3be0349dc5 478 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 134:ad3be0349dc5 479 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
<> 134:ad3be0349dc5 480 *
<> 134:ad3be0349dc5 481 * (1) Parameter available only on COMP instance: COMP1.
<> 134:ad3be0349dc5 482 * @retval None
<> 134:ad3be0349dc5 483 */
<> 134:ad3be0349dc5 484 __STATIC_INLINE void LL_COMP_SetInputPlus(COMP_TypeDef *COMPx, uint32_t InputPlus)
<> 134:ad3be0349dc5 485 {
<> 134:ad3be0349dc5 486 /* Note: Connection switch is applicable only to COMP instance COMP1, */
<> 134:ad3be0349dc5 487 /* therefore if COMP2 is selected the equivalent bit is */
<> 134:ad3be0349dc5 488 /* kept unmodified. */
<> 134:ad3be0349dc5 489 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 490 (COMP_CSR_COMP1SW1 * __COMP_IS_INSTANCE_ODD(COMPx)) << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 491 InputPlus << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 492 }
<> 134:ad3be0349dc5 493
<> 134:ad3be0349dc5 494 /**
<> 134:ad3be0349dc5 495 * @brief Get comparator input plus (non-inverting).
<> 134:ad3be0349dc5 496 * @note In case of comparator input selected to be connected to IO:
<> 134:ad3be0349dc5 497 * GPIO pins are specific to each comparator instance.
<> 134:ad3be0349dc5 498 * Refer to description of parameters or to reference manual.
<> 134:ad3be0349dc5 499 * @rmtoll CSR COMP1INSEL LL_COMP_GetInputPlus\n
<> 134:ad3be0349dc5 500 * CSR COMP2INSEL LL_COMP_GetInputPlus
<> 134:ad3be0349dc5 501 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 502 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 503 * @arg @ref LL_COMP_INPUT_PLUS_IO1
<> 134:ad3be0349dc5 504 * @arg @ref LL_COMP_INPUT_PLUS_DAC1_CH1 (1)
<> 134:ad3be0349dc5 505 *
<> 134:ad3be0349dc5 506 * (1) Parameter available only on COMP instance: COMP1.
<> 134:ad3be0349dc5 507 */
<> 134:ad3be0349dc5 508 __STATIC_INLINE uint32_t LL_COMP_GetInputPlus(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 509 {
<> 134:ad3be0349dc5 510 /* Note: Connection switch is applicable only to COMP instance COMP1, */
<> 134:ad3be0349dc5 511 /* therefore is COMP2 is selected the returned value will be null. */
<> 134:ad3be0349dc5 512 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 513 COMP_CSR_COMP1SW1 << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 514 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 134:ad3be0349dc5 515 );
<> 134:ad3be0349dc5 516 }
<> 134:ad3be0349dc5 517
<> 134:ad3be0349dc5 518 /**
<> 134:ad3be0349dc5 519 * @brief Set comparator input minus (inverting).
<> 134:ad3be0349dc5 520 * @note In case of comparator input selected to be connected to IO:
<> 134:ad3be0349dc5 521 * GPIO pins are specific to each comparator instance.
<> 134:ad3be0349dc5 522 * Refer to description of parameters or to reference manual.
<> 134:ad3be0349dc5 523 * @rmtoll CSR COMP1SW1 LL_COMP_SetInputMinus
<> 134:ad3be0349dc5 524 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 525 * @param InputMinus This parameter can be one of the following values:
<> 134:ad3be0349dc5 526 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 134:ad3be0349dc5 527 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 134:ad3be0349dc5 528 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 134:ad3be0349dc5 529 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 134:ad3be0349dc5 530 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 134:ad3be0349dc5 531 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2
<> 134:ad3be0349dc5 532 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 134:ad3be0349dc5 533 * @retval None
<> 134:ad3be0349dc5 534 */
<> 134:ad3be0349dc5 535 __STATIC_INLINE void LL_COMP_SetInputMinus(COMP_TypeDef *COMPx, uint32_t InputMinus)
<> 134:ad3be0349dc5 536 {
<> 134:ad3be0349dc5 537 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 538 COMP_CSR_COMP1INSEL << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 539 InputMinus << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 540 }
<> 134:ad3be0349dc5 541
<> 134:ad3be0349dc5 542 /**
<> 134:ad3be0349dc5 543 * @brief Get comparator input minus (inverting).
<> 134:ad3be0349dc5 544 * @note In case of comparator input selected to be connected to IO:
<> 134:ad3be0349dc5 545 * GPIO pins are specific to each comparator instance.
<> 134:ad3be0349dc5 546 * Refer to description of parameters or to reference manual.
<> 134:ad3be0349dc5 547 * @rmtoll CSR COMP1SW1 LL_COMP_GetInputMinus
<> 134:ad3be0349dc5 548 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 549 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 550 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
<> 134:ad3be0349dc5 551 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
<> 134:ad3be0349dc5 552 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
<> 134:ad3be0349dc5 553 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
<> 134:ad3be0349dc5 554 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1
<> 134:ad3be0349dc5 555 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2
<> 134:ad3be0349dc5 556 * @arg @ref LL_COMP_INPUT_MINUS_IO1
<> 134:ad3be0349dc5 557 */
<> 134:ad3be0349dc5 558 __STATIC_INLINE uint32_t LL_COMP_GetInputMinus(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 559 {
<> 134:ad3be0349dc5 560 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 561 COMP_CSR_COMP1INSEL << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 562 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 134:ad3be0349dc5 563 );
<> 134:ad3be0349dc5 564 }
<> 134:ad3be0349dc5 565
<> 134:ad3be0349dc5 566 /**
<> 134:ad3be0349dc5 567 * @brief Set comparator instance hysteresis mode of the input minus (inverting input).
<> 134:ad3be0349dc5 568 * @rmtoll CSR COMP1HYST LL_COMP_SetInputHysteresis\n
<> 134:ad3be0349dc5 569 * COMP2HYST LL_COMP_SetInputHysteresis
<> 134:ad3be0349dc5 570 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 571 * @param InputHysteresis This parameter can be one of the following values:
<> 134:ad3be0349dc5 572 * @arg @ref LL_COMP_HYSTERESIS_NONE
<> 134:ad3be0349dc5 573 * @arg @ref LL_COMP_HYSTERESIS_LOW
<> 134:ad3be0349dc5 574 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM
<> 134:ad3be0349dc5 575 * @arg @ref LL_COMP_HYSTERESIS_HIGH
<> 134:ad3be0349dc5 576 * @retval None
<> 134:ad3be0349dc5 577 */
<> 134:ad3be0349dc5 578 __STATIC_INLINE void LL_COMP_SetInputHysteresis(COMP_TypeDef *COMPx, uint32_t InputHysteresis)
<> 134:ad3be0349dc5 579 {
<> 134:ad3be0349dc5 580 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 581 COMP_CSR_COMP1HYST << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 582 InputHysteresis << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 583 }
<> 134:ad3be0349dc5 584
<> 134:ad3be0349dc5 585 /**
<> 134:ad3be0349dc5 586 * @brief Get comparator instance hysteresis mode of the minus (inverting) input.
<> 134:ad3be0349dc5 587 * @rmtoll CSR COMP1HYST LL_COMP_GetInputHysteresis\n
<> 134:ad3be0349dc5 588 * COMP2HYST LL_COMP_GetInputHysteresis
<> 134:ad3be0349dc5 589 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 590 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 591 * @arg @ref LL_COMP_HYSTERESIS_NONE
<> 134:ad3be0349dc5 592 * @arg @ref LL_COMP_HYSTERESIS_LOW
<> 134:ad3be0349dc5 593 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM
<> 134:ad3be0349dc5 594 * @arg @ref LL_COMP_HYSTERESIS_HIGH
<> 134:ad3be0349dc5 595 */
<> 134:ad3be0349dc5 596 __STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 597 {
<> 134:ad3be0349dc5 598 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 599 COMP_CSR_COMP1HYST << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 600 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 134:ad3be0349dc5 601 );
<> 134:ad3be0349dc5 602
<> 134:ad3be0349dc5 603 }
<> 134:ad3be0349dc5 604
<> 134:ad3be0349dc5 605 /**
<> 134:ad3be0349dc5 606 * @}
<> 134:ad3be0349dc5 607 */
<> 134:ad3be0349dc5 608
<> 134:ad3be0349dc5 609 /** @defgroup COMP_LL_EF_Configuration_comparator_output Configuration of comparator output
<> 134:ad3be0349dc5 610 * @{
<> 134:ad3be0349dc5 611 */
<> 134:ad3be0349dc5 612
<> 134:ad3be0349dc5 613 /**
<> 134:ad3be0349dc5 614 * @brief Set comparator output selection.
<> 134:ad3be0349dc5 615 * @note Availability of parameters of output selection to timer
<> 134:ad3be0349dc5 616 * depends on timers availability on the selected device.
<> 134:ad3be0349dc5 617 * @rmtoll CSR COMP1OUTSEL LL_COMP_SetOutputSelection\n
<> 134:ad3be0349dc5 618 * COMP2OUTSEL LL_COMP_SetOutputSelection
<> 134:ad3be0349dc5 619 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 620 * @param OutputSelection This parameter can be one of the following values:
<> 134:ad3be0349dc5 621 * @arg @ref LL_COMP_OUTPUT_NONE
<> 134:ad3be0349dc5 622 * @arg @ref LL_COMP_OUTPUT_TIM1_BKIN (1)
<> 134:ad3be0349dc5 623 * @arg @ref LL_COMP_OUTPUT_TIM1_IC1 (1)
<> 134:ad3be0349dc5 624 * @arg @ref LL_COMP_OUTPUT_TIM1_OCCLR (1)
<> 134:ad3be0349dc5 625 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4 (1)
<> 134:ad3be0349dc5 626 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR (1)
<> 134:ad3be0349dc5 627 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1 (1)
<> 134:ad3be0349dc5 628 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR (1)
<> 134:ad3be0349dc5 629 *
<> 134:ad3be0349dc5 630 * (1) Parameter availability depending on timer availability
<> 134:ad3be0349dc5 631 * on the selected device.
<> 134:ad3be0349dc5 632 * @retval None
<> 134:ad3be0349dc5 633 */
<> 134:ad3be0349dc5 634 __STATIC_INLINE void LL_COMP_SetOutputSelection(COMP_TypeDef *COMPx, uint32_t OutputSelection)
<> 134:ad3be0349dc5 635 {
<> 134:ad3be0349dc5 636 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 637 COMP_CSR_COMP1OUTSEL << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 638 OutputSelection << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 639 }
<> 134:ad3be0349dc5 640
<> 134:ad3be0349dc5 641 /**
<> 134:ad3be0349dc5 642 * @brief Get comparator output selection.
<> 134:ad3be0349dc5 643 * @note Availability of parameters of output selection to timer
<> 134:ad3be0349dc5 644 * depends on timers availability on the selected device.
<> 134:ad3be0349dc5 645 * @rmtoll CSR COMP1OUTSEL LL_COMP_GetOutputSelection\n
<> 134:ad3be0349dc5 646 * COMP2OUTSEL LL_COMP_GetOutputSelection
<> 134:ad3be0349dc5 647 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 648 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 649 * @arg @ref LL_COMP_OUTPUT_NONE
<> 134:ad3be0349dc5 650 * @arg @ref LL_COMP_OUTPUT_TIM1_BKIN (1)
<> 134:ad3be0349dc5 651 * @arg @ref LL_COMP_OUTPUT_TIM1_IC1 (1)
<> 134:ad3be0349dc5 652 * @arg @ref LL_COMP_OUTPUT_TIM1_OCCLR (1)
<> 134:ad3be0349dc5 653 * @arg @ref LL_COMP_OUTPUT_TIM2_IC4 (1)
<> 134:ad3be0349dc5 654 * @arg @ref LL_COMP_OUTPUT_TIM2_OCCLR (1)
<> 134:ad3be0349dc5 655 * @arg @ref LL_COMP_OUTPUT_TIM3_IC1 (1)
<> 134:ad3be0349dc5 656 * @arg @ref LL_COMP_OUTPUT_TIM3_OCCLR (1)
<> 134:ad3be0349dc5 657 *
<> 134:ad3be0349dc5 658 * (1) Parameter availability depending on timer availability
<> 134:ad3be0349dc5 659 * on the selected device.
<> 134:ad3be0349dc5 660 */
<> 134:ad3be0349dc5 661 __STATIC_INLINE uint32_t LL_COMP_GetOutputSelection(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 662 {
<> 134:ad3be0349dc5 663 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 664 COMP_CSR_COMP1OUTSEL << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 665 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 134:ad3be0349dc5 666 );
<> 134:ad3be0349dc5 667 }
<> 134:ad3be0349dc5 668
<> 134:ad3be0349dc5 669 /**
<> 134:ad3be0349dc5 670 * @brief Set comparator instance output polarity.
<> 134:ad3be0349dc5 671 * @rmtoll CSR COMP1POL LL_COMP_SetOutputPolarity\n
<> 134:ad3be0349dc5 672 * COMP2POL LL_COMP_SetOutputPolarity
<> 134:ad3be0349dc5 673 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 674 * @param OutputPolarity This parameter can be one of the following values:
<> 134:ad3be0349dc5 675 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
<> 134:ad3be0349dc5 676 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
<> 134:ad3be0349dc5 677 * @retval None
<> 134:ad3be0349dc5 678 */
<> 134:ad3be0349dc5 679 __STATIC_INLINE void LL_COMP_SetOutputPolarity(COMP_TypeDef *COMPx, uint32_t OutputPolarity)
<> 134:ad3be0349dc5 680 {
<> 134:ad3be0349dc5 681 MODIFY_REG(COMP->CSR,
<> 134:ad3be0349dc5 682 COMP_CSR_COMP1POL << __COMP_BITOFFSET_INSTANCE(COMPx),
<> 134:ad3be0349dc5 683 OutputPolarity << __COMP_BITOFFSET_INSTANCE(COMPx) );
<> 134:ad3be0349dc5 684 }
<> 134:ad3be0349dc5 685
<> 134:ad3be0349dc5 686 /**
<> 134:ad3be0349dc5 687 * @brief Get comparator instance output polarity.
<> 134:ad3be0349dc5 688 * @rmtoll CSR COMP1POL LL_COMP_GetOutputPolarity\n
<> 134:ad3be0349dc5 689 * COMP2POL LL_COMP_GetOutputPolarity
<> 134:ad3be0349dc5 690 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 691 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 692 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
<> 134:ad3be0349dc5 693 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
<> 134:ad3be0349dc5 694 */
<> 134:ad3be0349dc5 695 __STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 696 {
<> 134:ad3be0349dc5 697 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 698 COMP_CSR_COMP1POL << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 699 >> __COMP_BITOFFSET_INSTANCE(COMPx)
<> 134:ad3be0349dc5 700 );
<> 134:ad3be0349dc5 701 }
<> 134:ad3be0349dc5 702
<> 134:ad3be0349dc5 703 /**
<> 134:ad3be0349dc5 704 * @}
<> 134:ad3be0349dc5 705 */
<> 134:ad3be0349dc5 706
<> 134:ad3be0349dc5 707 /** @defgroup COMP_LL_EF_Operation Operation on comparator instance
<> 134:ad3be0349dc5 708 * @{
<> 134:ad3be0349dc5 709 */
<> 134:ad3be0349dc5 710
<> 134:ad3be0349dc5 711 /**
<> 134:ad3be0349dc5 712 * @brief Enable comparator instance.
<> 134:ad3be0349dc5 713 * @note After enable from off state, comparator requires a delay
<> 134:ad3be0349dc5 714 * to reach reach propagation delay specification.
<> 134:ad3be0349dc5 715 * Refer to device datasheet, parameter "tSTART".
<> 134:ad3be0349dc5 716 * @rmtoll CSR COMP1EN LL_COMP_Enable\n
Anna Bridge 160:5571c4ff569f 717 * CSR COMP2EN LL_COMP_Enable
<> 134:ad3be0349dc5 718 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 719 * @retval None
<> 134:ad3be0349dc5 720 */
<> 134:ad3be0349dc5 721 __STATIC_INLINE void LL_COMP_Enable(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 722 {
<> 134:ad3be0349dc5 723 SET_BIT(COMP->CSR, COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 134:ad3be0349dc5 724 }
<> 134:ad3be0349dc5 725
<> 134:ad3be0349dc5 726 /**
<> 134:ad3be0349dc5 727 * @brief Disable comparator instance.
<> 134:ad3be0349dc5 728 * @rmtoll CSR COMP1EN LL_COMP_Disable\n
Anna Bridge 160:5571c4ff569f 729 * CSR COMP2EN LL_COMP_Disable
<> 134:ad3be0349dc5 730 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 731 * @retval None
<> 134:ad3be0349dc5 732 */
<> 134:ad3be0349dc5 733 __STATIC_INLINE void LL_COMP_Disable(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 734 {
<> 134:ad3be0349dc5 735 CLEAR_BIT(COMP->CSR, COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 134:ad3be0349dc5 736 }
<> 134:ad3be0349dc5 737
<> 134:ad3be0349dc5 738 /**
<> 134:ad3be0349dc5 739 * @brief Get comparator enable state
<> 134:ad3be0349dc5 740 * (0: COMP is disabled, 1: COMP is enabled)
<> 134:ad3be0349dc5 741 * @rmtoll CSR COMP1EN LL_COMP_IsEnabled\n
Anna Bridge 160:5571c4ff569f 742 * CSR COMP2EN LL_COMP_IsEnabled
<> 134:ad3be0349dc5 743 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 744 * @retval State of bit (1 or 0).
<> 134:ad3be0349dc5 745 */
<> 134:ad3be0349dc5 746 __STATIC_INLINE uint32_t LL_COMP_IsEnabled(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 747 {
<> 134:ad3be0349dc5 748 return (READ_BIT(COMP->CSR, COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx)) == COMP_CSR_COMP1EN << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 134:ad3be0349dc5 749 }
<> 134:ad3be0349dc5 750
<> 134:ad3be0349dc5 751 /**
<> 134:ad3be0349dc5 752 * @brief Lock comparator instance.
<> 134:ad3be0349dc5 753 * @note Once locked, comparator configuration can be accessed in read-only.
<> 134:ad3be0349dc5 754 * @note The only way to unlock the comparator is a device hardware reset.
<> 134:ad3be0349dc5 755 * @rmtoll CSR COMP1LOCK LL_COMP_Lock\n
Anna Bridge 160:5571c4ff569f 756 * CSR COMP2LOCK LL_COMP_Lock
<> 134:ad3be0349dc5 757 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 758 * @retval None
<> 134:ad3be0349dc5 759 */
<> 134:ad3be0349dc5 760 __STATIC_INLINE void LL_COMP_Lock(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 761 {
<> 134:ad3be0349dc5 762 SET_BIT(COMP->CSR, COMP_CSR_COMP1LOCK << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 134:ad3be0349dc5 763 }
<> 134:ad3be0349dc5 764
<> 134:ad3be0349dc5 765 /**
<> 134:ad3be0349dc5 766 * @brief Get comparator lock state
<> 134:ad3be0349dc5 767 * (0: COMP is unlocked, 1: COMP is locked).
<> 134:ad3be0349dc5 768 * @note Once locked, comparator configuration can be accessed in read-only.
<> 134:ad3be0349dc5 769 * @note The only way to unlock the comparator is a device hardware reset.
<> 134:ad3be0349dc5 770 * @rmtoll CSR COMP1LOCK LL_COMP_IsLocked\n
Anna Bridge 160:5571c4ff569f 771 * CSR COMP2LOCK LL_COMP_IsLocked
<> 134:ad3be0349dc5 772 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 773 * @retval State of bit (1 or 0).
<> 134:ad3be0349dc5 774 */
<> 134:ad3be0349dc5 775 __STATIC_INLINE uint32_t LL_COMP_IsLocked(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 776 {
<> 134:ad3be0349dc5 777 return (READ_BIT(COMP->CSR, COMP_CSR_COMP1LOCK << __COMP_BITOFFSET_INSTANCE(COMPx)) == COMP_CSR_COMP1LOCK << __COMP_BITOFFSET_INSTANCE(COMPx));
<> 134:ad3be0349dc5 778 }
<> 134:ad3be0349dc5 779
<> 134:ad3be0349dc5 780 /**
<> 134:ad3be0349dc5 781 * @brief Read comparator instance output level.
<> 134:ad3be0349dc5 782 * @note The comparator output level depends on the selected polarity
<> 134:ad3be0349dc5 783 * (Refer to function @ref LL_COMP_SetOutputPolarity()).
<> 134:ad3be0349dc5 784 * If the comparator polarity is not inverted:
<> 134:ad3be0349dc5 785 * - Comparator output is low when the input plus
<> 134:ad3be0349dc5 786 * is at a lower voltage than the input minus
<> 134:ad3be0349dc5 787 * - Comparator output is high when the input plus
<> 134:ad3be0349dc5 788 * is at a higher voltage than the input minus
<> 134:ad3be0349dc5 789 * If the comparator polarity is inverted:
<> 134:ad3be0349dc5 790 * - Comparator output is high when the input plus
<> 134:ad3be0349dc5 791 * is at a lower voltage than the input minus
<> 134:ad3be0349dc5 792 * - Comparator output is low when the input plus
<> 134:ad3be0349dc5 793 * is at a higher voltage than the input minus
<> 134:ad3be0349dc5 794 * @rmtoll CSR COMP1OUT LL_COMP_ReadOutputLevel\n
Anna Bridge 160:5571c4ff569f 795 * CSR COMP2OUT LL_COMP_ReadOutputLevel
<> 134:ad3be0349dc5 796 * @param COMPx Comparator instance
<> 134:ad3be0349dc5 797 * @retval Returned value can be one of the following values:
<> 134:ad3be0349dc5 798 * @arg @ref LL_COMP_OUTPUT_LEVEL_LOW
<> 134:ad3be0349dc5 799 * @arg @ref LL_COMP_OUTPUT_LEVEL_HIGH
<> 134:ad3be0349dc5 800 */
<> 134:ad3be0349dc5 801 __STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel(COMP_TypeDef *COMPx)
<> 134:ad3be0349dc5 802 {
<> 134:ad3be0349dc5 803 return (uint32_t)(READ_BIT(COMP->CSR,
<> 134:ad3be0349dc5 804 COMP_CSR_COMP1OUT << __COMP_BITOFFSET_INSTANCE(COMPx))
<> 134:ad3be0349dc5 805 >> (__COMP_BITOFFSET_INSTANCE(COMPx) + LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS)
<> 134:ad3be0349dc5 806 );
<> 134:ad3be0349dc5 807 }
<> 134:ad3be0349dc5 808
<> 134:ad3be0349dc5 809 /**
<> 134:ad3be0349dc5 810 * @}
<> 134:ad3be0349dc5 811 */
<> 134:ad3be0349dc5 812
<> 134:ad3be0349dc5 813 #if defined(USE_FULL_LL_DRIVER)
<> 134:ad3be0349dc5 814 /** @defgroup COMP_LL_EF_Init Initialization and de-initialization functions
<> 134:ad3be0349dc5 815 * @{
<> 134:ad3be0349dc5 816 */
<> 134:ad3be0349dc5 817
<> 134:ad3be0349dc5 818 ErrorStatus LL_COMP_DeInit(COMP_TypeDef *COMPx);
<> 134:ad3be0349dc5 819 ErrorStatus LL_COMP_Init(COMP_TypeDef *COMPx, LL_COMP_InitTypeDef *COMP_InitStruct);
<> 134:ad3be0349dc5 820 void LL_COMP_StructInit(LL_COMP_InitTypeDef *COMP_InitStruct);
<> 134:ad3be0349dc5 821
<> 134:ad3be0349dc5 822 /**
<> 134:ad3be0349dc5 823 * @}
<> 134:ad3be0349dc5 824 */
<> 134:ad3be0349dc5 825 #endif /* USE_FULL_LL_DRIVER */
<> 134:ad3be0349dc5 826
<> 134:ad3be0349dc5 827 /**
<> 134:ad3be0349dc5 828 * @}
<> 134:ad3be0349dc5 829 */
<> 134:ad3be0349dc5 830
<> 134:ad3be0349dc5 831 /**
<> 134:ad3be0349dc5 832 * @}
<> 134:ad3be0349dc5 833 */
<> 134:ad3be0349dc5 834
<> 134:ad3be0349dc5 835 #endif /* COMP1 || COMP2 */
<> 134:ad3be0349dc5 836
<> 134:ad3be0349dc5 837 /**
<> 134:ad3be0349dc5 838 * @}
<> 134:ad3be0349dc5 839 */
<> 134:ad3be0349dc5 840
<> 134:ad3be0349dc5 841 #ifdef __cplusplus
<> 134:ad3be0349dc5 842 }
<> 134:ad3be0349dc5 843 #endif
<> 134:ad3be0349dc5 844
<> 134:ad3be0349dc5 845 #endif /* __STM32F0xx_LL_COMP_H */
<> 134:ad3be0349dc5 846
<> 134:ad3be0349dc5 847 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/