STM32H735xx HAL User Manual
Data Structures | Defines | Functions
stm32h7xx_ll_comp.h File Reference

Header file of COMP LL module. More...

#include "stm32h7xx.h"

Go to the source code of this file.

Data Structures

struct  LL_COMP_InitTypeDef
 Structure definition of some features of COMP instance. More...

Defines

#define LL_COMP_OUTPUT_LEVEL_BITOFFSET_POS   (30U) /* Value equivalent to POSITION_VAL(COMP_CSR_VALUE) */
#define LL_COMP_WINDOWMODE_DISABLE   (0x00000000UL)
#define LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON   (COMP_CFGRx_WINMODE)
#define LL_COMP_POWERMODE_HIGHSPEED   (0x00000000UL)
#define LL_COMP_POWERMODE_MEDIUMSPEED   (COMP_CFGRx_PWRMODE_0)
#define LL_COMP_POWERMODE_ULTRALOWPOWER   (COMP_CFGRx_PWRMODE_1 | COMP_CFGRx_PWRMODE_0)
#define LL_COMP_INPUT_PLUS_IO1   (0x00000000UL)
#define LL_COMP_INPUT_PLUS_IO2   (COMP_CFGRx_INPSEL)
#define LL_COMP_INPUT_MINUS_1_4VREFINT   ( COMP_CFGRx_SCALEN | COMP_CFGRx_BRGEN)
#define LL_COMP_INPUT_MINUS_1_2VREFINT   ( COMP_CFGRx_INMSEL_0 | COMP_CFGRx_SCALEN | COMP_CFGRx_BRGEN)
#define LL_COMP_INPUT_MINUS_3_4VREFINT   ( COMP_CFGRx_INMSEL_1 | COMP_CFGRx_SCALEN | COMP_CFGRx_BRGEN)
#define LL_COMP_INPUT_MINUS_VREFINT   ( COMP_CFGRx_INMSEL_1 | COMP_CFGRx_INMSEL_0 | COMP_CFGRx_SCALEN )
#define LL_COMP_INPUT_MINUS_DAC1_CH1   ( COMP_CFGRx_INMSEL_2 )
#define LL_COMP_INPUT_MINUS_DAC1_CH2   ( COMP_CFGRx_INMSEL_2 | COMP_CFGRx_INMSEL_0 )
#define LL_COMP_INPUT_MINUS_IO1   ( COMP_CFGRx_INMSEL_2 | COMP_CFGRx_INMSEL_1 )
#define LL_COMP_INPUT_MINUS_IO2   ( COMP_CFGRx_INMSEL_2 | COMP_CFGRx_INMSEL_1 | COMP_CFGRx_INMSEL_0 )
#define LL_COMP_HYSTERESIS_NONE   (0x00000000UL)
#define LL_COMP_HYSTERESIS_LOW   ( COMP_CFGRx_HYST_0)
#define LL_COMP_HYSTERESIS_MEDIUM   (COMP_CFGRx_HYST_1 )
#define LL_COMP_HYSTERESIS_HIGH   (COMP_CFGRx_HYST_1 | COMP_CFGRx_HYST_0)
#define LL_COMP_OUTPUTPOL_NONINVERTED   (0x00000000UL)
#define LL_COMP_OUTPUTPOL_INVERTED   (COMP_CFGRx_POLARITY)
#define LL_COMP_BLANKINGSRC_NONE   (0x00000000UL)
#define LL_COMP_BLANKINGSRC_TIM1_OC5   (COMP_CFGRx_BLANKING_0)
#define LL_COMP_BLANKINGSRC_TIM2_OC3   (COMP_CFGRx_BLANKING_1)
#define LL_COMP_BLANKINGSRC_TIM3_OC3   (COMP_CFGRx_BLANKING_0 |COMP_CFGRx_BLANKING_1)
#define LL_COMP_BLANKINGSRC_TIM3_OC4   (COMP_CFGRx_BLANKING_2)
#define LL_COMP_BLANKINGSRC_TIM8_OC5   (COMP_CFGRx_BLANKING_2|COMP_CFGRx_BLANKING_0)
#define LL_COMP_BLANKINGSRC_TIM15_OC1   (COMP_CFGRx_BLANKING_2|COMP_CFGRx_BLANKING_1)
#define LL_COMP_OUTPUT_LEVEL_LOW   (0x00000000UL)
#define LL_COMP_OUTPUT_LEVEL_HIGH   (0x00000001UL)
#define LL_COMP_AF_PA6   COMP_OR_AFOPA6
#define LL_COMP_AF_PA8   COMP_OR_AFOPA8
#define LL_COMP_AF_PB12   COMP_OR_AFOPB12
#define LL_COMP_AF_PE6   COMP_OR_AFOPE6
#define LL_COMP_AF_PE15   COMP_OR_AFOPE15
#define LL_COMP_AF_PG2   COMP_OR_AFOPG2
#define LL_COMP_AF_PG3   COMP_OR_AFOPG3
#define LL_COMP_AF_PG4   COMP_OR_AFOPG4
#define LL_COMP_AF_PI1   COMP_OR_AFOPI1
#define LL_COMP_AF_PI4   COMP_OR_AFOPI4
#define LL_COMP_AF_PK2   COMP_OR_AFOPK2
#define LL_COMP_DELAY_STARTUP_US   ( 80UL)
#define LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US   ( 200UL)
#define LL_COMP_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
 Write a value in COMP register.
