Merge pull request #11189 from klutvott123/move-telemetry-displayport-init
[betaflight.git] / lib / main / STM32G4 / Drivers / STM32G4xx_HAL_Driver / Inc / stm32g4xx_ll_comp.h
bloba32d58d0bb4971f27ff17cf267ff85775d2abb0c
1 /**
2 ******************************************************************************
3 * @file stm32g4xx_ll_comp.h
4 * @author MCD Application Team
5 * @brief Header file of COMP LL module.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under BSD 3-Clause license,
13 * the "License"; You may not use this file except in compliance with the
14 * License. You may obtain a copy of the License at:
15 * opensource.org/licenses/BSD-3-Clause
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32G4xx_LL_COMP_H
22 #define STM32G4xx_LL_COMP_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32g4xx.h"
31 /** @addtogroup STM32G4xx_LL_Driver
32 * @{
37 /** @defgroup COMP_LL COMP
38 * @{
41 /* Private types -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 /* Private constants ---------------------------------------------------------*/
45 /* Private macros ------------------------------------------------------------*/
46 /* Exported types ------------------------------------------------------------*/
47 #if defined(USE_FULL_LL_DRIVER)
48 /** @defgroup COMP_LL_ES_INIT COMP Exported Init structure
49 * @{
52 /**
53 * @brief Structure definition of some features of COMP instance.
55 typedef struct
57 uint32_t InputPlus; /*!< Set comparator input plus (non-inverting input).
58 This parameter can be a value of @ref COMP_LL_EC_INPUT_PLUS
60 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputPlus(). */
62 uint32_t InputMinus; /*!< Set comparator input minus (inverting input).
63 This parameter can be a value of @ref COMP_LL_EC_INPUT_MINUS
65 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputMinus(). */
67 uint32_t InputHysteresis; /*!< Set comparator hysteresis mode of the input minus.
68 This parameter can be a value of @ref COMP_LL_EC_INPUT_HYSTERESIS
70 This feature can be modified afterwards using unitary function @ref LL_COMP_SetInputHysteresis(). */
72 uint32_t OutputPolarity; /*!< Set comparator output polarity.
73 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_POLARITY
75 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputPolarity(). */
77 uint32_t OutputBlankingSource; /*!< Set comparator blanking source.
78 This parameter can be a value of @ref COMP_LL_EC_OUTPUT_BLANKING_SOURCE
80 This feature can be modified afterwards using unitary function @ref LL_COMP_SetOutputBlankingSource(). */
82 uint32_t DeglitcherMode; /*!< Configure the comparator deglitcher mode.
83 This parameter can be a value of @ref COMP_LL_EC_DEGLITCHER_MODE
85 This feature can be modified afterwards using unitary function @ref LL_COMP_SetDeglitcherMode(). */
87 } LL_COMP_InitTypeDef;
89 /**
90 * @}
92 #endif /* USE_FULL_LL_DRIVER */
94 /* Exported constants --------------------------------------------------------*/
95 /** @defgroup COMP_LL_Exported_Constants COMP Exported Constants
96 * @{
99 /** @defgroup COMP_LL_EC_INPUT_PLUS Comparator inputs - Input plus (input non-inverting) selection
100 * @{
102 #define LL_COMP_INPUT_PLUS_IO1 (0x00000000UL) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, pin PA7 for COMP2, pin PA0 for COMP3, pin PB0 for COMP4, pin PB13 for COMP5, pin PB11 for COMP6, pin PB14 for COMP7). Note: For COMPx instance availability, please refer to datasheet */
103 #define LL_COMP_INPUT_PLUS_IO2 (COMP_CSR_INPSEL) /*!< Comparator input plus connected to IO2 (pin PB1 for COMP1, pin PA3 for COMP2, pin PC1 for COMP3, pin PE7 for COMP4, pin PD12 for COMP5, pin PD11 for COMP6, pin PD14 for COMP7). Note: For COMPx instance availability, please refer to datasheet */
105 * @}
108 /** @defgroup COMP_LL_EC_INPUT_MINUS Comparator inputs - Input minus (input inverting) selection
109 * @{
111 #define LL_COMP_INPUT_MINUS_1_4VREFINT ( COMP_CSR_SCALEN | COMP_CSR_BRGEN) /*!< Comparator input minus connected to 1/4 VrefInt */
112 #define LL_COMP_INPUT_MINUS_1_2VREFINT ( COMP_CSR_INMSEL_0 | COMP_CSR_SCALEN | COMP_CSR_BRGEN) /*!< Comparator input minus connected to 1/2 VrefInt */
113 #define LL_COMP_INPUT_MINUS_3_4VREFINT ( COMP_CSR_INMSEL_1 | COMP_CSR_SCALEN | COMP_CSR_BRGEN) /*!< Comparator input minus connected to 3/4 VrefInt */
114 #define LL_COMP_INPUT_MINUS_VREFINT ( COMP_CSR_INMSEL_1 | COMP_CSR_INMSEL_0 | COMP_CSR_SCALEN ) /*!< Comparator input minus connected to VrefInt */
115 #define LL_COMP_INPUT_MINUS_DAC1_CH1 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_0) /*!< Comparator input minus connected to DAC1 Channel 1 for COMP1/3/4. Note: For COMPx & DACx instances availability, please refer to datasheet */
116 #define LL_COMP_INPUT_MINUS_DAC1_CH2 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_0) /*!< Comparator input minus connected to DAC1 Channel 2 for COMP2/5. Note: For COMPx & DACx instances availability, please refer to datasheet */
117 #define LL_COMP_INPUT_MINUS_DAC2_CH1 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_0) /*!< Comparator input minus connected to DAC2 Channel 1 for COMP6/7. Note: For COMPx & DACx instances availability, please refer to datasheet */
118 #define LL_COMP_INPUT_MINUS_DAC3_CH1 (COMP_CSR_INMSEL_2 ) /*!< Comparator input minus connected to DAC3 Channel 1 for COMP1/3. Note: For COMPx & DACx instances availability, please refer to datasheet */
119 #define LL_COMP_INPUT_MINUS_DAC3_CH2 (COMP_CSR_INMSEL_2 ) /*!< Comparator input minus connected to DAC3 Channel 2 for COMP2/4. Note: For COMPx & DACx instances availability, please refer to datasheet */
120 #define LL_COMP_INPUT_MINUS_DAC4_CH1 (COMP_CSR_INMSEL_2 ) /*!< Comparator input minus connected to DAC4 Channel 1 for COMP5/7. Note: For COMPx & DACx instances availability, please refer to datasheet */
121 #define LL_COMP_INPUT_MINUS_DAC4_CH2 (COMP_CSR_INMSEL_2 ) /*!< Comparator input minus connected to DAC4 Channel 2 for COMP6. Note: For COMPx & DACx instances availability, please refer to datasheet */
122 #define LL_COMP_INPUT_MINUS_IO1 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_1 ) /*!< Comparator input minus connected to IO1 (pin PA4 for COMP1, pin PA5 for COMP2, pin PF1 for COMP3, pin PE8 for COMP4, pin PB10 for COMP5, pin PD10 for COMP6, pin PD15 for COMP7). Note: For COMPx instance availability, please refer to datasheet */
123 #define LL_COMP_INPUT_MINUS_IO2 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_1 | COMP_CSR_INMSEL_0) /*!< Comparator input minus connected to IO2 (pin PA0 for COMP1, pin PA2 for COMP2, pin PC0 for COMP3, pin PB2 for COMP4, pin PD13 for COMP5, pin PB15 for COMP6, pin PB12 for COMP7). Note: For COMPx instance availability, please refer to datasheet */
126 * @}
129 /** @defgroup COMP_LL_EC_INPUT_HYSTERESIS Comparator input - Hysteresis
130 * @{
132 #define LL_COMP_HYSTERESIS_NONE (0x00000000UL) /*!< No hysteresis */
133 #define LL_COMP_HYSTERESIS_10MV ( COMP_CSR_HYST_0) /*!< Hysteresis level 10mV */
134 #define LL_COMP_HYSTERESIS_20MV ( COMP_CSR_HYST_1 ) /*!< Hysteresis level 20mV */
135 #define LL_COMP_HYSTERESIS_30MV ( COMP_CSR_HYST_1 | COMP_CSR_HYST_0) /*!< Hysteresis level 30mV */
136 #define LL_COMP_HYSTERESIS_40MV (COMP_CSR_HYST_2 ) /*!< Hysteresis level 40mV */
137 #define LL_COMP_HYSTERESIS_50MV (COMP_CSR_HYST_2 | COMP_CSR_HYST_0) /*!< Hysteresis level 50mV */
138 #define LL_COMP_HYSTERESIS_60MV (COMP_CSR_HYST_2 | COMP_CSR_HYST_1 ) /*!< Hysteresis level 60mV */
139 #define LL_COMP_HYSTERESIS_70MV (COMP_CSR_HYST_2 | COMP_CSR_HYST_1 | COMP_CSR_HYST_0) /*!< Hysteresis level 70mV */
140 #define LL_COMP_HYSTERESIS_LOW LL_COMP_HYSTERESIS_10MV /*!< Hysteresis level low */
141 #define LL_COMP_HYSTERESIS_MEDIUM LL_COMP_HYSTERESIS_40MV /*!< Hysteresis level medium */
142 #define LL_COMP_HYSTERESIS_HIGH LL_COMP_HYSTERESIS_70MV /*!< Hysteresis level high */
144 * @}
147 /** @defgroup COMP_LL_EC_OUTPUT_POLARITY Comparator output - Output polarity
148 * @{
150 #define LL_COMP_OUTPUTPOL_NONINVERTED (0x00000000UL) /*!< 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 */
151 #define LL_COMP_OUTPUTPOL_INVERTED (COMP_CSR_POLARITY) /*!< 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 */
153 * @}
156 /** @defgroup COMP_LL_EC_OUTPUT_BLANKING_SOURCE Comparator output - Blanking source
157 * @{
159 #define LL_COMP_BLANKINGSRC_NONE (0x00000000UL) /*!<Comparator output without blanking */
160 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP1). Note: For COMPx instance availability, please refer to datasheet */
161 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP2). Note: For COMPx instance availability, please refer to datasheet */
162 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP3 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP3). Note: For COMPx instance availability, please refer to datasheet */
163 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP4 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP4). Note: For COMPx instance availability, please refer to datasheet */
164 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP5 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP5). Note: For COMPx instance availability, please refer to datasheet */
165 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP6 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP6). Note: For COMPx instance availability, please refer to datasheet */
166 #define LL_COMP_BLANKINGSRC_TIM1_OC5_COMP7 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM1 OC5 (specific to COMP instance: COMP7). Note: For COMPx instance availability, please refer to datasheet */
167 #define LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM2 OC3 (specific to COMP instance: COMP1). Note: For COMPx instance availability, please refer to datasheet */
168 #define LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM2 OC3 (specific to COMP instance: COMP2). Note: For COMPx instance availability, please refer to datasheet */
169 #define LL_COMP_BLANKINGSRC_TIM2_OC3_COMP5 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM2 OC3 (specific to COMP instance: COMP5). Note: For COMPx instance availability, please refer to datasheet */
170 #define LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM2 OC4 (specific to COMP instance: COMP3). Note: For COMPx instance availability, please refer to datasheet */
171 #define LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM2 OC4 (specific to COMP instance: COMP6). Note: For COMPx instance availability, please refer to datasheet */
172 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP1). Note: For COMPx instance availability, please refer to datasheet */
173 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP2). Note: For COMPx instance availability, please refer to datasheet */
174 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP3 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP3). Note: For COMPx instance availability, please refer to datasheet */
175 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP5 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP5). Note: For COMPx instance availability, please refer to datasheet */
176 #define LL_COMP_BLANKINGSRC_TIM3_OC3_COMP7 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM3 OC3 (specific to COMP instance: COMP7). Note: For COMPx instance availability, please refer to datasheet */
177 #define LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM3 OC4 (specific to COMP instance: COMP4). Note: For COMPx instance availability, please refer to datasheet */
178 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP1 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP1). Note: For COMPx instance availability, please refer to datasheet */
179 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP2). Note: For COMPx instance availability, please refer to datasheet */
180 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP3 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP3). Note: For COMPx instance availability, please refer to datasheet */
181 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP4). Note: For COMPx instance availability, please refer to datasheet */
182 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP5 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP5). Note: For COMPx instance availability, please refer to datasheet */
183 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP6 ( COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP6). Note: For COMPx instance availability, please refer to datasheet */
184 #define LL_COMP_BLANKINGSRC_TIM8_OC5_COMP7 ( COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM8 OC5 (specific to COMP instance: COMP7). Note: For COMPx instance availability, please refer to datasheet */
185 #define LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM15 OC1 (specific to COMP instance: COMP4). Note: For COMPx instance availability, please refer to datasheet */
186 #define LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6 ( COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM15 OC2 (specific to COMP instance: COMP6). Note: For COMPx instance availability, please refer to datasheet */
187 #define LL_COMP_BLANKINGSRC_TIM15_OC2_COMP7 (COMP_CSR_BLANKING_2 ) /*!< Comparator output blanking source TIM15 OC3 (specific to COMP instance: COMP7). Note: For COMPx instance availability, please refer to datasheet */
188 #define LL_COMP_BLANKINGSRC_TIM20_OC5 (COMP_CSR_BLANKING_2 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM20 OC5 (Common to all COMP instances). Note: For TIM20 instance availability, please refer to datasheet */
189 #define LL_COMP_BLANKINGSRC_TIM15_OC1 (COMP_CSR_BLANKING_2 | COMP_CSR_BLANKING_1 ) /*!< Comparator output blanking source TIM15 OC1 (Common to all COMP instances). */
190 #define LL_COMP_BLANKINGSRC_TIM4_OC3 (COMP_CSR_BLANKING_2 | COMP_CSR_BLANKING_1 | COMP_CSR_BLANKING_0) /*!< Comparator output blanking source TIM4 OC3 (Common to all COMP instances). */
193 * @}
196 /** @defgroup COMP_LL_EC_OUTPUT_LEVEL Comparator output - Output level
197 * @{
199 #define LL_COMP_OUTPUT_LEVEL_LOW (0x00000000UL) /*!< Comparator output level low (if the polarity is not inverted, otherwise to be complemented) */
200 #define LL_COMP_OUTPUT_LEVEL_HIGH (0x00000001UL) /*!< Comparator output level high (if the polarity is not inverted, otherwise to be complemented) */
202 * @}
205 /** @defgroup COMP_LL_EC_DEGLITCHER_MODE Comparator Deglitcher Mode
206 * @{
208 #define LL_COMP_DEGLITCHER_DISABLED (0x00000000UL) /*!< Comparator deglitcher disabled */
209 #define LL_COMP_DEGLITCHER_ENABLED (COMP_CSR_DEGLITCHEN) /*!< Comparator deglitcher enabled */
211 * @}
214 /** @defgroup COMP_LL_EC_HW_DELAYS Definitions of COMP hardware constraints delays
215 * @note Only COMP peripheral HW delays are defined in COMP LL driver driver,
216 * not timeout values.
217 * For details on delays values, refer to descriptions in source code
218 * above each literal definition.
219 * @{
222 /* Delay for comparator startup time. */
223 /* Note: Delay required to reach propagation delay specification. */
224 /* Literal set to maximum value (refer to device datasheet, */
225 /* parameter "tSTART"). */
226 /* Unit: us */
227 #define LL_COMP_DELAY_STARTUP_US ( 5UL) /*!< Delay for COMP startup time */
229 /* Delay for comparator voltage scaler stabilization time. */
230 /* Note: Voltage scaler is used when selecting comparator input */
231 /* based on VrefInt: VrefInt or subdivision of VrefInt. */
232 /* Literal set to maximum value (refer to device datasheet, */
233 /* parameter "tSTART_SCALER"). */
234 /* Unit: us */
235 #define LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US ( 200UL) /*!< Delay for COMP voltage scaler stabilization time */
238 * @}
242 * @}
245 /* Exported macro ------------------------------------------------------------*/
246 /** @defgroup COMP_LL_Exported_Macros COMP Exported Macros
247 * @{
249 /** @defgroup COMP_LL_EM_WRITE_READ Common write and read registers macro
250 * @{
254 * @brief Write a value in COMP register
255 * @param __INSTANCE__ comparator instance
256 * @param __REG__ Register to be written
257 * @param __VALUE__ Value to be written in the register
258 * @retval None
260 #define LL_COMP_WriteReg(__INSTANCE__, __REG__, __VALUE__) WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
263 * @brief Read a value in COMP register
264 * @param __INSTANCE__ comparator instance
265 * @param __REG__ Register to be read
266 * @retval Register value
268 #define LL_COMP_ReadReg(__INSTANCE__, __REG__) READ_REG((__INSTANCE__)->__REG__)
270 * @}
273 /** @defgroup COMP_LL_EM_HELPER_MACRO COMP helper macro
274 * @{
278 * @}
282 * @}
285 /* Exported functions --------------------------------------------------------*/
286 /** @defgroup COMP_LL_Exported_Functions COMP Exported Functions
287 * @{
290 /** @defgroup COMP_LL_EF_Configuration_comparator_inputs Configuration of comparator inputs
291 * @{
295 * @brief Set comparator inputs minus (inverting) and plus (non-inverting).
296 * @note In case of comparator input selected to be connected to IO:
297 * GPIO pins are specific to each comparator instance.
298 * Refer to description of parameters or to reference manual.
299 * @note On this STM32 serie, scaler bridge is configurable:
300 * to optimize power consumption, this function enables the
301 * voltage scaler bridge only when required
302 * (when selecting comparator input based on VrefInt: VrefInt or
303 * subdivision of VrefInt).
304 * - For scaler bridge power consumption values,
305 * refer to device datasheet, parameter "IDDA(SCALER)".
306 * - Voltage scaler requires a delay for voltage stabilization.
307 * Refer to device datasheet, parameter "tSTART_SCALER".
308 * - Scaler bridge is common for all comparator instances,
309 * therefore if at least one of the comparator instance
310 * is requiring the scaler bridge, it remains enabled.
311 * @rmtoll CSR INMSEL LL_COMP_ConfigInputs\n
312 * CSR INPSEL LL_COMP_ConfigInputs\n
313 * CSR BRGEN LL_COMP_ConfigInputs\n
314 * CSR SCALEN LL_COMP_ConfigInputs
315 * @param COMPx Comparator instance
316 * @param InputMinus This parameter can be one of the following values:
317 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
318 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
319 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
320 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
321 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1 (1,3,4)
322 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 (2,5)
323 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1 (6,7)
324 * @arg @ref LL_COMP_INPUT_MINUS_DAC3_CH1 (1,3)
325 * @arg @ref LL_COMP_INPUT_MINUS_DAC3_CH2 (2,4)
326 * @arg @ref LL_COMP_INPUT_MINUS_DAC4_CH1 (5,7)
327 * @arg @ref LL_COMP_INPUT_MINUS_DAC4_CH2 (6)
328 * (a,b...) Only available for COMPa, COMPb...
329 * For COMPx & DACx instances availability, please refer to datasheet
330 * @arg @ref LL_COMP_INPUT_MINUS_IO1
331 * @arg @ref LL_COMP_INPUT_MINUS_IO2
332 * @param InputPlus This parameter can be one of the following values:
333 * @arg @ref LL_COMP_INPUT_PLUS_IO1
334 * @arg @ref LL_COMP_INPUT_PLUS_IO2
335 * @retval None
337 __STATIC_INLINE void LL_COMP_ConfigInputs(COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus)
339 MODIFY_REG(COMPx->CSR,
340 COMP_CSR_INMSEL | COMP_CSR_INPSEL | COMP_CSR_SCALEN | COMP_CSR_BRGEN,
341 InputMinus | InputPlus);
345 * @brief Set comparator input plus (non-inverting).
346 * @note In case of comparator input selected to be connected to IO:
347 * GPIO pins are specific to each comparator instance.
348 * Refer to description of parameters or to reference manual.
349 * @rmtoll CSR INPSEL LL_COMP_SetInputPlus
350 * @param COMPx Comparator instance
351 * @param InputPlus This parameter can be one of the following values:
352 * @arg @ref LL_COMP_INPUT_PLUS_IO1
353 * @arg @ref LL_COMP_INPUT_PLUS_IO2
354 * @retval None
356 __STATIC_INLINE void LL_COMP_SetInputPlus(COMP_TypeDef *COMPx, uint32_t InputPlus)
358 MODIFY_REG(COMPx->CSR, COMP_CSR_INPSEL, InputPlus);
362 * @brief Get comparator input plus (non-inverting).
363 * @note In case of comparator input selected to be connected to IO:
364 * GPIO pins are specific to each comparator instance.
365 * Refer to description of parameters or to reference manual.
366 * @rmtoll CSR INPSEL LL_COMP_GetInputPlus
367 * @param COMPx Comparator instance
368 * @retval Returned value can be one of the following values:
369 * @arg @ref LL_COMP_INPUT_PLUS_IO1
370 * @arg @ref LL_COMP_INPUT_PLUS_IO2
372 __STATIC_INLINE uint32_t LL_COMP_GetInputPlus(COMP_TypeDef *COMPx)
374 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_INPSEL));
378 * @brief Set comparator input minus (inverting).
379 * @note In case of comparator input selected to be connected to IO:
380 * GPIO pins are specific to each comparator instance.
381 * Refer to description of parameters or to reference manual.
382 * @note On this STM32 serie, scaler bridge is configurable:
383 * to optimize power consumption, this function enables the
384 * voltage scaler bridge only when required
385 * (when selecting comparator input based on VrefInt: VrefInt or
386 * subdivision of VrefInt).
387 * - For scaler bridge power consumption values,
388 * refer to device datasheet, parameter "IDDA(SCALER)".
389 * - Voltage scaler requires a delay for voltage stabilization.
390 * Refer to device datasheet, parameter "tSTART_SCALER".
391 * - Scaler bridge is common for all comparator instances,
392 * therefore if at least one of the comparator instance
393 * is requiring the scaler bridge, it remains enabled.
394 * @rmtoll CSR INMSEL LL_COMP_SetInputMinus\n
395 * CSR BRGEN LL_COMP_SetInputMinus\n
396 * CSR SCALEN LL_COMP_SetInputMinus
397 * @param COMPx Comparator instance
398 * @param InputMinus This parameter can be one of the following values:
399 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
400 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
401 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
402 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
403 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1 (1,3,4)
404 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 (2,5)
405 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1 (6,7)
406 * @arg @ref LL_COMP_INPUT_MINUS_DAC3_CH1 (1,3)
407 * @arg @ref LL_COMP_INPUT_MINUS_DAC3_CH2 (2,4)
408 * @arg @ref LL_COMP_INPUT_MINUS_DAC4_CH1 (5,7)
409 * @arg @ref LL_COMP_INPUT_MINUS_DAC4_CH2 (6)
410 * (a,b...) Only available for COMPa, COMPb...
411 * For COMPx & DACx instances availability, please refer to datasheet
412 * @arg @ref LL_COMP_INPUT_MINUS_IO1
413 * @arg @ref LL_COMP_INPUT_MINUS_IO2
414 * @retval None
416 __STATIC_INLINE void LL_COMP_SetInputMinus(COMP_TypeDef *COMPx, uint32_t InputMinus)
418 MODIFY_REG(COMPx->CSR, COMP_CSR_INMSEL | COMP_CSR_SCALEN | COMP_CSR_BRGEN, InputMinus);
422 * @brief Get comparator input minus (inverting).
423 * @note In case of comparator input selected to be connected to IO:
424 * GPIO pins are specific to each comparator instance.
425 * Refer to description of parameters or to reference manual.
426 * @rmtoll CSR INMSEL LL_COMP_GetInputMinus\n
427 * CSR BRGEN LL_COMP_GetInputMinus\n
428 * CSR SCALEN LL_COMP_GetInputMinus
429 * @param COMPx Comparator instance
430 * @retval Returned value can be one of the following values:
431 * @arg @ref LL_COMP_INPUT_MINUS_1_4VREFINT
432 * @arg @ref LL_COMP_INPUT_MINUS_1_2VREFINT
433 * @arg @ref LL_COMP_INPUT_MINUS_3_4VREFINT
434 * @arg @ref LL_COMP_INPUT_MINUS_VREFINT
435 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH1 (1,3,4)
436 * @arg @ref LL_COMP_INPUT_MINUS_DAC1_CH2 (2,5)
437 * @arg @ref LL_COMP_INPUT_MINUS_DAC2_CH1 (6,7)
438 * @arg @ref LL_COMP_INPUT_MINUS_DAC3_CH1 (1,3)
439 * @arg @ref LL_COMP_INPUT_MINUS_DAC3_CH2 (2,4)
440 * @arg @ref LL_COMP_INPUT_MINUS_DAC4_CH1 (5,7)
441 * @arg @ref LL_COMP_INPUT_MINUS_DAC4_CH2 (6)
442 * (a,b...) Only available for COMPa, COMPb...
443 * For COMPx & DACx instances availability, please refer to datasheet
444 * @arg @ref LL_COMP_INPUT_MINUS_IO1
445 * @arg @ref LL_COMP_INPUT_MINUS_IO2
447 __STATIC_INLINE uint32_t LL_COMP_GetInputMinus(COMP_TypeDef *COMPx)
449 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_INMSEL | COMP_CSR_SCALEN | COMP_CSR_BRGEN));
453 * @brief Set comparator instance hysteresis mode of the input minus (inverting input).
454 * @rmtoll CSR HYST LL_COMP_SetInputHysteresis
455 * @param COMPx Comparator instance
456 * @param InputHysteresis This parameter can be one of the following values:
457 * @arg @ref LL_COMP_HYSTERESIS_NONE
458 * @arg @ref LL_COMP_HYSTERESIS_10MV
459 * @arg @ref LL_COMP_HYSTERESIS_20MV
460 * @arg @ref LL_COMP_HYSTERESIS_30MV
461 * @arg @ref LL_COMP_HYSTERESIS_40MV
462 * @arg @ref LL_COMP_HYSTERESIS_50MV
463 * @arg @ref LL_COMP_HYSTERESIS_60MV
464 * @arg @ref LL_COMP_HYSTERESIS_70MV
465 * @arg @ref LL_COMP_HYSTERESIS_LOW
466 * @arg @ref LL_COMP_HYSTERESIS_MEDIUM
467 * @arg @ref LL_COMP_HYSTERESIS_HIGH
468 * @retval None
470 __STATIC_INLINE void LL_COMP_SetInputHysteresis(COMP_TypeDef *COMPx, uint32_t InputHysteresis)
472 MODIFY_REG(COMPx->CSR, COMP_CSR_HYST, InputHysteresis);
476 * @brief Get comparator instance hysteresis mode of the minus (inverting) input.
477 * @rmtoll CSR HYST LL_COMP_GetInputHysteresis
478 * @param COMPx Comparator instance
479 * @retval Returned value can be one of the following values:
480 * @arg @ref LL_COMP_HYSTERESIS_NONE
481 * @arg @ref LL_COMP_HYSTERESIS_10MV
482 * @arg @ref LL_COMP_HYSTERESIS_20MV
483 * @arg @ref LL_COMP_HYSTERESIS_30MV
484 * @arg @ref LL_COMP_HYSTERESIS_40MV
485 * @arg @ref LL_COMP_HYSTERESIS_50MV
486 * @arg @ref LL_COMP_HYSTERESIS_60MV
487 * @arg @ref LL_COMP_HYSTERESIS_70MV
489 __STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis(COMP_TypeDef *COMPx)
491 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_HYST));
495 * @}
498 /** @defgroup COMP_LL_EF_Configuration_comparator_output Configuration of comparator output
499 * @{
503 * @brief Set comparator instance output polarity.
504 * @rmtoll CSR POLARITY LL_COMP_SetOutputPolarity
505 * @param COMPx Comparator instance
506 * @param OutputPolarity This parameter can be one of the following values:
507 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
508 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
509 * @retval None
511 __STATIC_INLINE void LL_COMP_SetOutputPolarity(COMP_TypeDef *COMPx, uint32_t OutputPolarity)
513 MODIFY_REG(COMPx->CSR, COMP_CSR_POLARITY, OutputPolarity);
517 * @brief Get comparator instance output polarity.
518 * @rmtoll CSR POLARITY LL_COMP_GetOutputPolarity
519 * @param COMPx Comparator instance
520 * @retval Returned value can be one of the following values:
521 * @arg @ref LL_COMP_OUTPUTPOL_NONINVERTED
522 * @arg @ref LL_COMP_OUTPUTPOL_INVERTED
524 __STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity(COMP_TypeDef *COMPx)
526 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_POLARITY));
530 * @brief Set comparator instance blanking source.
531 * @note Blanking source may be specific to each comparator instance.
532 * Refer to description of parameters or to reference manual.
533 * @note Availability of parameters of blanking source from timer
534 * depends on timers availability on the selected device.
535 * @rmtoll CSR BLANKING LL_COMP_SetOutputBlankingSource
536 * @param COMPx Comparator instance
537 * @param BlankingSource This parameter can be one of the following values:
538 * @arg @ref LL_COMP_BLANKINGSRC_NONE
539 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1
540 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2
541 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP3
542 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP4
543 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP5
544 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP6
545 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP7
546 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1
547 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2
548 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP5
549 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3
550 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6
551 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1
552 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2
553 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP3
554 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP5
555 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP7
556 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4
557 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP1
558 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2
559 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP3
560 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4
561 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP5
562 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP6
563 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP7
564 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4
565 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6
566 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP7
567 * @arg @ref LL_COMP_BLANKINGSRC_TIM20_OC5
568 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC1
569 * @arg @ref LL_COMP_BLANKINGSRC_TIM4_OC3
571 * On STM32G4 series, blanking sources are linked to COMP instance (except
572 * those without COMPx suffix that are common to all instances)
573 * Note: For COMPx & TIMx instances availability, please refer to datasheet
574 * @retval None
576 __STATIC_INLINE void LL_COMP_SetOutputBlankingSource(COMP_TypeDef *COMPx, uint32_t BlankingSource)
578 MODIFY_REG(COMPx->CSR, COMP_CSR_BLANKING, BlankingSource);
582 * @brief Get comparator instance blanking source.
583 * @note Availability of parameters of blanking source from timer
584 * depends on timers availability on the selected device.
585 * @note Blanking source may be specific to each comparator instance.
586 * Refer to description of parameters or to reference manual.
587 * @rmtoll CSR BLANKING LL_COMP_GetOutputBlankingSource
588 * @param COMPx Comparator instance
589 * @retval Returned value can be one of the following values:
590 * @arg @ref LL_COMP_BLANKINGSRC_NONE
591 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1
592 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP2
593 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP3
594 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP4
595 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP5
596 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP6
597 * @arg @ref LL_COMP_BLANKINGSRC_TIM1_OC5_COMP7
598 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1
599 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP2
600 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC3_COMP5
601 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP3
602 * @arg @ref LL_COMP_BLANKINGSRC_TIM2_OC4_COMP6
603 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1
604 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP2
605 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP3
606 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP5
607 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC3_COMP7
608 * @arg @ref LL_COMP_BLANKINGSRC_TIM3_OC4_COMP4
609 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP1
610 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2
611 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP3
612 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP4
613 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP5
614 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP6
615 * @arg @ref LL_COMP_BLANKINGSRC_TIM8_OC5_COMP7
616 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC1_COMP4
617 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP6
618 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC2_COMP7
619 * @arg @ref LL_COMP_BLANKINGSRC_TIM20_OC5
620 * @arg @ref LL_COMP_BLANKINGSRC_TIM15_OC1
621 * @arg @ref LL_COMP_BLANKINGSRC_TIM4_OC3
623 * On STM32G4 series, blanking sources are linked to COMP instance (except
624 * those without COMPx suffix that are common to all instances)
625 * Note: For COMPx & TIMx instances availability, please refer to datasheet
627 __STATIC_INLINE uint32_t LL_COMP_GetOutputBlankingSource(COMP_TypeDef *COMPx)
629 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_BLANKING));
633 * @brief Configure comparator instance deglitcher mode.
634 * @rmtoll CSR DEGLITCHEN LL_COMP_SetDeglitcherMode
635 * @param COMPx Comparator instance
636 * @param DeglitcherMode This parameter can be one of the following values:
637 * @arg @ref LL_COMP_DEGLITCHER_DISABLED
638 * @arg @ref LL_COMP_DEGLITCHER_ENABLED
639 * @retval None
641 __STATIC_INLINE void LL_COMP_SetDeglitcherMode(COMP_TypeDef *COMPx, uint32_t DeglitcherMode)
643 MODIFY_REG(COMPx->CSR, COMP_CSR_DEGLITCHEN, DeglitcherMode);
647 * @brief Get comparator instance deglitcher mode.
648 * @rmtoll CSR DEGLITCHEN LL_COMP_GetDeglitcherMode
649 * @param COMPx Comparator instance
650 * @retval Returned value can be one of the following values:
651 * @arg @ref LL_COMP_DEGLITCHER_DISABLED
652 * @arg @ref LL_COMP_DEGLITCHER_ENABLED
654 __STATIC_INLINE uint32_t LL_COMP_GetDeglitcherMode(COMP_TypeDef *COMPx)
656 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_DEGLITCHEN));
659 * @}
662 /** @defgroup COMP_LL_EF_Operation Operation on comparator instance
663 * @{
667 * @brief Enable comparator instance.
668 * @note After enable from off state, comparator requires a delay
669 * to reach reach propagation delay specification.
670 * Refer to device datasheet, parameter "tSTART".
671 * @rmtoll CSR EN LL_COMP_Enable
672 * @param COMPx Comparator instance
673 * @retval None
675 __STATIC_INLINE void LL_COMP_Enable(COMP_TypeDef *COMPx)
677 SET_BIT(COMPx->CSR, COMP_CSR_EN);
681 * @brief Disable comparator instance.
682 * @rmtoll CSR EN LL_COMP_Disable
683 * @param COMPx Comparator instance
684 * @retval None
686 __STATIC_INLINE void LL_COMP_Disable(COMP_TypeDef *COMPx)
688 CLEAR_BIT(COMPx->CSR, COMP_CSR_EN);
692 * @brief Get comparator enable state
693 * (0: COMP is disabled, 1: COMP is enabled)
694 * @rmtoll CSR EN LL_COMP_IsEnabled
695 * @param COMPx Comparator instance
696 * @retval State of bit (1 or 0).
698 __STATIC_INLINE uint32_t LL_COMP_IsEnabled(COMP_TypeDef *COMPx)
700 return ((READ_BIT(COMPx->CSR, COMP_CSR_EN) == (COMP_CSR_EN)) ? 1UL : 0UL);
704 * @brief Lock comparator instance.
705 * @note Once locked, comparator configuration can be accessed in read-only.
706 * @note The only way to unlock the comparator is a device hardware reset.
707 * @rmtoll CSR LOCK LL_COMP_Lock
708 * @param COMPx Comparator instance
709 * @retval None
711 __STATIC_INLINE void LL_COMP_Lock(COMP_TypeDef *COMPx)
713 SET_BIT(COMPx->CSR, COMP_CSR_LOCK);
717 * @brief Get comparator lock state
718 * (0: COMP is unlocked, 1: COMP is locked).
719 * @note Once locked, comparator configuration can be accessed in read-only.
720 * @note The only way to unlock the comparator is a device hardware reset.
721 * @rmtoll CSR LOCK LL_COMP_IsLocked
722 * @param COMPx Comparator instance
723 * @retval State of bit (1 or 0).
725 __STATIC_INLINE uint32_t LL_COMP_IsLocked(COMP_TypeDef *COMPx)
727 return ((READ_BIT(COMPx->CSR, COMP_CSR_LOCK) == (COMP_CSR_LOCK)) ? 1UL : 0UL);
731 * @brief Read comparator instance output level.
732 * @note On this STM32 serie, comparator 'value' is taken before
733 * polarity and blanking are applied, thus:
734 * - Comparator output is low when the input plus
735 * is at a lower voltage than the input minus
736 * - Comparator output is high when the input plus
737 * is at a higher voltage than the input minus
738 * @rmtoll CSR VALUE LL_COMP_ReadOutputLevel
739 * @param COMPx Comparator instance
740 * @retval Returned value can be one of the following values:
741 * @arg @ref LL_COMP_OUTPUT_LEVEL_LOW
742 * @arg @ref LL_COMP_OUTPUT_LEVEL_HIGH
744 __STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel(COMP_TypeDef *COMPx)
746 return (uint32_t)(READ_BIT(COMPx->CSR, COMP_CSR_VALUE)
747 >> COMP_CSR_VALUE_Pos);
751 * @}
754 #if defined(USE_FULL_LL_DRIVER)
755 /** @defgroup COMP_LL_EF_Init Initialization and de-initialization functions
756 * @{
759 ErrorStatus LL_COMP_DeInit(COMP_TypeDef *COMPx);
760 ErrorStatus LL_COMP_Init(COMP_TypeDef *COMPx, LL_COMP_InitTypeDef *COMP_InitStruct);
761 void LL_COMP_StructInit(LL_COMP_InitTypeDef *COMP_InitStruct);
764 * @}
766 #endif /* USE_FULL_LL_DRIVER */
769 * @}
773 * @}
777 * @}
783 * @}
786 #ifdef __cplusplus
788 #endif
790 #endif /* STM32G4xx_LL_COMP_H */
792 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/