Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.
Dependents: 1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB
Fork of mbed by
TARGET_MOTE_L152RC/stm32l1xx_hal_opamp.h@121:672067c3ada4, 2016-04-14 (annotated)
- Committer:
- elijahorr
- Date:
- Thu Apr 14 07:28:54 2016 +0000
- Revision:
- 121:672067c3ada4
- Parent:
- 112:6f327212ef96
.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 112:6f327212ef96 | 1 | /** |
Kojto | 112:6f327212ef96 | 2 | ****************************************************************************** |
Kojto | 112:6f327212ef96 | 3 | * @file stm32l1xx_hal_opamp.h |
Kojto | 112:6f327212ef96 | 4 | * @author MCD Application Team |
Kojto | 112:6f327212ef96 | 5 | * @version V1.0.0 |
Kojto | 112:6f327212ef96 | 6 | * @date 5-September-2014 |
Kojto | 112:6f327212ef96 | 7 | * @brief Header file of OPAMP HAL module. |
Kojto | 112:6f327212ef96 | 8 | ****************************************************************************** |
Kojto | 112:6f327212ef96 | 9 | * @attention |
Kojto | 112:6f327212ef96 | 10 | * |
Kojto | 112:6f327212ef96 | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
Kojto | 112:6f327212ef96 | 12 | * |
Kojto | 112:6f327212ef96 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 112:6f327212ef96 | 14 | * are permitted provided that the following conditions are met: |
Kojto | 112:6f327212ef96 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 112:6f327212ef96 | 16 | * this list of conditions and the following disclaimer. |
Kojto | 112:6f327212ef96 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 112:6f327212ef96 | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 112:6f327212ef96 | 19 | * and/or other materials provided with the distribution. |
Kojto | 112:6f327212ef96 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 112:6f327212ef96 | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 112:6f327212ef96 | 22 | * without specific prior written permission. |
Kojto | 112:6f327212ef96 | 23 | * |
Kojto | 112:6f327212ef96 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 112:6f327212ef96 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 112:6f327212ef96 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 112:6f327212ef96 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 112:6f327212ef96 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 112:6f327212ef96 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 112:6f327212ef96 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 112:6f327212ef96 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 112:6f327212ef96 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 112:6f327212ef96 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 112:6f327212ef96 | 34 | * |
Kojto | 112:6f327212ef96 | 35 | ****************************************************************************** |
Kojto | 112:6f327212ef96 | 36 | */ |
Kojto | 112:6f327212ef96 | 37 | |
Kojto | 112:6f327212ef96 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 112:6f327212ef96 | 39 | #ifndef __STM32L1xx_HAL_OPAMP_H |
Kojto | 112:6f327212ef96 | 40 | #define __STM32L1xx_HAL_OPAMP_H |
Kojto | 112:6f327212ef96 | 41 | |
Kojto | 112:6f327212ef96 | 42 | #ifdef __cplusplus |
Kojto | 112:6f327212ef96 | 43 | extern "C" { |
Kojto | 112:6f327212ef96 | 44 | #endif |
Kojto | 112:6f327212ef96 | 45 | |
Kojto | 112:6f327212ef96 | 46 | #if defined (STM32L151xCA) || defined (STM32L151xD) || defined (STM32L152xCA) || defined (STM32L152xD) || defined (STM32L162xCA) || defined (STM32L162xD) || defined (STM32L151xE) || defined (STM32L152xE) || defined (STM32L162xE) || defined (STM32L162xC) || defined (STM32L152xC) || defined (STM32L151xC) |
Kojto | 112:6f327212ef96 | 47 | |
Kojto | 112:6f327212ef96 | 48 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 49 | #include "stm32l1xx_hal_def.h" |
Kojto | 112:6f327212ef96 | 50 | |
Kojto | 112:6f327212ef96 | 51 | /** @addtogroup STM32L1xx_HAL_Driver |
Kojto | 112:6f327212ef96 | 52 | * @{ |
Kojto | 112:6f327212ef96 | 53 | */ |
Kojto | 112:6f327212ef96 | 54 | |
Kojto | 112:6f327212ef96 | 55 | /** @addtogroup OPAMP |
Kojto | 112:6f327212ef96 | 56 | * @{ |
Kojto | 112:6f327212ef96 | 57 | */ |
Kojto | 112:6f327212ef96 | 58 | |
Kojto | 112:6f327212ef96 | 59 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 60 | |
Kojto | 112:6f327212ef96 | 61 | /** @defgroup OPAMP_Exported_Types OPAMP Exported Types |
Kojto | 112:6f327212ef96 | 62 | * @{ |
Kojto | 112:6f327212ef96 | 63 | */ |
Kojto | 112:6f327212ef96 | 64 | /** |
Kojto | 112:6f327212ef96 | 65 | * @brief OPAMP Init structure definition |
Kojto | 112:6f327212ef96 | 66 | */ |
Kojto | 112:6f327212ef96 | 67 | |
Kojto | 112:6f327212ef96 | 68 | typedef struct |
Kojto | 112:6f327212ef96 | 69 | { |
Kojto | 112:6f327212ef96 | 70 | uint32_t PowerSupplyRange; /*!< Specifies the power supply range: above or under 2.4V. |
Kojto | 112:6f327212ef96 | 71 | This parameter must be a value of @ref OPAMP_PowerSupplyRange |
Kojto | 112:6f327212ef96 | 72 | Caution: This parameter is common to all OPAMP instances: a modification of this parameter for the selected OPAMP impacts the other OPAMP instances. */ |
Kojto | 112:6f327212ef96 | 73 | |
Kojto | 112:6f327212ef96 | 74 | uint32_t UserTrimming; /*!< Specifies the trimming mode |
Kojto | 112:6f327212ef96 | 75 | This parameter must be a value of @ref OPAMP_UserTrimming |
Kojto | 112:6f327212ef96 | 76 | UserTrimming is either factory or user trimming. |
Kojto | 112:6f327212ef96 | 77 | Caution: This parameter is common to all OPAMP instances: a modification of this parameter for the selected OPAMP impacts the other OPAMP instances. */ |
Kojto | 112:6f327212ef96 | 78 | |
Kojto | 112:6f327212ef96 | 79 | uint32_t Mode; /*!< Specifies the OPAMP mode |
Kojto | 112:6f327212ef96 | 80 | This parameter must be a value of @ref OPAMP_Mode |
Kojto | 112:6f327212ef96 | 81 | mode is either Standalone or Follower */ |
Kojto | 112:6f327212ef96 | 82 | |
Kojto | 112:6f327212ef96 | 83 | uint32_t InvertingInput; /*!< Specifies the inverting input in Standalone mode |
Kojto | 112:6f327212ef96 | 84 | - In Standalone mode: i.e when mode is OPAMP_STANDALONE_MODE |
Kojto | 112:6f327212ef96 | 85 | This parameter must be a value of @ref OPAMP_InvertingInput |
Kojto | 112:6f327212ef96 | 86 | InvertingInput is either VM0 or VM1 |
Kojto | 112:6f327212ef96 | 87 | - In Follower mode: i.e when mode is OPAMP_FOLLOWER_MODE |
Kojto | 112:6f327212ef96 | 88 | This parameter is Not Applicable */ |
Kojto | 112:6f327212ef96 | 89 | |
Kojto | 112:6f327212ef96 | 90 | uint32_t NonInvertingInput; /*!< Specifies the non inverting input of the opamp: |
Kojto | 112:6f327212ef96 | 91 | This parameter must be a value of @ref OPAMP_NonInvertingInput |
Kojto | 112:6f327212ef96 | 92 | NonInvertingInput is either VP0, VP1 or VP2 */ |
Kojto | 112:6f327212ef96 | 93 | |
Kojto | 112:6f327212ef96 | 94 | uint32_t PowerMode; /*!< Specifies the power mode Normal or Low-Power. |
Kojto | 112:6f327212ef96 | 95 | This parameter must be a value of @ref OPAMP_PowerMode */ |
Kojto | 112:6f327212ef96 | 96 | |
Kojto | 112:6f327212ef96 | 97 | uint32_t TrimmingValueP; /*!< Specifies the offset trimming value (PMOS) |
Kojto | 112:6f327212ef96 | 98 | i.e. when UserTrimming is OPAMP_TRIMMING_USER. |
Kojto | 112:6f327212ef96 | 99 | This parameter must be a number between Min_Data = 0 and Max_Data = 30 (Trimming value 31 is forbidden) */ |
Kojto | 112:6f327212ef96 | 100 | |
Kojto | 112:6f327212ef96 | 101 | uint32_t TrimmingValueN; /*!< Specifies the offset trimming value (NMOS) |
Kojto | 112:6f327212ef96 | 102 | i.e. when UserTrimming is OPAMP_TRIMMING_USER. |
Kojto | 112:6f327212ef96 | 103 | This parameter must be a number between Min_Data = 0 and Max_Data = 30 (Trimming value 31 is forbidden) */ |
Kojto | 112:6f327212ef96 | 104 | |
Kojto | 112:6f327212ef96 | 105 | uint32_t TrimmingValuePLowPower; /*!< Specifies the offset trimming value (PMOS) |
Kojto | 112:6f327212ef96 | 106 | i.e. when UserTrimming is OPAMP_TRIMMING_USER. |
Kojto | 112:6f327212ef96 | 107 | This parameter must be a number between Min_Data = 0 and Max_Data = 30 (Trimming value 31 is forbidden) */ |
Kojto | 112:6f327212ef96 | 108 | |
Kojto | 112:6f327212ef96 | 109 | uint32_t TrimmingValueNLowPower; /*!< Specifies the offset trimming value (NMOS) |
Kojto | 112:6f327212ef96 | 110 | i.e. when UserTrimming is OPAMP_TRIMMING_USER. |
Kojto | 112:6f327212ef96 | 111 | This parameter must be a number between Min_Data = 0 and Max_Data = 30 (Trimming value 31 is forbidden) */ |
Kojto | 112:6f327212ef96 | 112 | |
Kojto | 112:6f327212ef96 | 113 | }OPAMP_InitTypeDef; |
Kojto | 112:6f327212ef96 | 114 | |
Kojto | 112:6f327212ef96 | 115 | /** |
Kojto | 112:6f327212ef96 | 116 | * @brief HAL State structures definition |
Kojto | 112:6f327212ef96 | 117 | */ |
Kojto | 112:6f327212ef96 | 118 | |
Kojto | 112:6f327212ef96 | 119 | typedef enum |
Kojto | 112:6f327212ef96 | 120 | { |
Kojto | 112:6f327212ef96 | 121 | HAL_OPAMP_STATE_RESET = 0x00000000, /*!< OPMAP is not yet Initialized */ |
Kojto | 112:6f327212ef96 | 122 | |
Kojto | 112:6f327212ef96 | 123 | HAL_OPAMP_STATE_READY = 0x00000001, /*!< OPAMP is initialized and ready for use */ |
Kojto | 112:6f327212ef96 | 124 | HAL_OPAMP_STATE_CALIBBUSY = 0x00000002, /*!< OPAMP is enabled in auto calibration mode */ |
Kojto | 112:6f327212ef96 | 125 | |
Kojto | 112:6f327212ef96 | 126 | HAL_OPAMP_STATE_BUSY = 0x00000004, /*!< OPAMP is enabled and running in normal mode */ |
Kojto | 112:6f327212ef96 | 127 | HAL_OPAMP_STATE_BUSYLOCKED = 0x00000005, /*!< OPAMP is locked |
Kojto | 112:6f327212ef96 | 128 | only system reset allows reconfiguring the opamp. */ |
Kojto | 112:6f327212ef96 | 129 | |
Kojto | 112:6f327212ef96 | 130 | }HAL_OPAMP_StateTypeDef; |
Kojto | 112:6f327212ef96 | 131 | |
Kojto | 112:6f327212ef96 | 132 | /** |
Kojto | 112:6f327212ef96 | 133 | * @brief OPAMP Handle Structure definition |
Kojto | 112:6f327212ef96 | 134 | */ |
Kojto | 112:6f327212ef96 | 135 | typedef struct |
Kojto | 112:6f327212ef96 | 136 | { |
Kojto | 112:6f327212ef96 | 137 | OPAMP_TypeDef *Instance; /*!< OPAMP instance's registers base address */ |
Kojto | 112:6f327212ef96 | 138 | OPAMP_InitTypeDef Init; /*!< OPAMP required parameters */ |
Kojto | 112:6f327212ef96 | 139 | HAL_StatusTypeDef Status; /*!< OPAMP peripheral status */ |
Kojto | 112:6f327212ef96 | 140 | HAL_LockTypeDef Lock; /*!< Locking object */ |
Kojto | 112:6f327212ef96 | 141 | __IO HAL_OPAMP_StateTypeDef State; /*!< OPAMP communication state */ |
Kojto | 112:6f327212ef96 | 142 | |
Kojto | 112:6f327212ef96 | 143 | } OPAMP_HandleTypeDef; |
Kojto | 112:6f327212ef96 | 144 | |
Kojto | 112:6f327212ef96 | 145 | /** |
Kojto | 112:6f327212ef96 | 146 | * @brief OPAMP_TrimmingValueTypeDef @brief definition |
Kojto | 112:6f327212ef96 | 147 | */ |
Kojto | 112:6f327212ef96 | 148 | |
Kojto | 112:6f327212ef96 | 149 | typedef uint32_t OPAMP_TrimmingValueTypeDef; |
Kojto | 112:6f327212ef96 | 150 | |
Kojto | 112:6f327212ef96 | 151 | /** |
Kojto | 112:6f327212ef96 | 152 | * @} |
Kojto | 112:6f327212ef96 | 153 | */ |
Kojto | 112:6f327212ef96 | 154 | |
Kojto | 112:6f327212ef96 | 155 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 156 | /** @defgroup OPAMP_Exported_Constants OPAMP Exported Constants |
Kojto | 112:6f327212ef96 | 157 | * @{ |
Kojto | 112:6f327212ef96 | 158 | */ |
Kojto | 112:6f327212ef96 | 159 | |
Kojto | 112:6f327212ef96 | 160 | /** |
Kojto | 112:6f327212ef96 | 161 | * OTR register Mask |
Kojto | 112:6f327212ef96 | 162 | */ |
Kojto | 112:6f327212ef96 | 163 | #define OPAMP_TRIM_VALUE_MASK OPAMP_OTR_AO1_OPT_OFFSET_TRIM_LOW |
Kojto | 112:6f327212ef96 | 164 | |
Kojto | 112:6f327212ef96 | 165 | /** |
Kojto | 112:6f327212ef96 | 166 | * CSR register Mask |
Kojto | 112:6f327212ef96 | 167 | */ |
Kojto | 112:6f327212ef96 | 168 | #define OPAMP_CSR_INSTANCE_OFFSET ((uint32_t) 8) /* Offset of each OPAMP instance into register CSR */ |
Kojto | 112:6f327212ef96 | 169 | #define OPAMP_OTR_INSTANCE_OFFSET ((uint32_t) 10) /* Offset of each OPAMP instance into register OTR */ |
Kojto | 112:6f327212ef96 | 170 | |
Kojto | 112:6f327212ef96 | 171 | |
Kojto | 112:6f327212ef96 | 172 | /** @defgroup OPAMP_Mode OPAMP Mode |
Kojto | 112:6f327212ef96 | 173 | * @{ |
Kojto | 112:6f327212ef96 | 174 | */ |
Kojto | 112:6f327212ef96 | 175 | #define OPAMP_STANDALONE_MODE ((uint32_t)0x00000000) /*!< OPAMP standalone mode */ |
Kojto | 112:6f327212ef96 | 176 | #define OPAMP_FOLLOWER_MODE ((uint32_t)0x00000001) /*!< OPAMP follower mode */ |
Kojto | 112:6f327212ef96 | 177 | |
Kojto | 112:6f327212ef96 | 178 | #define IS_OPAMP_FUNCTIONAL_NORMALMODE(INPUT) (((INPUT) == OPAMP_STANDALONE_MODE) || \ |
Kojto | 112:6f327212ef96 | 179 | ((INPUT) == OPAMP_FOLLOWER_MODE)) |
Kojto | 112:6f327212ef96 | 180 | /** |
Kojto | 112:6f327212ef96 | 181 | * @} |
Kojto | 112:6f327212ef96 | 182 | */ |
Kojto | 112:6f327212ef96 | 183 | |
Kojto | 112:6f327212ef96 | 184 | /** @defgroup OPAMP_NonInvertingInput OPAMP NonInvertingInput |
Kojto | 112:6f327212ef96 | 185 | * @{ |
Kojto | 112:6f327212ef96 | 186 | */ |
Kojto | 112:6f327212ef96 | 187 | #define OPAMP_NONINVERTINGINPUT_VP0 ((uint32_t)0x00000000) /*!< Comparator non-inverting input connected to dedicated IO pin low-leakage */ |
Kojto | 112:6f327212ef96 | 188 | #define OPAMP_NONINVERTINGINPUT_DAC_CH1 ((uint32_t)0x00000001) /*!< Comparator non-inverting input connected internally to DAC channel 1 */ |
Kojto | 112:6f327212ef96 | 189 | #define OPAMP_NONINVERTINGINPUT_DAC_CH2 ((uint32_t)0x00000002) /*!< Comparator non-inverting input connected internally to DAC channel 2. Available on OPAMP2 only. */ |
Kojto | 112:6f327212ef96 | 190 | |
Kojto | 112:6f327212ef96 | 191 | #define IS_OPAMP_NONINVERTING_INPUT(INPUT) (((INPUT) == OPAMP_NONINVERTINGINPUT_VP0) || \ |
Kojto | 112:6f327212ef96 | 192 | ((INPUT) == OPAMP_NONINVERTINGINPUT_DAC_CH1) || \ |
Kojto | 112:6f327212ef96 | 193 | ((INPUT) == OPAMP_NONINVERTINGINPUT_DAC_CH2) ) |
Kojto | 112:6f327212ef96 | 194 | /** |
Kojto | 112:6f327212ef96 | 195 | * @} |
Kojto | 112:6f327212ef96 | 196 | */ |
Kojto | 112:6f327212ef96 | 197 | |
Kojto | 112:6f327212ef96 | 198 | /** @defgroup OPAMP_InvertingInput OPAMP InvertingInput |
Kojto | 112:6f327212ef96 | 199 | * @{ |
Kojto | 112:6f327212ef96 | 200 | */ |
Kojto | 112:6f327212ef96 | 201 | #define OPAMP_INVERTINGINPUT_VM0 ((uint32_t)0x00000000) /*!< Comparator inverting input connected to dedicated IO pin low-leakage */ |
Kojto | 112:6f327212ef96 | 202 | #define OPAMP_INVERTINGINPUT_VM1 ((uint32_t)0x00000001) /*!< Comparator inverting input connected to alternative IO pin available on some device packages */ |
Kojto | 112:6f327212ef96 | 203 | |
Kojto | 112:6f327212ef96 | 204 | #define OPAMP_INVERTINGINPUT_VINM OPAMP_INVERTINGINPUT_VM1 /*!< Alternate name for comparator inverting input connected to alternative IO pin available on some device packages */ |
Kojto | 112:6f327212ef96 | 205 | |
Kojto | 112:6f327212ef96 | 206 | #define IOPAMP_INVERTINGINPUT_VM0 OPAMP_INVERTINGINPUT_VM0 /* For compatibility with other STM32 devices */ |
Kojto | 112:6f327212ef96 | 207 | #define IOPAMP_INVERTINGINPUT_VM1 OPAMP_INVERTINGINPUT_VM1 /* For compatibility with other STM32 devices */ |
Kojto | 112:6f327212ef96 | 208 | |
Kojto | 112:6f327212ef96 | 209 | #define IS_OPAMP_INVERTING_INPUT(INPUT) (((INPUT) == OPAMP_INVERTINGINPUT_VM0) || \ |
Kojto | 112:6f327212ef96 | 210 | ((INPUT) == OPAMP_INVERTINGINPUT_VM1) ) |
Kojto | 112:6f327212ef96 | 211 | /** |
Kojto | 112:6f327212ef96 | 212 | * @} |
Kojto | 112:6f327212ef96 | 213 | */ |
Kojto | 112:6f327212ef96 | 214 | |
Kojto | 112:6f327212ef96 | 215 | /** @defgroup OPAMP_PowerMode OPAMP PowerMode |
Kojto | 112:6f327212ef96 | 216 | * @{ |
Kojto | 112:6f327212ef96 | 217 | */ |
Kojto | 112:6f327212ef96 | 218 | #define OPAMP_POWERMODE_NORMAL ((uint32_t)0x00000000) |
Kojto | 112:6f327212ef96 | 219 | #define OPAMP_POWERMODE_LOWPOWER ((uint32_t)0x00000001) |
Kojto | 112:6f327212ef96 | 220 | |
Kojto | 112:6f327212ef96 | 221 | #define IS_OPAMP_POWERMODE(TRIMMING) (((TRIMMING) == OPAMP_POWERMODE_NORMAL) || \ |
Kojto | 112:6f327212ef96 | 222 | ((TRIMMING) == OPAMP_POWERMODE_LOWPOWER) ) |
Kojto | 112:6f327212ef96 | 223 | /** |
Kojto | 112:6f327212ef96 | 224 | * @} |
Kojto | 112:6f327212ef96 | 225 | */ |
Kojto | 112:6f327212ef96 | 226 | |
Kojto | 112:6f327212ef96 | 227 | /** @defgroup OPAMP_PowerSupplyRange OPAMP PowerSupplyRange |
Kojto | 112:6f327212ef96 | 228 | * @{ |
Kojto | 112:6f327212ef96 | 229 | */ |
Kojto | 112:6f327212ef96 | 230 | #define OPAMP_POWERSUPPLY_LOW ((uint32_t)0x00000000) /*!< Power supply range low (VDDA lower than 2.4V) */ |
Kojto | 112:6f327212ef96 | 231 | #define OPAMP_POWERSUPPLY_HIGH OPAMP_CSR_AOP_RANGE /*!< Power supply range high (VDDA higher than 2.4V) */ |
Kojto | 112:6f327212ef96 | 232 | |
Kojto | 112:6f327212ef96 | 233 | #define IS_OPAMP_POWER_SUPPLY_RANGE(RANGE) (((RANGE) == OPAMP_POWERSUPPLY_LOW) || \ |
Kojto | 112:6f327212ef96 | 234 | ((RANGE) == OPAMP_POWERSUPPLY_HIGH) ) |
Kojto | 112:6f327212ef96 | 235 | /** |
Kojto | 112:6f327212ef96 | 236 | * @} |
Kojto | 112:6f327212ef96 | 237 | */ |
Kojto | 112:6f327212ef96 | 238 | |
Kojto | 112:6f327212ef96 | 239 | /** @defgroup OPAMP_UserTrimming OPAMP UserTrimming |
Kojto | 112:6f327212ef96 | 240 | * @{ |
Kojto | 112:6f327212ef96 | 241 | */ |
Kojto | 112:6f327212ef96 | 242 | #define OPAMP_TRIMMING_FACTORY ((uint32_t)0x00000000) /*!< Factory trimming */ |
Kojto | 112:6f327212ef96 | 243 | #define OPAMP_TRIMMING_USER OPAMP_OTR_OT_USER /*!< User trimming */ |
Kojto | 112:6f327212ef96 | 244 | |
Kojto | 112:6f327212ef96 | 245 | #define IS_OPAMP_TRIMMING(TRIMMING) (((TRIMMING) == OPAMP_TRIMMING_FACTORY) || \ |
Kojto | 112:6f327212ef96 | 246 | ((TRIMMING) == OPAMP_TRIMMING_USER)) |
Kojto | 112:6f327212ef96 | 247 | /** |
Kojto | 112:6f327212ef96 | 248 | * @} |
Kojto | 112:6f327212ef96 | 249 | */ |
Kojto | 112:6f327212ef96 | 250 | |
Kojto | 112:6f327212ef96 | 251 | /** @defgroup OPAMP_FactoryTrimming OPAMP FactoryTrimming |
Kojto | 112:6f327212ef96 | 252 | * @{ |
Kojto | 112:6f327212ef96 | 253 | */ |
Kojto | 112:6f327212ef96 | 254 | #define OPAMP_FACTORYTRIMMING_DUMMY ((uint32_t)0xFFFFFFFF) /*!< Dummy value if trimming value could not be retrieved */ |
Kojto | 112:6f327212ef96 | 255 | |
Kojto | 112:6f327212ef96 | 256 | #define OPAMP_FACTORYTRIMMING_P ((uint32_t)0x00000000) /*!< Offset trimming P */ |
Kojto | 112:6f327212ef96 | 257 | #define OPAMP_FACTORYTRIMMING_N POSITION_VAL(OPAMP_OTR_AO1_OPT_OFFSET_TRIM_HIGH) /*!< Offset trimming N */ |
Kojto | 112:6f327212ef96 | 258 | |
Kojto | 112:6f327212ef96 | 259 | #define IS_OPAMP_FACTORYTRIMMING(TRIMMING) (((TRIMMING) == OPAMP_FACTORYTRIMMING_N) || \ |
Kojto | 112:6f327212ef96 | 260 | ((TRIMMING) == OPAMP_FACTORYTRIMMING_P) ) |
Kojto | 112:6f327212ef96 | 261 | /** |
Kojto | 112:6f327212ef96 | 262 | * @} |
Kojto | 112:6f327212ef96 | 263 | */ |
Kojto | 112:6f327212ef96 | 264 | |
Kojto | 112:6f327212ef96 | 265 | /** |
Kojto | 112:6f327212ef96 | 266 | * @} |
Kojto | 112:6f327212ef96 | 267 | */ |
Kojto | 112:6f327212ef96 | 268 | |
Kojto | 112:6f327212ef96 | 269 | /* Private constants ---------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 270 | /** @defgroup OPAMP_Private_Constants OPAMP Private Constants |
Kojto | 112:6f327212ef96 | 271 | * @{ |
Kojto | 112:6f327212ef96 | 272 | */ |
Kojto | 112:6f327212ef96 | 273 | |
Kojto | 112:6f327212ef96 | 274 | /* Offset trimming time: during calibration, minimum time needed between two */ |
Kojto | 112:6f327212ef96 | 275 | /* steps to have 1 mV accuracy. */ |
Kojto | 112:6f327212ef96 | 276 | /* Refer to datasheet, electrical characteristics: parameter tOFFTRIM Typ=1ms.*/ |
Kojto | 112:6f327212ef96 | 277 | /* Unit: ms. */ |
Kojto | 112:6f327212ef96 | 278 | #define OPAMP_TRIMMING_DELAY ((uint32_t) 1) |
Kojto | 112:6f327212ef96 | 279 | |
Kojto | 112:6f327212ef96 | 280 | /** |
Kojto | 112:6f327212ef96 | 281 | * @} |
Kojto | 112:6f327212ef96 | 282 | */ |
Kojto | 112:6f327212ef96 | 283 | |
Kojto | 112:6f327212ef96 | 284 | |
Kojto | 112:6f327212ef96 | 285 | /* Exported macros -----------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 286 | |
Kojto | 112:6f327212ef96 | 287 | /** @defgroup OPAMP_Private_Macro OPAMP Private Macro |
Kojto | 112:6f327212ef96 | 288 | * @{ |
Kojto | 112:6f327212ef96 | 289 | */ |
Kojto | 112:6f327212ef96 | 290 | |
Kojto | 112:6f327212ef96 | 291 | /** @brief Reset OPAMP handle state |
Kojto | 112:6f327212ef96 | 292 | * @param __HANDLE__: OPAMP handle. |
Kojto | 112:6f327212ef96 | 293 | * @retval None |
Kojto | 112:6f327212ef96 | 294 | */ |
Kojto | 112:6f327212ef96 | 295 | #define __HAL_OPAMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_OPAMP_STATE_RESET) |
Kojto | 112:6f327212ef96 | 296 | |
Kojto | 112:6f327212ef96 | 297 | /** |
Kojto | 112:6f327212ef96 | 298 | * @} |
Kojto | 112:6f327212ef96 | 299 | */ |
Kojto | 112:6f327212ef96 | 300 | |
Kojto | 112:6f327212ef96 | 301 | |
Kojto | 112:6f327212ef96 | 302 | /* Private macro -------------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 303 | |
Kojto | 112:6f327212ef96 | 304 | /** @defgroup OPAMP_Private_Macro OPAMP Private Macro |
Kojto | 112:6f327212ef96 | 305 | * @{ |
Kojto | 112:6f327212ef96 | 306 | */ |
Kojto | 112:6f327212ef96 | 307 | |
Kojto | 112:6f327212ef96 | 308 | /** |
Kojto | 112:6f327212ef96 | 309 | * @brief Select the OPAMP bit OPAxPD (power-down) corresponding to the |
Kojto | 112:6f327212ef96 | 310 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 311 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 312 | * @retval None |
Kojto | 112:6f327212ef96 | 313 | */ |
Kojto | 112:6f327212ef96 | 314 | #define __OPAMP_CSR_OPAXPD(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 315 | (OPAMP_CSR_OPA1PD << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 316 | |
Kojto | 112:6f327212ef96 | 317 | /** |
Kojto | 112:6f327212ef96 | 318 | * @brief Select the OPAMP bit S3SELx (switch 3) corresponding to the |
Kojto | 112:6f327212ef96 | 319 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 320 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 321 | * @retval None |
Kojto | 112:6f327212ef96 | 322 | */ |
Kojto | 112:6f327212ef96 | 323 | #define __OPAMP_CSR_S3SELX(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 324 | (OPAMP_CSR_S3SEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 325 | |
Kojto | 112:6f327212ef96 | 326 | /** |
Kojto | 112:6f327212ef96 | 327 | * @brief Select the OPAMP bit S4SELx (switch 4) corresponding to the |
Kojto | 112:6f327212ef96 | 328 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 329 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 330 | * @retval None |
Kojto | 112:6f327212ef96 | 331 | */ |
Kojto | 112:6f327212ef96 | 332 | #define __OPAMP_CSR_S4SELX(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 333 | (OPAMP_CSR_S4SEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 334 | |
Kojto | 112:6f327212ef96 | 335 | /** |
Kojto | 112:6f327212ef96 | 336 | * @brief Select the OPAMP bit S5SELx (switch 5) corresponding to the |
Kojto | 112:6f327212ef96 | 337 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 338 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 339 | * @retval None |
Kojto | 112:6f327212ef96 | 340 | */ |
Kojto | 112:6f327212ef96 | 341 | #define __OPAMP_CSR_S5SELX(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 342 | (OPAMP_CSR_S5SEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 343 | |
Kojto | 112:6f327212ef96 | 344 | /** |
Kojto | 112:6f327212ef96 | 345 | * @brief Select the OPAMP bit S3SELx (switch 6) corresponding to the |
Kojto | 112:6f327212ef96 | 346 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 347 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 348 | * @retval None |
Kojto | 112:6f327212ef96 | 349 | */ |
Kojto | 112:6f327212ef96 | 350 | #define __OPAMP_CSR_S6SELX(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 351 | (OPAMP_CSR_S6SEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 352 | |
Kojto | 112:6f327212ef96 | 353 | /** |
Kojto | 112:6f327212ef96 | 354 | * @brief Select the OPAMP bit OPAxCAL_L (offset calibration for differential |
Kojto | 112:6f327212ef96 | 355 | * pair P) corresponding to the selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 356 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 357 | * @retval None |
Kojto | 112:6f327212ef96 | 358 | */ |
Kojto | 112:6f327212ef96 | 359 | #define __OPAMP_CSR_OPAXCAL_L(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 360 | (OPAMP_CSR_OPA1CAL_L << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 361 | |
Kojto | 112:6f327212ef96 | 362 | /** |
Kojto | 112:6f327212ef96 | 363 | * @brief Select the OPAMP bit OPAxCAL_H (offset calibration for differential |
Kojto | 112:6f327212ef96 | 364 | * pair N) corresponding to the selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 365 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 366 | * @retval None |
Kojto | 112:6f327212ef96 | 367 | */ |
Kojto | 112:6f327212ef96 | 368 | #define __OPAMP_CSR_OPAXCAL_H(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 369 | (OPAMP_CSR_OPA1CAL_H << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 370 | |
Kojto | 112:6f327212ef96 | 371 | /** |
Kojto | 112:6f327212ef96 | 372 | * @brief Select the OPAMP bit OPAxLPM (low power mode) corresponding to the |
Kojto | 112:6f327212ef96 | 373 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 374 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 375 | * @retval None |
Kojto | 112:6f327212ef96 | 376 | */ |
Kojto | 112:6f327212ef96 | 377 | #define __OPAMP_CSR_OPAXLPM(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 378 | (OPAMP_CSR_OPA1LPM << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) |
Kojto | 112:6f327212ef96 | 379 | |
Kojto | 112:6f327212ef96 | 380 | /** |
Kojto | 112:6f327212ef96 | 381 | * @brief Select the OPAMP bits of all switches corresponding to the |
Kojto | 112:6f327212ef96 | 382 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 383 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 384 | * @retval None |
Kojto | 112:6f327212ef96 | 385 | */ |
Kojto | 112:6f327212ef96 | 386 | #define __OPAMP_CSR_ALL_SWITCHES(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 387 | ( ( ((__HANDLE__)->Instance != OPAMP2) \ |
Kojto | 112:6f327212ef96 | 388 | )? \ |
Kojto | 112:6f327212ef96 | 389 | ( \ |
Kojto | 112:6f327212ef96 | 390 | ((OPAMP_CSR_S3SEL1 | OPAMP_CSR_S4SEL1 | OPAMP_CSR_S5SEL1 | OPAMP_CSR_S6SEL1) << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) \ |
Kojto | 112:6f327212ef96 | 391 | | \ |
Kojto | 112:6f327212ef96 | 392 | (OPAMP_CSR_ANAWSEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__))) \ |
Kojto | 112:6f327212ef96 | 393 | ) \ |
Kojto | 112:6f327212ef96 | 394 | : \ |
Kojto | 112:6f327212ef96 | 395 | ( \ |
Kojto | 112:6f327212ef96 | 396 | ((OPAMP_CSR_S3SEL1 | OPAMP_CSR_S4SEL1 | OPAMP_CSR_S5SEL1 | OPAMP_CSR_S6SEL1) << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__) * OPAMP_CSR_INSTANCE_OFFSET)) \ |
Kojto | 112:6f327212ef96 | 397 | | \ |
Kojto | 112:6f327212ef96 | 398 | (OPAMP_CSR_ANAWSEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__))) \ |
Kojto | 112:6f327212ef96 | 399 | | \ |
Kojto | 112:6f327212ef96 | 400 | (OPAMP_CSR_S7SEL2) \ |
Kojto | 112:6f327212ef96 | 401 | ) \ |
Kojto | 112:6f327212ef96 | 402 | ) |
Kojto | 112:6f327212ef96 | 403 | |
Kojto | 112:6f327212ef96 | 404 | /** |
Kojto | 112:6f327212ef96 | 405 | * @brief Select the OPAMP bit ANAWSELx (switch SanA) corresponding to the |
Kojto | 112:6f327212ef96 | 406 | * selected OPAMP instance. |
Kojto | 112:6f327212ef96 | 407 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 408 | * @retval None |
Kojto | 112:6f327212ef96 | 409 | */ |
Kojto | 112:6f327212ef96 | 410 | #define __OPAMP_CSR_ANAWSELX(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 411 | (OPAMP_CSR_ANAWSEL1 << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__))) |
Kojto | 112:6f327212ef96 | 412 | |
Kojto | 112:6f327212ef96 | 413 | /** |
Kojto | 112:6f327212ef96 | 414 | * @brief Select the OPAMP bit OPAxCALOUT in function of the selected |
Kojto | 112:6f327212ef96 | 415 | * OPAMP instance. |
Kojto | 112:6f327212ef96 | 416 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 417 | * @retval None |
Kojto | 112:6f327212ef96 | 418 | */ |
Kojto | 112:6f327212ef96 | 419 | #define __OPAMP_CSR_OPAXCALOUT(__HANDLE__) \ |
Kojto | 112:6f327212ef96 | 420 | (OPAMP_CSR_OPA1CALOUT << (__OPAMP_INSTANCE_DECIMAL__(__HANDLE__))) |
Kojto | 112:6f327212ef96 | 421 | |
Kojto | 112:6f327212ef96 | 422 | /** |
Kojto | 112:6f327212ef96 | 423 | * @brief Select the OPAMP trimming bits position value (position of LSB) |
Kojto | 112:6f327212ef96 | 424 | * in register OPAMP_OTR or register OPAMP_LPOTR in function of the selected |
Kojto | 112:6f327212ef96 | 425 | * OPAMP instance and the transistors differential pair high (PMOS) or |
Kojto | 112:6f327212ef96 | 426 | * low (NMOS). |
Kojto | 112:6f327212ef96 | 427 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 428 | * @param __TRIM_HIGH_LOW__: transistors differential pair high or low. |
Kojto | 112:6f327212ef96 | 429 | * Must be a value of @ref OPAMP_FactoryTrimming. |
Kojto | 112:6f327212ef96 | 430 | * @retval None |
Kojto | 112:6f327212ef96 | 431 | */ |
Kojto | 112:6f327212ef96 | 432 | #define __OPAMP_OFFSET_TRIM_BITSPOSITION(__HANDLE__, __TRIM_HIGH_LOW__) \ |
Kojto | 112:6f327212ef96 | 433 | ((__OPAMP_INSTANCE_DECIMAL__((__HANDLE__)) * OPAMP_OTR_INSTANCE_OFFSET) + (__TRIM_HIGH_LOW__)) |
Kojto | 112:6f327212ef96 | 434 | |
Kojto | 112:6f327212ef96 | 435 | /** |
Kojto | 112:6f327212ef96 | 436 | * @brief Shift the OPAMP trimming bits to register OPAMP_OTR or register |
Kojto | 112:6f327212ef96 | 437 | * OPAMP_LPOTR in function of the selected OPAMP instance and the transistors |
Kojto | 112:6f327212ef96 | 438 | * differential pair high (PMOS) or low (NMOS). |
Kojto | 112:6f327212ef96 | 439 | * @param __HANDLE__: OPAMP handle |
Kojto | 112:6f327212ef96 | 440 | * @param __TRIM_HIGH_LOW__: transistors differential pair high or low. |
Kojto | 112:6f327212ef96 | 441 | * Must be a value of @ref OPAMP_FactoryTrimming. |
Kojto | 112:6f327212ef96 | 442 | * @param __TRIMMING_VALUE__: Trimming value |
Kojto | 112:6f327212ef96 | 443 | * @retval None |
Kojto | 112:6f327212ef96 | 444 | */ |
Kojto | 112:6f327212ef96 | 445 | #define __OPAMP_OFFSET_TRIM_SET(__HANDLE__, __TRIM_HIGH_LOW__, __TRIMMING_VALUE__) \ |
Kojto | 112:6f327212ef96 | 446 | ((__TRIMMING_VALUE__) << (__OPAMP_OFFSET_TRIM_BITSPOSITION((__HANDLE__), (__TRIM_HIGH_LOW__)))) |
Kojto | 112:6f327212ef96 | 447 | |
Kojto | 112:6f327212ef96 | 448 | /** |
Kojto | 112:6f327212ef96 | 449 | * @brief Check that trimming value is within correct range |
Kojto | 112:6f327212ef96 | 450 | * @param TRIMMINGVALUE: OPAMP trimming value |
Kojto | 112:6f327212ef96 | 451 | * @retval None |
Kojto | 112:6f327212ef96 | 452 | */ |
Kojto | 112:6f327212ef96 | 453 | #define IS_OPAMP_TRIMMINGVALUE(TRIMMINGVALUE) ((TRIMMINGVALUE) <= 0x1E) |
Kojto | 112:6f327212ef96 | 454 | |
Kojto | 112:6f327212ef96 | 455 | /** |
Kojto | 112:6f327212ef96 | 456 | * @} |
Kojto | 112:6f327212ef96 | 457 | */ |
Kojto | 112:6f327212ef96 | 458 | |
Kojto | 112:6f327212ef96 | 459 | |
Kojto | 112:6f327212ef96 | 460 | /* Include OPAMP HAL Extension module */ |
Kojto | 112:6f327212ef96 | 461 | #include "stm32l1xx_hal_opamp_ex.h" |
Kojto | 112:6f327212ef96 | 462 | |
Kojto | 112:6f327212ef96 | 463 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 112:6f327212ef96 | 464 | |
Kojto | 112:6f327212ef96 | 465 | /** @addtogroup OPAMP_Exported_Functions |
Kojto | 112:6f327212ef96 | 466 | * @{ |
Kojto | 112:6f327212ef96 | 467 | */ |
Kojto | 112:6f327212ef96 | 468 | |
Kojto | 112:6f327212ef96 | 469 | /** @addtogroup OPAMP_Exported_Functions_Group1 |
Kojto | 112:6f327212ef96 | 470 | * @{ |
Kojto | 112:6f327212ef96 | 471 | */ |
Kojto | 112:6f327212ef96 | 472 | /* Initialization/de-initialization functions **********************************/ |
Kojto | 112:6f327212ef96 | 473 | HAL_StatusTypeDef HAL_OPAMP_Init(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 474 | HAL_StatusTypeDef HAL_OPAMP_DeInit (OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 475 | void HAL_OPAMP_MspInit(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 476 | void HAL_OPAMP_MspDeInit(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 477 | /** |
Kojto | 112:6f327212ef96 | 478 | * @} |
Kojto | 112:6f327212ef96 | 479 | */ |
Kojto | 112:6f327212ef96 | 480 | |
Kojto | 112:6f327212ef96 | 481 | /** @addtogroup OPAMP_Exported_Functions_Group2 |
Kojto | 112:6f327212ef96 | 482 | * @{ |
Kojto | 112:6f327212ef96 | 483 | */ |
Kojto | 112:6f327212ef96 | 484 | /* I/O operation functions *****************************************************/ |
Kojto | 112:6f327212ef96 | 485 | HAL_StatusTypeDef HAL_OPAMP_Start(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 486 | HAL_StatusTypeDef HAL_OPAMP_Stop(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 487 | HAL_StatusTypeDef HAL_OPAMP_SelfCalibrate(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 488 | OPAMP_TrimmingValueTypeDef HAL_OPAMP_GetTrimOffset (OPAMP_HandleTypeDef *hopamp, uint32_t trimmingoffset); |
Kojto | 112:6f327212ef96 | 489 | /** |
Kojto | 112:6f327212ef96 | 490 | * @} |
Kojto | 112:6f327212ef96 | 491 | */ |
Kojto | 112:6f327212ef96 | 492 | |
Kojto | 112:6f327212ef96 | 493 | /** @addtogroup OPAMP_Exported_Functions_Group3 |
Kojto | 112:6f327212ef96 | 494 | * @{ |
Kojto | 112:6f327212ef96 | 495 | */ |
Kojto | 112:6f327212ef96 | 496 | /* Peripheral Control functions ************************************************/ |
Kojto | 112:6f327212ef96 | 497 | HAL_StatusTypeDef HAL_OPAMP_Lock(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 498 | /** |
Kojto | 112:6f327212ef96 | 499 | * @} |
Kojto | 112:6f327212ef96 | 500 | */ |
Kojto | 112:6f327212ef96 | 501 | |
Kojto | 112:6f327212ef96 | 502 | /** @addtogroup OPAMP_Exported_Functions_Group4 |
Kojto | 112:6f327212ef96 | 503 | * @{ |
Kojto | 112:6f327212ef96 | 504 | */ |
Kojto | 112:6f327212ef96 | 505 | /* Peripheral State functions **************************************************/ |
Kojto | 112:6f327212ef96 | 506 | HAL_OPAMP_StateTypeDef HAL_OPAMP_GetState(OPAMP_HandleTypeDef *hopamp); |
Kojto | 112:6f327212ef96 | 507 | /** |
Kojto | 112:6f327212ef96 | 508 | * @} |
Kojto | 112:6f327212ef96 | 509 | */ |
Kojto | 112:6f327212ef96 | 510 | |
Kojto | 112:6f327212ef96 | 511 | /** |
Kojto | 112:6f327212ef96 | 512 | * @} |
Kojto | 112:6f327212ef96 | 513 | */ |
Kojto | 112:6f327212ef96 | 514 | |
Kojto | 112:6f327212ef96 | 515 | |
Kojto | 112:6f327212ef96 | 516 | |
Kojto | 112:6f327212ef96 | 517 | |
Kojto | 112:6f327212ef96 | 518 | /** |
Kojto | 112:6f327212ef96 | 519 | * @} |
Kojto | 112:6f327212ef96 | 520 | */ |
Kojto | 112:6f327212ef96 | 521 | |
Kojto | 112:6f327212ef96 | 522 | /** |
Kojto | 112:6f327212ef96 | 523 | * @} |
Kojto | 112:6f327212ef96 | 524 | */ |
Kojto | 112:6f327212ef96 | 525 | |
Kojto | 112:6f327212ef96 | 526 | #endif /* STM32L151xCA || STM32L151xD || STM32L152xCA || STM32L152xD || STM32L162xCA || STM32L162xD || STM32L151xE || STM32L152xE || STM32L162xE || STM32L162xC || STM32L152xC || STM32L151xC */ |
Kojto | 112:6f327212ef96 | 527 | #ifdef __cplusplus |
Kojto | 112:6f327212ef96 | 528 | } |
Kojto | 112:6f327212ef96 | 529 | #endif |
Kojto | 112:6f327212ef96 | 530 | |
Kojto | 112:6f327212ef96 | 531 | #endif /* __STM32L1xx_HAL_OPAMP_H */ |
Kojto | 112:6f327212ef96 | 532 | |
Kojto | 112:6f327212ef96 | 533 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |