]> git.donarmstrong.com Git - qmk_firmware.git/blob - tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/stm32f0xx_hal_comp.h
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[qmk_firmware.git] / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32F0 / stm32f0xx_hal_comp.h
1 /**
2   ******************************************************************************
3   * @file    stm32f0xx_hal_comp.h
4   * @author  MCD Application Team
5   * @version V1.2.0
6   * @date    11-December-2014
7   * @brief   Header file of COMP HAL module.
8   ******************************************************************************
9   * @attention
10   *
11   * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
12   *
13   * Redistribution and use in source and binary forms, with or without modification,
14   * are permitted provided that the following conditions are met:
15   *   1. Redistributions of source code must retain the above copyright notice,
16   *      this list of conditions and the following disclaimer.
17   *   2. Redistributions in binary form must reproduce the above copyright notice,
18   *      this list of conditions and the following disclaimer in the documentation
19   *      and/or other materials provided with the distribution.
20   *   3. Neither the name of STMicroelectronics nor the names of its contributors
21   *      may be used to endorse or promote products derived from this software
22   *      without specific prior written permission.
23   *
24   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34   *
35   ******************************************************************************  
36   */
37
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef __STM32F0xx_HAL_COMP_H
40 #define __STM32F0xx_HAL_COMP_H
41
42 #ifdef __cplusplus
43  extern "C" {
44 #endif
45
46 #if defined(STM32F051x8) || defined(STM32F058xx) || \
47     defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
48     defined(STM32F091xC) || defined(STM32F098xx)
49
50 /* Includes ------------------------------------------------------------------*/
51 #include "stm32f0xx_hal_def.h"
52
53 /** @addtogroup STM32F0xx_HAL_Driver
54   * @{
55   */
56
57 /** @addtogroup COMP COMP HAL Module Driver
58   * @{
59   */ 
60
61 /* Exported types ------------------------------------------------------------*/ 
62 /** @defgroup COMP_Exported_Types COMP Exported Types
63   * @{
64   */
65     
66 /** 
67   * @brief  COMP Init structure definition  
68   */ 
69 typedef struct
70 {
71
72   uint32_t InvertingInput;     /*!< Selects the inverting input of the comparator.
73                                     This parameter can be a value of @ref COMP_InvertingInput */
74
75   uint32_t NonInvertingInput;  /*!< Selects the non inverting input of the comparator.
76                                     This parameter can be a value of @ref COMP_NonInvertingInput */
77
78   uint32_t Output;             /*!< Selects the output redirection of the comparator.
79                                     This parameter can be a value of @ref COMP_Output */
80
81   uint32_t OutputPol;          /*!< Selects the output polarity of the comparator.
82                                     This parameter can be a value of @ref COMP_OutputPolarity */
83
84   uint32_t Hysteresis;         /*!< Selects the hysteresis voltage of the comparator.
85                                     This parameter can be a value of @ref COMP_Hysteresis */
86
87   uint32_t Mode;               /*!< Selects the operating comsumption mode of the comparator
88                                     to adjust the speed/consumption.
89                                     This parameter can be a value of @ref COMP_Mode */
90
91   uint32_t WindowMode;         /*!< Selects the window mode of the comparator 1 & 2.
92                                     This parameter can be a value of @ref COMP_WindowMode */
93   
94   uint32_t TriggerMode;        /*!< Selects the trigger mode of the comparator (interrupt mode).
95                                     This parameter can be a value of @ref COMP_TriggerMode */
96
97 }COMP_InitTypeDef;
98
99 /** 
100   * @brief  COMP Handle Structure definition  
101   */ 
102 typedef struct
103 {
104   COMP_TypeDef                *Instance; /*!< Register base address    */
105   COMP_InitTypeDef            Init;      /*!< COMP required parameters */
106   HAL_LockTypeDef             Lock;      /*!< Locking object           */
107   __IO uint32_t               State;     /*!< COMP communication state 
108                                               This parameter can be a value of @ref COMP_State  */
109 }COMP_HandleTypeDef;
110
111 /**
112   * @}
113   */
114   
115 /* Exported constants --------------------------------------------------------*/
116 /** @defgroup COMP_Exported_Constants COMP Exported Constants
117   * @{
118   */
119
120 /** @defgroup COMP_State COMP State
121   * @{
122   */
123 #define HAL_COMP_STATE_RESET             ((uint32_t)0x00000000)    /*!< COMP not yet initialized or disabled             */
124 #define HAL_COMP_STATE_READY             ((uint32_t)0x00000001)    /*!< COMP initialized and ready for use               */
125 #define HAL_COMP_STATE_READY_LOCKED      ((uint32_t)0x00000011)    /*!< COMP initialized but the configuration is locked */
126 #define HAL_COMP_STATE_BUSY              ((uint32_t)0x00000002)    /*!< COMP is running                                  */
127 #define HAL_COMP_STATE_BUSY_LOCKED       ((uint32_t)0x00000012)    /*!< COMP is running and the configuration is locked  */
128 /**
129   * @}
130   */
131
132 /** @defgroup COMP_OutputPolarity COMP OutputPolarity
133   * @{
134   */
135 #define COMP_OUTPUTPOL_NONINVERTED             ((uint32_t)0x00000000)  /*!< COMP output on GPIO isn't inverted */
136 #define COMP_OUTPUTPOL_INVERTED                COMP_CSR_COMP1POL       /*!< COMP output on GPIO is inverted  */
137
138 #define IS_COMP_OUTPUTPOL(POL)  (((POL) == COMP_OUTPUTPOL_NONINVERTED)  || \
139                                  ((POL) == COMP_OUTPUTPOL_INVERTED))
140 /**
141   * @}
142   */ 
143
144 /** @defgroup COMP_Hysteresis COMP Hysteresis
145   * @{
146   */
147 #define COMP_HYSTERESIS_NONE                   ((uint32_t)0x00000000)  /*!< No hysteresis */
148 #define COMP_HYSTERESIS_LOW                    COMP_CSR_COMP1HYST_0    /*!< Hysteresis level low */
149 #define COMP_HYSTERESIS_MEDIUM                 COMP_CSR_COMP1HYST_1    /*!< Hysteresis level medium */
150 #define COMP_HYSTERESIS_HIGH                   COMP_CSR_COMP1HYST      /*!< Hysteresis level high */
151
152 #define IS_COMP_HYSTERESIS(HYSTERESIS)    (((HYSTERESIS) == COMP_HYSTERESIS_NONE)   || \
153                                            ((HYSTERESIS) == COMP_HYSTERESIS_LOW)    || \
154                                            ((HYSTERESIS) == COMP_HYSTERESIS_MEDIUM) || \
155                                            ((HYSTERESIS) == COMP_HYSTERESIS_HIGH))
156 /**
157   * @}
158   */
159
160 /** @defgroup COMP_Mode COMP Mode
161   * @{
162   */
163 /* Please refer to the electrical characteristics in the device datasheet for
164    the power consumption values */
165 #define COMP_MODE_HIGHSPEED                    ((uint32_t)0x00000000) /*!< High Speed */
166 #define COMP_MODE_MEDIUMSPEED                  COMP_CSR_COMP1MODE_0   /*!< Medium Speed */
167 #define COMP_MODE_LOWPOWER                     COMP_CSR_COMP1MODE_1   /*!< Low power mode */
168 #define COMP_MODE_ULTRALOWPOWER                COMP_CSR_COMP1MODE     /*!< Ultra-low power mode */
169
170 #define IS_COMP_MODE(MODE)  (((MODE) == COMP_MODE_HIGHSPEED)     || \
171                              ((MODE) == COMP_MODE_MEDIUMSPEED)   || \
172                              ((MODE) == COMP_MODE_LOWPOWER)      || \
173                              ((MODE) == COMP_MODE_ULTRALOWPOWER))
174
175 /**
176   * @}
177   */
178
179 /** @defgroup COMP_InvertingInput COMP InvertingInput
180   * @{
181   */
182
183 #define COMP_INVERTINGINPUT_1_4VREFINT         ((uint32_t)0x00000000) /*!< 1/4 VREFINT connected to comparator inverting input */
184 #define COMP_INVERTINGINPUT_1_2VREFINT         COMP_CSR_COMP1INSEL_0                         /*!< 1/2 VREFINT connected to comparator inverting input    */
185 #define COMP_INVERTINGINPUT_3_4VREFINT         COMP_CSR_COMP1INSEL_1                         /*!< 3/4 VREFINT connected to comparator inverting input    */
186 #define COMP_INVERTINGINPUT_VREFINT            (COMP_CSR_COMP1INSEL_1|COMP_CSR_COMP1INSEL_0) /*!< VREFINT connected to comparator inverting input        */
187 #define COMP_INVERTINGINPUT_DAC1               COMP_CSR_COMP1INSEL_2                         /*!< DAC_OUT1 (PA4) connected to comparator inverting input */
188 #define COMP_INVERTINGINPUT_DAC1SWITCHCLOSED   (COMP_CSR_COMP1INSEL_2|COMP_CSR_COMP1SW1)     /*!< DAC_OUT1 (PA4) connected to comparator inverting input 
189                                                                                                   and close switch (PA0 for COMP1 only) */
190 #define COMP_INVERTINGINPUT_DAC2               (COMP_CSR_COMP1INSEL_2|COMP_CSR_COMP1INSEL_0) /*!< DAC_OUT2 (PA5) connected to comparator inverting input */
191 #define COMP_INVERTINGINPUT_IO1                (COMP_CSR_COMP1INSEL_2|COMP_CSR_COMP1INSEL_1) /*!< IO (PA0 for COMP1 and PA2 for COMP2) connected to comparator inverting input */
192
193 #define IS_COMP_INVERTINGINPUT(INPUT) (((INPUT) == COMP_INVERTINGINPUT_1_4VREFINT)       || \
194                                        ((INPUT) == COMP_INVERTINGINPUT_1_2VREFINT)       || \
195                                        ((INPUT) == COMP_INVERTINGINPUT_3_4VREFINT)       || \
196                                        ((INPUT) == COMP_INVERTINGINPUT_VREFINT)          || \
197                                        ((INPUT) == COMP_INVERTINGINPUT_DAC1)             || \
198                                        ((INPUT) == COMP_INVERTINGINPUT_DAC1SWITCHCLOSED) || \
199                                        ((INPUT) == COMP_INVERTINGINPUT_DAC2)             || \
200                                        ((INPUT) == COMP_INVERTINGINPUT_IO1))
201 /**
202   * @}
203   */ 
204
205 /** @defgroup COMP_NonInvertingInput COMP NonInvertingInput
206   * @{
207   */
208 #define COMP_NONINVERTINGINPUT_IO1               ((uint32_t)0x00000000) /*!< I/O1 (PA1 for COMP1, PA3 for COMP2) 
209                                                                              connected to comparator non inverting input */
210 #define COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED  COMP_CSR_COMP1SW1  /*!< DAC ouput connected to comparator COMP1 non inverting input */
211
212 #define IS_COMP_NONINVERTINGINPUT(INPUT) (((INPUT) == COMP_NONINVERTINGINPUT_IO1) || \
213                                           ((INPUT) == COMP_NONINVERTINGINPUT_DAC1SWITCHCLOSED))
214 /**
215   * @}
216   */
217
218 /** @defgroup COMP_Output COMP Output
219   * @{
220   */
221
222 /* Output Redirection common for COMP1 and COMP2 */
223 #define COMP_OUTPUT_NONE                       ((uint32_t)0x00000000)                          /*!< COMP output isn't connected to other peripherals */
224 #define COMP_OUTPUT_TIM1BKIN                   COMP_CSR_COMP1OUTSEL_0                          /*!< COMP output connected to TIM1 Break Input (BKIN) */
225 #define COMP_OUTPUT_TIM1IC1                    COMP_CSR_COMP1OUTSEL_1                          /*!< COMP output connected to TIM1 Input Capture 1 */
226 #define COMP_OUTPUT_TIM1OCREFCLR               (COMP_CSR_COMP1OUTSEL_1|COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM1 OCREF Clear */
227 #define COMP_OUTPUT_TIM2IC4                    COMP_CSR_COMP1OUTSEL_2                          /*!< COMP output connected to TIM2 Input Capture 4 */
228 #define COMP_OUTPUT_TIM2OCREFCLR               (COMP_CSR_COMP1OUTSEL_2|COMP_CSR_COMP1OUTSEL_0) /*!< COMP output connected to TIM2 OCREF Clear */
229 #define COMP_OUTPUT_TIM3IC1                    (COMP_CSR_COMP1OUTSEL_2|COMP_CSR_COMP1OUTSEL_1) /*!< COMP output connected to TIM3 Input Capture 1 */
230 #define COMP_OUTPUT_TIM3OCREFCLR               COMP_CSR_COMP1OUTSEL                            /*!< COMP output connected to TIM3 OCREF Clear */
231
232 #define IS_COMP_OUTPUT(OUTPUT) (((OUTPUT) == COMP_OUTPUT_NONE)                || \
233                                 ((OUTPUT) == COMP_OUTPUT_TIM1BKIN)            || \
234                                 ((OUTPUT) == COMP_OUTPUT_TIM1IC1)             || \
235                                 ((OUTPUT) == COMP_OUTPUT_TIM1OCREFCLR)        || \
236                                 ((OUTPUT) == COMP_OUTPUT_TIM2IC4)             || \
237                                 ((OUTPUT) == COMP_OUTPUT_TIM2OCREFCLR)        || \
238                                 ((OUTPUT) == COMP_OUTPUT_TIM3IC1)             || \
239                                 ((OUTPUT) == COMP_OUTPUT_TIM3OCREFCLR))
240
241 /**
242   * @}
243   */ 
244
245 /** @defgroup COMP_OutputLevel COMP OutputLevel
246   * @{
247   */ 
248 /* When output polarity is not inverted, comparator output is low when
249    the non-inverting input is at a lower voltage than the inverting input*/
250 #define COMP_OUTPUTLEVEL_LOW                   ((uint32_t)0x00000000)
251 /* When output polarity is not inverted, comparator output is high when
252    the non-inverting input is at a higher voltage than the inverting input */
253 #define COMP_OUTPUTLEVEL_HIGH                  COMP_CSR_COMP1OUT
254 /**
255   * @}
256   */ 
257
258 /** @defgroup COMP_TriggerMode COMP TriggerMode
259   * @{
260   */
261 #define COMP_TRIGGERMODE_NONE                  ((uint32_t)0x00000000)  /*!< No External Interrupt trigger detection */
262 #define COMP_TRIGGERMODE_IT_RISING             ((uint32_t)0x00000001)  /*!< External Interrupt Mode with Rising edge trigger detection */
263 #define COMP_TRIGGERMODE_IT_FALLING            ((uint32_t)0x00000002)  /*!< External Interrupt Mode with Falling edge trigger detection */
264 #define COMP_TRIGGERMODE_IT_RISING_FALLING     ((uint32_t)0x00000003)  /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
265
266 #define IS_COMP_TRIGGERMODE(MODE)  (((MODE) == COMP_TRIGGERMODE_NONE)       || \
267                                     ((MODE) == COMP_TRIGGERMODE_IT_RISING)  || \
268                                     ((MODE) == COMP_TRIGGERMODE_IT_FALLING) || \
269                                     ((MODE) == COMP_TRIGGERMODE_IT_RISING_FALLING))
270 /**
271   * @}
272   */ 
273
274 /** @defgroup COMP_WindowMode COMP WindowMode
275   * @{
276   */
277 #define COMP_WINDOWMODE_DISABLED               ((uint32_t)0x00000000)  /*!< Window mode disabled */
278 #define COMP_WINDOWMODE_ENABLED                COMP_CSR_WNDWEN         /*!< Window mode enabled: non inverting input of comparator 2
279                                                                             is connected to the non inverting input of comparator 1 (PA1) */
280
281 #define IS_COMP_WINDOWMODE(WINDOWMODE) (((WINDOWMODE) == COMP_WINDOWMODE_DISABLED) || \
282                                         ((WINDOWMODE) == COMP_WINDOWMODE_ENABLED))
283 /**
284   * @}
285   */
286
287 /** @defgroup COMP_ExtiLineEvent COMP ExtiLineEvent
288   *        Elements values convention: XXXX0000
289   *           - XXXX : Interrupt mask in the EMR/IMR/RTSR/FTSR register
290   * @{   
291   */  
292 #define COMP_EXTI_LINE_COMP1_EVENT             ((uint32_t)0x00200000)  /*!< External interrupt line 21 Connected to COMP1 */
293 #define COMP_EXTI_LINE_COMP2_EVENT             ((uint32_t)0x00400000)  /*!< External interrupt line 22 Connected to COMP2 */
294
295 /**
296   * @}
297   */
298
299 /** @defgroup COMP_Lock COMP Lock
300   * @{   
301   */  
302 #define COMP_LOCK_DISABLE                      ((uint32_t)0x00000000)
303 #define COMP_LOCK_ENABLE                       COMP_CSR_COMP1LOCK
304
305 #define COMP_STATE_BIT_LOCK                    ((uint32_t)0x10)
306 /**
307   * @}
308   */ 
309
310
311 /**
312   * @}
313   */ 
314   
315 /* Exported macros -----------------------------------------------------------*/
316 /** @defgroup COMP_Exported_Macros COMP Exported Macros
317   * @{
318   */
319
320 /** @brief  Reset COMP handle state
321   * @param  __HANDLE__: COMP handle.
322   * @retval None
323   */
324 #define __HAL_COMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_COMP_STATE_RESET)
325
326 /**
327   * @brief  Checks whether the specified EXTI line flag is set or not.
328   * @param  __FLAG__: specifies the COMP Exti sources to be checked.
329   *          This parameter can be a value of @ref COMP_ExtiLineEvent
330   * @retval The state of __FLAG__ (SET or RESET).
331   */
332 #define __HAL_COMP_EXTI_GET_FLAG(__FLAG__)  (EXTI->PR & (__FLAG__))
333      
334 /**
335   * @brief Clear the COMP Exti flags.
336   * @param  __FLAG__: specifies the COMP Exti sources to be cleared.
337   *          This parameter can be a value of @ref COMP_ExtiLineEvent
338   * @retval None.
339   */
340 #define __HAL_COMP_EXTI_CLEAR_FLAG(__FLAG__)   (EXTI->PR = (__FLAG__))
341
342 /**
343   * @brief  Enable the COMP Exti Line.
344   * @param  __EXTILINE__: specifies the COMP Exti sources to be enabled.
345   *         This parameter can be a value of @ref COMP_ExtiLineEvent 
346   * @retval None.
347   */                                         
348 #define __HAL_COMP_EXTI_ENABLE_IT(__EXTILINE__)   (EXTI->IMR |= (__EXTILINE__))
349                                              
350 /**
351   * @brief  Disable the COMP Exti Line.
352   * @param  __EXTILINE__: specifies the COMP Exti sources to be disabled.
353   *         This parameter can be a value of @ref COMP_ExtiLineEvent 
354   * @retval None.
355   */
356 #define __HAL_COMP_EXTI_DISABLE_IT(__EXTILINE__)  (EXTI->IMR &= ~(__EXTILINE__))
357
358 /**
359   * @brief  Enable the Exti Line rising edge trigger.
360   * @param  __EXTILINE__: specifies the COMP Exti sources to be enabled.
361   *         This parameter can be a value of @ref COMP_ExtiLineEvent 
362   * @retval None.
363   */                                         
364 #define __HAL_COMP_EXTI_RISING_IT_ENABLE(__EXTILINE__) (EXTI->RTSR |= (__EXTILINE__))
365
366 /**
367   * @brief  Disable the Exti Line rising edge trigger.
368   * @param  __EXTILINE__: specifies the COMP Exti sources to be disabled.
369   *         This parameter can be a value of @ref COMP_ExtiLineEvent 
370   * @retval None.
371   */                                         
372 #define __HAL_COMP_EXTI_RISING_IT_DISABLE(__EXTILINE__) (EXTI->RTSR &= ~(__EXTILINE__))
373
374 /**
375   * @brief  Enable the Exti Line falling edge trigger.
376   * @param  __EXTILINE__: specifies the COMP Exti sources to be enabled.
377   *         This parameter can be a value of @ref COMP_ExtiLineEvent 
378   * @retval None.
379   */                                         
380 #define __HAL_COMP_EXTI_FALLING_IT_ENABLE(__EXTILINE__) (EXTI->FTSR |= (__EXTILINE__))
381
382 /**
383   * @brief  Disable the Exti Line falling edge trigger.
384   * @param  __EXTILINE__: specifies the COMP Exti sources to be disabled.
385   *         This parameter can be a value of @ref COMP_ExtiLineEvent 
386   * @retval None.
387   */                                         
388 #define __HAL_COMP_EXTI_FALLING_IT_DISABLE(__EXTILINE__) (EXTI->FTSR &= ~(__EXTILINE__))
389
390 /**
391   * @brief  Get the specified EXTI line for a comparator instance
392   * @param  __INSTANCE__: specifies the COMP instance.
393   * @retval value of @ref COMP_ExtiLineEvent
394   */
395 #define __HAL_COMP_GET_EXTI_LINE(__INSTANCE__) (((__INSTANCE__) == COMP1) ? COMP_EXTI_LINE_COMP1_EVENT : \
396                                                 COMP_EXTI_LINE_COMP2_EVENT)
397 /**
398   * @}
399   */ 
400
401 /* Exported functions --------------------------------------------------------*/
402 /** @addtogroup COMP_Exported_Functions COMP Exported Functions
403   * @{
404   */
405 /** @addtogroup COMP_Exported_Functions_Group1 Initialization/de-initialization functions 
406  *  @brief    Initialization and Configuration functions 
407  * @{
408  */ 
409 /* Initialization and de-initialization functions  ****************************/
410 HAL_StatusTypeDef     HAL_COMP_Init(COMP_HandleTypeDef *hcomp);
411 HAL_StatusTypeDef     HAL_COMP_DeInit (COMP_HandleTypeDef *hcomp);
412 void                  HAL_COMP_MspInit(COMP_HandleTypeDef *hcomp);
413 void                  HAL_COMP_MspDeInit(COMP_HandleTypeDef *hcomp);
414 /**
415   * @}
416   */
417
418 /** @addtogroup COMP_Exported_Functions_Group2 I/O operation functions 
419  *  @brief   Data transfers functions 
420  * @{
421  */   
422 /* IO operation functions *****************************************************/
423 HAL_StatusTypeDef     HAL_COMP_Start(COMP_HandleTypeDef *hcomp);
424 HAL_StatusTypeDef     HAL_COMP_Stop(COMP_HandleTypeDef *hcomp);
425 HAL_StatusTypeDef     HAL_COMP_Start_IT(COMP_HandleTypeDef *hcomp);
426 HAL_StatusTypeDef     HAL_COMP_Stop_IT(COMP_HandleTypeDef *hcomp);
427 void                  HAL_COMP_IRQHandler(COMP_HandleTypeDef *hcomp);
428 /**
429   * @}
430   */
431
432 /** @addtogroup COMP_Exported_Functions_Group3 Peripheral Control functions 
433  *  @brief   management functions
434  * @{
435  */   
436 /* Peripheral Control functions ***********************************************/
437 HAL_StatusTypeDef     HAL_COMP_Lock(COMP_HandleTypeDef *hcomp);
438 uint32_t              HAL_COMP_GetOutputLevel(COMP_HandleTypeDef *hcomp);
439
440 /* Callback in Interrupt mode */
441 void                  HAL_COMP_TriggerCallback(COMP_HandleTypeDef *hcomp);
442 /**
443   * @}
444   */
445
446 /** @addtogroup COMP_Exported_Functions_Group4 Peripheral State functions 
447  *  @brief   Peripheral State functions
448  * @{
449  */   
450 /* Peripheral State and Error functions ***************************************/
451 uint32_t HAL_COMP_GetState(COMP_HandleTypeDef *hcomp);
452 /**
453   * @}
454   */ 
455   
456 /**
457   * @}
458   */ 
459
460 /**
461   * @}
462   */ 
463
464 /**
465   * @}
466   */ 
467   
468 #endif /* STM32F051x8 || STM32F058xx || */
469        /* STM32F071xB || STM32F072xB || STM32F078xx || */
470        /* STM32F091xC || STM32F098xx */
471
472 #ifdef __cplusplus
473 }
474 #endif
475
476 #endif /* __STM32F0xx_HAL_COMP_H */
477
478 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
479