STM32L486xx HAL User Manual
|
Header file of COMP LL module. More...
#include "stm32l4xx.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 (0x00000000U) |
#define | LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) |
#define | LL_COMP_POWERMODE_HIGHSPEED (0x00000000U) |
#define | LL_COMP_POWERMODE_MEDIUMSPEED (COMP_CSR_PWRMODE_0) |
#define | LL_COMP_POWERMODE_ULTRALOWPOWER (COMP_CSR_PWRMODE_1 | COMP_CSR_PWRMODE_0) |
#define | LL_COMP_INPUT_PLUS_IO1 (0x00000000U) |
#define | LL_COMP_INPUT_PLUS_IO2 (COMP_CSR_INPSEL_0) |
#define | LL_COMP_INPUT_MINUS_1_4VREFINT ( COMP_CSR_SCALEN | COMP_CSR_BRGEN) |
#define | LL_COMP_INPUT_MINUS_1_2VREFINT ( COMP_CSR_INMSEL_0 | COMP_CSR_SCALEN | COMP_CSR_BRGEN) |
#define | LL_COMP_INPUT_MINUS_3_4VREFINT ( COMP_CSR_INMSEL_1 | COMP_CSR_SCALEN | COMP_CSR_BRGEN) |
#define | LL_COMP_INPUT_MINUS_VREFINT ( COMP_CSR_INMSEL_1 | COMP_CSR_INMSEL_0 | COMP_CSR_SCALEN ) |
#define | LL_COMP_INPUT_MINUS_DAC1_CH1 (COMP_CSR_INMSEL_2 ) |
#define | LL_COMP_INPUT_MINUS_DAC1_CH2 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_0) |
#define | LL_COMP_INPUT_MINUS_IO1 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_1 ) |
#define | LL_COMP_INPUT_MINUS_IO2 (COMP_CSR_INMSEL_2 | COMP_CSR_INMSEL_1 | COMP_CSR_INMSEL_0) |
#define | LL_COMP_WINDOWMODE_ENABLE LL_COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON |
#define | LL_COMP_INVERTINGINPUT_1_4VREFINT LL_COMP_INPUT_MINUS_1_4VREFINT |
#define | LL_COMP_INVERTINGINPUT_1_2VREFINT LL_COMP_INPUT_MINUS_1_2VREFINT |
#define | LL_COMP_INVERTINGINPUT_3_4VREFINT LL_COMP_INPUT_MINUS_3_4VREFINT |
#define | LL_COMP_INVERTINGINPUT_VREFINT LL_COMP_INPUT_MINUS_VREFINT |
#define | LL_COMP_INVERTINGINPUT_DAC1 LL_COMP_INPUT_MINUS_DAC1_CH1 |
#define | LL_COMP_INVERTINGINPUT_DAC2 LL_COMP_INPUT_MINUS_DAC1_CH2 |
#define | LL_COMP_INVERTINGINPUT_IO1 LL_COMP_INPUT_MINUS_IO1 |
#define | LL_COMP_INVERTINGINPUT_IO2 LL_COMP_INPUT_MINUS_IO2 |
#define | LL_COMP_NONINVERTINGINPUT_IO1 LL_COMP_INPUT_PLUS_IO1 |
#define | LL_COMP_NONINVERTINGINPUT_IO2 LL_COMP_INPUT_PLUS_IO2 |
#define | LL_COMP_HYSTERESIS_NONE (0x00000000U) |
#define | LL_COMP_HYSTERESIS_LOW ( COMP_CSR_HYST_0) |
#define | LL_COMP_HYSTERESIS_MEDIUM (COMP_CSR_HYST_1 ) |
#define | LL_COMP_HYSTERESIS_HIGH (COMP_CSR_HYST_1 | COMP_CSR_HYST_0) |
#define | LL_COMP_OUTPUTPOL_NONINVERTED (0x00000000U) |
#define | LL_COMP_OUTPUTPOL_INVERTED (COMP_CSR_POLARITY) |
#define | LL_COMP_BLANKINGSRC_NONE (0x00000000U) |
#define | LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1 (COMP_CSR_BLANKING_0) |
#define | LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1 (COMP_CSR_BLANKING_1) |
#define | LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1 (COMP_CSR_BLANKING_2) |
#define | LL_COMP_BLANKINGSRC_TIM3_OC4_COMP2 (COMP_CSR_BLANKING_0) |
#define | LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2 (COMP_CSR_BLANKING_1) |
#define | LL_COMP_BLANKINGSRC_TIM15_OC1_COMP2 (COMP_CSR_BLANKING_2) |
#define | LL_COMP_BLANKINGSRC_TIM1_OC5 (LL_COMP_BLANKINGSRC_TIM1_OC5_COMP1) |
#define | LL_COMP_BLANKINGSRC_TIM2_OC3 (LL_COMP_BLANKINGSRC_TIM2_OC3_COMP1) |
#define | LL_COMP_BLANKINGSRC_TIM3_OC3 (LL_COMP_BLANKINGSRC_TIM3_OC3_COMP1) |
#define | LL_COMP_BLANKINGSRC_TIM3_OC4 (LL_COMP_BLANKINGSRC_TIM3_OC4_COMP2) |
#define | LL_COMP_BLANKINGSRC_TIM8_OC5 (LL_COMP_BLANKINGSRC_TIM8_OC5_COMP2) |
#define | LL_COMP_BLANKINGSRC_TIM15_OC1 (LL_COMP_BLANKINGSRC_TIM15_OC1_COMP2) |
#define | LL_COMP_OUTPUT_LEVEL_LOW (0x00000000U) |
#define | LL_COMP_OUTPUT_LEVEL_HIGH (0x00000001U) |
#define | LL_COMP_DELAY_STARTUP_US ( 80U) |
#define | LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US ( 200U) |
#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_SetInputNonInverting (COMP_TypeDef *COMPx, uint32_t InputNonInverting) |
__STATIC_INLINE uint32_t | LL_COMP_GetInputNonInverting (COMP_TypeDef *COMPx) |
__STATIC_INLINE void | LL_COMP_SetInputInverting (COMP_TypeDef *COMPx, uint32_t InputInverting) |
__STATIC_INLINE uint32_t | LL_COMP_GetInputInverting (COMP_TypeDef *COMPx) |
__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. |
Header file of COMP LL module.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file stm32l4xx_ll_comp.h.