#define LL_COMP_ReadReg(__INSTANCE__, __REG__)   READ_REG(__INSTANCE__->__REG__)
 Read a value in COMP register.
#define __LL_COMP_COMMON_INSTANCE(__COMPx__)   (COMP12_COMMON)
 Helper macro to select the COMP common instance to which is belonging the selected COMP instance.

Functions

__STATIC_INLINE void LL_COMP_SetCommonWindowMode (COMP_Common_TypeDef *COMPxy_COMMON, uint32_t WindowMode)
 Set window mode of a pair of comparators instances (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
__STATIC_INLINE uint32_t LL_COMP_GetCommonWindowMode (COMP_Common_TypeDef *COMPxy_COMMON)
 Get window mode of a pair of comparators instances (2 consecutive COMP instances odd and even COMP<x> and COMP<x+1>).
__STATIC_INLINE void LL_COMP_SetPowerMode (COMP_TypeDef *COMPx, uint32_t PowerMode)
 Set comparator instance operating mode to adjust power and speed.
__STATIC_INLINE uint32_t LL_COMP_GetPowerMode (COMP_TypeDef *COMPx)
 Get comparator instance operating mode to adjust power and speed.
__STATIC_INLINE void LL_COMP_ConfigInputs (COMP_TypeDef *COMPx, uint32_t InputMinus, uint32_t InputPlus)
 Set comparator inputs minus (inverting) and plus (non-inverting).
__STATIC_INLINE void LL_COMP_SetInputPlus (COMP_TypeDef *COMPx, uint32_t InputPlus)
 Set comparator input plus (non-inverting).
__STATIC_INLINE uint32_t LL_COMP_GetInputPlus (COMP_TypeDef *COMPx)
 Get comparator input plus (non-inverting).
__STATIC_INLINE void LL_COMP_SetInputMinus (COMP_TypeDef *COMPx, uint32_t InputMinus)
 Set comparator input minus (inverting).
__STATIC_INLINE uint32_t LL_COMP_GetInputMinus (COMP_TypeDef *COMPx)
 Get comparator input minus (inverting).
__STATIC_INLINE void LL_COMP_SetInputHysteresis (COMP_TypeDef *COMPx, uint32_t InputHysteresis)
 Set comparator instance hysteresis mode of the input minus (inverting input).
__STATIC_INLINE uint32_t LL_COMP_GetInputHysteresis (COMP_TypeDef *COMPx)
 Get comparator instance hysteresis mode of the minus (inverting) input.
__STATIC_INLINE void LL_COMP_SetOutputPolarity (COMP_TypeDef *COMPx, uint32_t OutputPolarity)
 Set comparator instance output polarity.
__STATIC_INLINE uint32_t LL_COMP_GetOutputPolarity (COMP_TypeDef *COMPx)
 Get comparator instance output polarity.
__STATIC_INLINE void LL_COMP_SetOutputBlankingSource (COMP_TypeDef *COMPx, uint32_t BlankingSource)
 Set comparator instance blanking source.
__STATIC_INLINE uint32_t LL_COMP_GetOutputBlankingSource (COMP_TypeDef *COMPx)
 Get comparator instance blanking source.
__STATIC_INLINE void LL_COMP_SetOutputAlternateFunction (COMP_TypeDef *COMPx, uint32_t CompAFx)
 Set the output alternate function in the Option register in order to be used with the alternate function of the timer break input.
__STATIC_INLINE uint32_t LL_COMP_GetOutputAlternateFunction (COMP_TypeDef *COMPx)
 Get the output alternate function from the Option register.
__STATIC_INLINE void LL_COMP_Enable (COMP_TypeDef *COMPx)
 Enable comparator instance.
__STATIC_INLINE void LL_COMP_Disable (COMP_TypeDef *COMPx)
 Disable comparator instance.
__STATIC_INLINE uint32_t LL_COMP_IsEnabled (COMP_TypeDef *COMPx)
 Get comparator enable state (0: COMP is disabled, 1: COMP is enabled)
__STATIC_INLINE void LL_COMP_Lock (COMP_TypeDef *COMPx)
 Lock comparator instance.
__STATIC_INLINE uint32_t LL_COMP_IsLocked (COMP_TypeDef *COMPx)
 Get comparator lock state (0: COMP is unlocked, 1: COMP is locked).
__STATIC_INLINE uint32_t LL_COMP_ReadOutputLevel (COMP_TypeDef *COMPx)
 Read comparator instance output level.
ErrorStatus LL_COMP_DeInit (COMP_TypeDef *COMPx)
 De-initialize registers of the selected COMP instance to their default reset values.
ErrorStatus LL_COMP_Init (COMP_TypeDef *COMPx, LL_COMP_InitTypeDef *COMP_InitStruct)
 Initialize some features of COMP instance.
void LL_COMP_StructInit (LL_COMP_InitTypeDef *COMP_InitStruct)
 Set each LL_COMP_InitTypeDef field to default value.

Detailed Description

Header file of COMP LL module.

Author:
MCD Application Team
Attention:

Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file stm32h7xx_ll_comp.h.