STM32L486xx HAL User Manual
Data Structures | Defines | Functions
stm32l4xx_ll_opamp.h File Reference

Header file of OPAMP LL module. More...

#include "stm32l4xx.h"

Go to the source code of this file.

Data Structures

struct  LL_OPAMP_InitTypeDef
 Structure definition of some features of OPAMP instance. More...

Defines

#define OPAMP_POWERMODE_OTR_REGOFFSET   ((uint32_t)0x00000000U)
#define OPAMP_POWERMODE_LPOTR_REGOFFSET   ((uint32_t)0x00000001U)
#define OPAMP_POWERMODE_OTR_REGOFFSET_MASK   (OPAMP_POWERMODE_OTR_REGOFFSET | OPAMP_POWERMODE_LPOTR_REGOFFSET)
#define OPAMP_POWERMODE_CSR_BIT_MASK   (OPAMP_CSR_OPALPM)
#define OPAMP_TRIMMING_SELECT_MASK   (OPAMP1_CSR_CALSEL)
#define OPAMP_TRIMMING_VALUE_MASK   (OPAMP_OTR_TRIMOFFSETP | OPAMP_OTR_TRIMOFFSETN)
#define __OPAMP_PTR_REG_OFFSET(__REG__, __REG_OFFSET__)   ((uint32_t *)((uint32_t) ((uint32_t)(&(__REG__)) + ((__REG_OFFSET__) << 2U))))
 Driver macro reserved for internal use: set a pointer to a register from a register basis from which an offset is applied.
#define LL_OPAMP_POWERSUPPLY_RANGE_LOW   ((uint32_t)0x00000000U)
#define LL_OPAMP_POWERSUPPLY_RANGE_HIGH   (OPAMP1_CSR_OPARANGE)
#define LL_OPAMP_POWERMODE_NORMAL   (OPAMP_POWERMODE_OTR_REGOFFSET)
#define LL_OPAMP_POWERMODE_LOWPOWER   (OPAMP_POWERMODE_LPOTR_REGOFFSET | OPAMP_CSR_OPALPM)
#define LL_OPAMP_MODE_FUNCTIONAL   ((uint32_t)0x00000000U)
#define LL_OPAMP_MODE_CALIBRATION   (OPAMP_CSR_CALON)
#define LL_OPAMP_MODE_STANDALONE   ((uint32_t)0x00000000U)
#define LL_OPAMP_MODE_FOLLOWER   (OPAMP_CSR_OPAMODE_1 | OPAMP_CSR_OPAMODE_0)
#define LL_OPAMP_MODE_PGA   (OPAMP_CSR_OPAMODE_1)
#define LL_OPAMP_PGA_GAIN_2   ((uint32_t)0x00000000U)
#define LL_OPAMP_PGA_GAIN_4   (OPAMP_CSR_PGGAIN_0)
#define LL_OPAMP_PGA_GAIN_8   (OPAMP_CSR_PGGAIN_1)
#define LL_OPAMP_PGA_GAIN_16   (OPAMP_CSR_PGGAIN_1 | OPAMP_CSR_PGGAIN_0 )
#define LL_OPAMP_INPUT_NONINVERT_IO0   ((uint32_t)0x00000000U)
#define LL_OPAMP_INPUT_NONINV_DAC1_CH1   (OPAMP1_CSR_VPSEL)
#define LL_OPAMP_INPUT_INVERT_IO0   ((uint32_t)0x00000000U)
#define LL_OPAMP_INPUT_INVERT_IO1   (OPAMP_CSR_VMSEL_0)
#define LL_OPAMP_INPUT_INVERT_CONNECT_NO   (OPAMP_CSR_VMSEL_1)
#define LL_OPAMP_NONINVERTINGINPUT_IO0   LL_OPAMP_INPUT_NONINVERT_IO0
#define LL_OPAMP_NONINVERTINGINPUT_DAC_CH   LL_OPAMP_INPUT_NONINV_DAC1_CH1
#define LL_OPAMP_INVERTINGINPUT_IO0   LL_OPAMP_INPUT_INVERT_IO0
#define LL_OPAMP_INVERTINGINPUT_IO1   LL_OPAMP_INPUT_INVERT_IO1
#define LL_OPAMP_INVERTINGINPUT_CONNECT_NO   LL_OPAMP_INPUT_INVERT_CONNECT_NO
#define LL_OPAMP_INPUT_NONINVERT_DAC1_CH1   LL_OPAMP_INPUT_NONINV_DAC1_CH1
#define LL_OPAMP_TRIMMING_FACTORY   ((uint32_t)0x00000000U)
#define LL_OPAMP_TRIMMING_USER   (OPAMP_CSR_USERTRIM)
#define LL_OPAMP_TRIMMING_NMOS   (OPAMP_OTR_TRIMOFFSETN)
#define LL_OPAMP_TRIMMING_PMOS   (OPAMP_OTR_TRIMOFFSETP | OPAMP1_CSR_CALSEL)
#define LL_OPAMP_DELAY_STARTUP_US   ((uint32_t) 30U)
#define LL_OPAMP_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG(__INSTANCE__->__REG__, (__VALUE__))
 Write a value in OPAMP register.
#define LL_OPAMP_ReadReg(__INSTANCE__, __REG__)   READ_REG(__INSTANCE__->__REG__)
 Read a value in OPAMP register.
#define __LL_OPAMP_COMMON_INSTANCE(__OPAMPx__)   (OPAMP12_COMMON)
 Helper macro to select the OPAMP common instance to which is belonging the selected OPAMP instance.
#define __LL_OPAMP_IS_ENABLED_ALL_COMMON_INSTANCE()
 Helper macro to check if all OPAMP instances sharing the same OPAMP common instance are disabled.

Functions

__STATIC_INLINE void LL_OPAMP_SetCommonPowerRange (OPAMP_Common_TypeDef *OPAMPxy_COMMON, uint32_t PowerRange)
 Set OPAMP power range.
__STATIC_INLINE uint32_t LL_OPAMP_GetCommonPowerRange (OPAMP_Common_TypeDef *OPAMPxy_COMMON)
 Get OPAMP power range.
__STATIC_INLINE void LL_OPAMP_SetPowerMode (OPAMP_TypeDef *OPAMPx, uint32_t PowerMode)
 Set OPAMP power mode.
__STATIC_INLINE uint32_t LL_OPAMP_GetPowerMode (OPAMP_TypeDef *OPAMPx)
 Get OPAMP power mode.
__STATIC_INLINE void LL_OPAMP_SetMode (OPAMP_TypeDef *OPAMPx, uint32_t Mode)
 Set OPAMP mode calibration or functional.
__STATIC_INLINE uint32_t LL_OPAMP_GetMode (OPAMP_TypeDef *OPAMPx)
 Get OPAMP mode calibration or functional.
__STATIC_INLINE void LL_OPAMP_SetFunctionalMode (OPAMP_TypeDef *OPAMPx, uint32_t FunctionalMode)
 Set OPAMP functional mode by setting internal connections.
__STATIC_INLINE uint32_t LL_OPAMP_GetFunctionalMode (OPAMP_TypeDef *OPAMPx)
 Get OPAMP functional mode from setting of internal connections.
__STATIC_INLINE void LL_OPAMP_SetPGAGain (OPAMP_TypeDef *OPAMPx, uint32_t PGAGain)
 Set OPAMP PGA gain.
__STATIC_INLINE uint32_t LL_OPAMP_GetPGAGain (OPAMP_TypeDef *OPAMPx)
 Get OPAMP PGA gain.
__STATIC_INLINE void LL_OPAMP_SetInputNonInverting (OPAMP_TypeDef *OPAMPx, uint32_t InputNonInverting)
 Set OPAMP non-inverting input connection.
__STATIC_INLINE uint32_t LL_OPAMP_GetInputNonInverting (OPAMP_TypeDef *OPAMPx)
 Get OPAMP non-inverting input connection.
__STATIC_INLINE void LL_OPAMP_SetInputInverting (OPAMP_TypeDef *OPAMPx, uint32_t InputInverting)
 Set OPAMP inverting input connection.
__STATIC_INLINE uint32_t LL_OPAMP_GetInputInverting (OPAMP_TypeDef *OPAMPx)
 Get OPAMP inverting input connection.
__STATIC_INLINE void LL_OPAMP_SetNonInvertingInput (OPAMP_TypeDef *OPAMPx, uint32_t NonInvertingInput)
__STATIC_INLINE void LL_OPAMP_SetInvertingInput (OPAMP_TypeDef *OPAMPx, uint32_t InvertingInput)
__STATIC_INLINE void LL_OPAMP_SetTrimmingMode (OPAMP_TypeDef *OPAMPx, uint32_t TrimmingMode)
 Set OPAMP trimming mode.
__STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingMode (OPAMP_TypeDef *OPAMPx)
 Get OPAMP trimming mode.
__STATIC_INLINE void LL_OPAMP_SetCalibrationSelection (OPAMP_TypeDef *OPAMPx, uint32_t TransistorsDiffPair)
 Set OPAMP offset to calibrate the selected transistors differential pair NMOS or PMOS.
__STATIC_INLINE uint32_t LL_OPAMP_GetCalibrationSelection (OPAMP_TypeDef *OPAMPx)
 Get OPAMP offset to calibrate the selected transistors differential pair NMOS or PMOS.
__STATIC_INLINE uint32_t LL_OPAMP_IsCalibrationOutputSet (OPAMP_TypeDef *OPAMPx)
 Get OPAMP calibration result of toggling output.
__STATIC_INLINE void LL_OPAMP_SetTrimmingValue (OPAMP_TypeDef *OPAMPx, uint32_t PowerMode, uint32_t TransistorsDiffPair, uint32_t TrimmingValue)
 Set OPAMP trimming factor for the selected transistors differential pair NMOS or PMOS, corresponding to the selected power mode.
__STATIC_INLINE uint32_t LL_OPAMP_GetTrimmingValue (OPAMP_TypeDef *OPAMPx, uint32_t PowerMode, uint32_t TransistorsDiffPair)
 Get OPAMP trimming factor for the selected transistors differential pair NMOS or PMOS, corresponding to the selected power mode.
__STATIC_INLINE void LL_OPAMP_Enable (OPAMP_TypeDef *OPAMPx)
 Enable OPAMP instance.
__STATIC_INLINE void LL_OPAMP_Disable (OPAMP_TypeDef *OPAMPx)
 Disable OPAMP instance.
__STATIC_INLINE uint32_t LL_OPAMP_IsEnabled (OPAMP_TypeDef *OPAMPx)
 Get OPAMP instance enable state (0: OPAMP is disabled, 1: OPAMP is enabled)
ErrorStatus LL_OPAMP_DeInit (OPAMP_TypeDef *OPAMPx)
 De-initialize registers of the selected OPAMP instance to their default reset values.
ErrorStatus LL_OPAMP_Init (OPAMP_TypeDef *OPAMPx, LL_OPAMP_InitTypeDef *OPAMP_InitStruct)
 Initialize some features of OPAMP instance.
void LL_OPAMP_StructInit (LL_OPAMP_InitTypeDef *OPAMP_InitStruct)
 Set each LL_OPAMP_InitTypeDef field to default value.

Detailed Description

Header file of OPAMP LL module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

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_opamp.h.