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

Header file of OPAMP LL module. More...

#include "stm32h7xx.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   0x00000000U
#define OPAMP_POWERMODE_HSOTR_REGOFFSET   0x00000001U
#define OPAMP_POWERMODE_OTR_REGOFFSET_MASK   (OPAMP_POWERMODE_OTR_REGOFFSET | OPAMP_POWERMODE_HSOTR_REGOFFSET)
#define OPAMP_POWERMODE_CSR_BIT_MASK   (OPAMP_CSR_OPAHSM)
#define OPAMP_TRIMMING_SELECT_MASK   0x00030000U
#define OPAMP_TRIMMING_VALUE_MASK   (OPAMP_OTR_TRIMOFFSETP | OPAMP_OTR_TRIMOFFSETN)
#define __OPAMP_PTR_REG_OFFSET(__REG__, __REG_OFFSET__)   ((__IO 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_MODE_FUNCTIONAL   0x00000000U
#define LL_OPAMP_MODE_CALIBRATION   (OPAMP_CSR_CALON)
#define LL_OPAMP_MODE_STANDALONE   0x00000000U
#define LL_OPAMP_MODE_FOLLOWER   (OPAMP_CSR_VMSEL_1 | OPAMP_CSR_VMSEL_0)
#define LL_OPAMP_MODE_PGA   (OPAMP_CSR_VMSEL_1)
#define LL_OPAMP_MODE_PGA_IO0   (OPAMP_CSR_PGGAIN_2|OPAMP_CSR_VMSEL_1)
#define LL_OPAMP_MODE_PGA_IO0_BIAS   (OPAMP_CSR_PGGAIN_3|OPAMP_CSR_VMSEL_1)
#define LL_OPAMP_MODE_PGA_IO0_IO1_BIAS   (OPAMP_CSR_PGGAIN_3|OPAMP_CSR_PGGAIN_2|OPAMP_CSR_VMSEL_1)
#define LL_OPAMP_PGA_GAIN_2_OR_MINUS_1   0x00000000U
#define LL_OPAMP_PGA_GAIN_4_OR_MINUS_3   ( OPAMP_CSR_PGGAIN_0)
#define LL_OPAMP_PGA_GAIN_8_OR_MINUS_7   ( OPAMP_CSR_PGGAIN_1 )
#define LL_OPAMP_PGA_GAIN_16_OR_MINUS_15   ( OPAMP_CSR_PGGAIN_1 | OPAMP_CSR_PGGAIN_0)
#define LL_OPAMP_INPUT_NONINVERT_IO0   0x00000000U
#define LL_OPAMP_INPUT_NONINVERT_DAC   OPAMP_CSR_VPSEL_0
#define LL_OPAMP_INPUT_INVERT_IO0   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_POWERMODE_NORMAL   (OPAMP_POWERMODE_OTR_REGOFFSET)
#define LL_OPAMP_POWERMODE_HIGHSPEED   (OPAMP_POWERMODE_HSOTR_REGOFFSET | OPAMP_CSR_OPAHSM)
#define LL_OPAMP_TRIMMING_FACTORY   0x00000000U
#define LL_OPAMP_TRIMMING_USER   OPAMP_CSR_USERTRIM
#define LL_OPAMP_TRIMMING_NMOS_VREF_90PC_VDDA   (OPAMP_OTR_TRIMOFFSETN | ((OPAMP_CSR_CALSEL_1 | OPAMP_CSR_CALSEL_0) << 4))
#define LL_OPAMP_TRIMMING_NMOS_VREF_50PC_VDDA   (OPAMP_OTR_TRIMOFFSETN | (OPAMP_CSR_CALSEL_1 << 4))
#define LL_OPAMP_TRIMMING_PMOS_VREF_10PC_VDDA   (OPAMP_OTR_TRIMOFFSETP | (OPAMP_CSR_CALSEL_0 << 4))
#define LL_OPAMP_TRIMMING_PMOS_VREF_3_3PC_VDDA   (OPAMP_OTR_TRIMOFFSETP )
#define LL_OPAMP_TRIMMING_NMOS   (LL_OPAMP_TRIMMING_NMOS_VREF_90PC_VDDA)
#define LL_OPAMP_TRIMMING_PMOS   (LL_OPAMP_TRIMMING_PMOS_VREF_10PC_VDDA)
#define LL_OPAMP_DELAY_STARTUP_US   (3U)
#define LL_OPAMP_WriteReg(__INSTANCE__, __REG__, __VALUE__)   WRITE_REG((__INSTANCE__)->__REG__, (__VALUE__))
 Write a value in OPAMP LL_OPAMP_GetPowerModeregister.
#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_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_SetPowerMode (OPAMP_TypeDef *OPAMPx, uint32_t PowerMode)
 Set OPAMP power mode normal or highspeed.
__STATIC_INLINE uint32_t LL_OPAMP_GetPowerMode (OPAMP_TypeDef *OPAMPx)
 Get OPAMP power mode normal or highspeed.
__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_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. 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_opamp.h.