version_2.0
Dependents: cc3000_ping_demo_try_2
Fork of mbed by
TARGET_NUCLEO_F302R8/stm32f30x_opamp.h@82:6473597d706e, 2014-04-07 (annotated)
- Committer:
- bogdanm
- Date:
- Mon Apr 07 18:28:36 2014 +0100
- Revision:
- 82:6473597d706e
Release 82 of the mbed library
Main changes:
- support for K64F
- Revisited Nordic code structure
- Test infrastructure improvements
- various bug fixes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 82:6473597d706e | 1 | /** |
bogdanm | 82:6473597d706e | 2 | ****************************************************************************** |
bogdanm | 82:6473597d706e | 3 | * @file stm32f30x_opamp.h |
bogdanm | 82:6473597d706e | 4 | * @author MCD Application Team |
bogdanm | 82:6473597d706e | 5 | * @version V1.1.0 |
bogdanm | 82:6473597d706e | 6 | * @date 27-February-2014 |
bogdanm | 82:6473597d706e | 7 | * @brief This file contains all the functions prototypes for the operational |
bogdanm | 82:6473597d706e | 8 | * amplifiers (OPAMP) firmware library. |
bogdanm | 82:6473597d706e | 9 | ****************************************************************************** |
bogdanm | 82:6473597d706e | 10 | * @attention |
bogdanm | 82:6473597d706e | 11 | * |
bogdanm | 82:6473597d706e | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
bogdanm | 82:6473597d706e | 13 | * |
bogdanm | 82:6473597d706e | 14 | * Redistribution and use in source and binary forms, with or without modification, |
bogdanm | 82:6473597d706e | 15 | * are permitted provided that the following conditions are met: |
bogdanm | 82:6473597d706e | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
bogdanm | 82:6473597d706e | 17 | * this list of conditions and the following disclaimer. |
bogdanm | 82:6473597d706e | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bogdanm | 82:6473597d706e | 19 | * this list of conditions and the following disclaimer in the documentation |
bogdanm | 82:6473597d706e | 20 | * and/or other materials provided with the distribution. |
bogdanm | 82:6473597d706e | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bogdanm | 82:6473597d706e | 22 | * may be used to endorse or promote products derived from this software |
bogdanm | 82:6473597d706e | 23 | * without specific prior written permission. |
bogdanm | 82:6473597d706e | 24 | * |
bogdanm | 82:6473597d706e | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bogdanm | 82:6473597d706e | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bogdanm | 82:6473597d706e | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bogdanm | 82:6473597d706e | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bogdanm | 82:6473597d706e | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bogdanm | 82:6473597d706e | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bogdanm | 82:6473597d706e | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bogdanm | 82:6473597d706e | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bogdanm | 82:6473597d706e | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bogdanm | 82:6473597d706e | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bogdanm | 82:6473597d706e | 35 | * |
bogdanm | 82:6473597d706e | 36 | ****************************************************************************** |
bogdanm | 82:6473597d706e | 37 | */ |
bogdanm | 82:6473597d706e | 38 | |
bogdanm | 82:6473597d706e | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 82:6473597d706e | 40 | #ifndef __STM32F30x_OPAMP_H |
bogdanm | 82:6473597d706e | 41 | #define __STM32F30x_OPAMP_H |
bogdanm | 82:6473597d706e | 42 | |
bogdanm | 82:6473597d706e | 43 | #ifdef __cplusplus |
bogdanm | 82:6473597d706e | 44 | extern "C" { |
bogdanm | 82:6473597d706e | 45 | #endif |
bogdanm | 82:6473597d706e | 46 | |
bogdanm | 82:6473597d706e | 47 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 82:6473597d706e | 48 | #include "stm32f30x.h" |
bogdanm | 82:6473597d706e | 49 | |
bogdanm | 82:6473597d706e | 50 | /** @addtogroup STM32F30x_StdPeriph_Driver |
bogdanm | 82:6473597d706e | 51 | * @{ |
bogdanm | 82:6473597d706e | 52 | */ |
bogdanm | 82:6473597d706e | 53 | |
bogdanm | 82:6473597d706e | 54 | /** @addtogroup OPAMP |
bogdanm | 82:6473597d706e | 55 | * @{ |
bogdanm | 82:6473597d706e | 56 | */ |
bogdanm | 82:6473597d706e | 57 | |
bogdanm | 82:6473597d706e | 58 | /* Exported types ------------------------------------------------------------*/ |
bogdanm | 82:6473597d706e | 59 | |
bogdanm | 82:6473597d706e | 60 | /** |
bogdanm | 82:6473597d706e | 61 | * @brief OPAMP Init structure definition |
bogdanm | 82:6473597d706e | 62 | */ |
bogdanm | 82:6473597d706e | 63 | |
bogdanm | 82:6473597d706e | 64 | typedef struct |
bogdanm | 82:6473597d706e | 65 | { |
bogdanm | 82:6473597d706e | 66 | |
bogdanm | 82:6473597d706e | 67 | uint32_t OPAMP_InvertingInput; /*!< Selects the inverting input of the operational amplifier. |
bogdanm | 82:6473597d706e | 68 | This parameter can be a value of @ref OPAMP_InvertingInput */ |
bogdanm | 82:6473597d706e | 69 | |
bogdanm | 82:6473597d706e | 70 | uint32_t OPAMP_NonInvertingInput; /*!< Selects the non inverting input of the operational amplifier. |
bogdanm | 82:6473597d706e | 71 | This parameter can be a value of @ref OPAMP_NonInvertingInput */ |
bogdanm | 82:6473597d706e | 72 | |
bogdanm | 82:6473597d706e | 73 | }OPAMP_InitTypeDef; |
bogdanm | 82:6473597d706e | 74 | |
bogdanm | 82:6473597d706e | 75 | /* Exported constants --------------------------------------------------------*/ |
bogdanm | 82:6473597d706e | 76 | |
bogdanm | 82:6473597d706e | 77 | /** @defgroup OPAMP_Exported_Constants |
bogdanm | 82:6473597d706e | 78 | * @{ |
bogdanm | 82:6473597d706e | 79 | */ |
bogdanm | 82:6473597d706e | 80 | |
bogdanm | 82:6473597d706e | 81 | /** @defgroup OPAMP_Selection |
bogdanm | 82:6473597d706e | 82 | * @{ |
bogdanm | 82:6473597d706e | 83 | */ |
bogdanm | 82:6473597d706e | 84 | |
bogdanm | 82:6473597d706e | 85 | #define OPAMP_Selection_OPAMP1 ((uint32_t)0x00000000) /*!< OPAMP1 Selection */ |
bogdanm | 82:6473597d706e | 86 | #define OPAMP_Selection_OPAMP2 ((uint32_t)0x00000004) /*!< OPAMP2 Selection */ |
bogdanm | 82:6473597d706e | 87 | #define OPAMP_Selection_OPAMP3 ((uint32_t)0x00000008) /*!< OPAMP3 Selection */ |
bogdanm | 82:6473597d706e | 88 | #define OPAMP_Selection_OPAMP4 ((uint32_t)0x0000000C) /*!< OPAMP4 Selection */ |
bogdanm | 82:6473597d706e | 89 | |
bogdanm | 82:6473597d706e | 90 | #define IS_OPAMP_ALL_PERIPH(PERIPH) (((PERIPH) == OPAMP_Selection_OPAMP1) || \ |
bogdanm | 82:6473597d706e | 91 | ((PERIPH) == OPAMP_Selection_OPAMP2) || \ |
bogdanm | 82:6473597d706e | 92 | ((PERIPH) == OPAMP_Selection_OPAMP3) || \ |
bogdanm | 82:6473597d706e | 93 | ((PERIPH) == OPAMP_Selection_OPAMP4)) |
bogdanm | 82:6473597d706e | 94 | |
bogdanm | 82:6473597d706e | 95 | /** |
bogdanm | 82:6473597d706e | 96 | * @} |
bogdanm | 82:6473597d706e | 97 | */ |
bogdanm | 82:6473597d706e | 98 | |
bogdanm | 82:6473597d706e | 99 | /** @defgroup OPAMP_InvertingInput |
bogdanm | 82:6473597d706e | 100 | * @{ |
bogdanm | 82:6473597d706e | 101 | */ |
bogdanm | 82:6473597d706e | 102 | |
bogdanm | 82:6473597d706e | 103 | #define OPAMP_InvertingInput_IO1 ((uint32_t)0x00000000) /*!< IO1 (PC5 for OPAMP1 and OPAMP2, PB10 for OPAMP3 and OPAMP4) |
bogdanm | 82:6473597d706e | 104 | connected to OPAMPx inverting input */ |
bogdanm | 82:6473597d706e | 105 | #define OPAMP_InvertingInput_IO2 OPAMP_CSR_VMSEL_0 /*!< IO2 (PA3 for OPAMP1, PA5 for OPAMP2, PB2 for OPAMP3, PD8 for OPAMP4) |
bogdanm | 82:6473597d706e | 106 | connected to OPAMPx inverting input */ |
bogdanm | 82:6473597d706e | 107 | #define OPAMP_InvertingInput_PGA OPAMP_CSR_VMSEL_1 /*!< Resistor feedback output connected to OPAMPx inverting input (PGA mode) */ |
bogdanm | 82:6473597d706e | 108 | #define OPAMP_InvertingInput_Vout OPAMP_CSR_VMSEL /*!< Vout connected to OPAMPx inverting input (follower mode) */ |
bogdanm | 82:6473597d706e | 109 | |
bogdanm | 82:6473597d706e | 110 | #define IS_OPAMP_INVERTING_INPUT(INPUT) (((INPUT) == OPAMP_InvertingInput_IO1) || \ |
bogdanm | 82:6473597d706e | 111 | ((INPUT) == OPAMP_InvertingInput_IO2) || \ |
bogdanm | 82:6473597d706e | 112 | ((INPUT) == OPAMP_InvertingInput_PGA) || \ |
bogdanm | 82:6473597d706e | 113 | ((INPUT) == OPAMP_InvertingInput_Vout)) |
bogdanm | 82:6473597d706e | 114 | /** |
bogdanm | 82:6473597d706e | 115 | * @} |
bogdanm | 82:6473597d706e | 116 | */ |
bogdanm | 82:6473597d706e | 117 | |
bogdanm | 82:6473597d706e | 118 | /** @defgroup OPAMP_NonInvertingInput |
bogdanm | 82:6473597d706e | 119 | * @{ |
bogdanm | 82:6473597d706e | 120 | */ |
bogdanm | 82:6473597d706e | 121 | |
bogdanm | 82:6473597d706e | 122 | #define OPAMP_NonInvertingInput_IO1 ((uint32_t)0x00000000) /*!< IO1 (PA7 for OPAMP1, PD14 for OPAMP2, PB13 for OPAMP3, PD11 for OPAMP4) |
bogdanm | 82:6473597d706e | 123 | connected to OPAMPx non inverting input */ |
bogdanm | 82:6473597d706e | 124 | #define OPAMP_NonInvertingInput_IO2 OPAMP_CSR_VPSEL_0 /*!< IO2 (PA5 for OPAMP1, PB14 for OPAMP2, PA5 for OPAMP3, PB11 for OPAMP4) |
bogdanm | 82:6473597d706e | 125 | connected to OPAMPx non inverting input */ |
bogdanm | 82:6473597d706e | 126 | #define OPAMP_NonInvertingInput_IO3 OPAMP_CSR_VPSEL_1 /*!< IO3 (PA3 for OPAMP1, PB0 for OPAMP2, PA1 for OPAMP3, PA4 for OPAMP4) |
bogdanm | 82:6473597d706e | 127 | connected to OPAMPx non inverting input */ |
bogdanm | 82:6473597d706e | 128 | #define OPAMP_NonInvertingInput_IO4 OPAMP_CSR_VPSEL /*!< IO4 (PA1 for OPAMP1, PA7 for OPAMP2, PB0 for OPAMP3, PB13 for OPAMP4) |
bogdanm | 82:6473597d706e | 129 | connected to OPAMPx non inverting input */ |
bogdanm | 82:6473597d706e | 130 | |
bogdanm | 82:6473597d706e | 131 | #define IS_OPAMP_NONINVERTING_INPUT(INPUT) (((INPUT) == OPAMP_NonInvertingInput_IO1) || \ |
bogdanm | 82:6473597d706e | 132 | ((INPUT) == OPAMP_NonInvertingInput_IO2) || \ |
bogdanm | 82:6473597d706e | 133 | ((INPUT) == OPAMP_NonInvertingInput_IO3) || \ |
bogdanm | 82:6473597d706e | 134 | ((INPUT) == OPAMP_NonInvertingInput_IO4)) |
bogdanm | 82:6473597d706e | 135 | /** |
bogdanm | 82:6473597d706e | 136 | * @} |
bogdanm | 82:6473597d706e | 137 | */ |
bogdanm | 82:6473597d706e | 138 | |
bogdanm | 82:6473597d706e | 139 | /** @defgroup OPAMP_PGAGain_Config |
bogdanm | 82:6473597d706e | 140 | * @{ |
bogdanm | 82:6473597d706e | 141 | */ |
bogdanm | 82:6473597d706e | 142 | |
bogdanm | 82:6473597d706e | 143 | #define OPAMP_OPAMP_PGAGain_2 ((uint32_t)0x00000000) |
bogdanm | 82:6473597d706e | 144 | #define OPAMP_OPAMP_PGAGain_4 OPAMP_CSR_PGGAIN_0 |
bogdanm | 82:6473597d706e | 145 | #define OPAMP_OPAMP_PGAGain_8 OPAMP_CSR_PGGAIN_1 |
bogdanm | 82:6473597d706e | 146 | #define OPAMP_OPAMP_PGAGain_16 ((uint32_t)0x0000C000) |
bogdanm | 82:6473597d706e | 147 | |
bogdanm | 82:6473597d706e | 148 | #define IS_OPAMP_PGAGAIN(GAIN) (((GAIN) == OPAMP_OPAMP_PGAGain_2) || \ |
bogdanm | 82:6473597d706e | 149 | ((GAIN) == OPAMP_OPAMP_PGAGain_4) || \ |
bogdanm | 82:6473597d706e | 150 | ((GAIN) == OPAMP_OPAMP_PGAGain_8) || \ |
bogdanm | 82:6473597d706e | 151 | ((GAIN) == OPAMP_OPAMP_PGAGain_16)) |
bogdanm | 82:6473597d706e | 152 | /** |
bogdanm | 82:6473597d706e | 153 | * @} |
bogdanm | 82:6473597d706e | 154 | */ |
bogdanm | 82:6473597d706e | 155 | |
bogdanm | 82:6473597d706e | 156 | /** @defgroup OPAMP_PGAConnect_Config |
bogdanm | 82:6473597d706e | 157 | * @{ |
bogdanm | 82:6473597d706e | 158 | */ |
bogdanm | 82:6473597d706e | 159 | |
bogdanm | 82:6473597d706e | 160 | #define OPAMP_PGAConnect_No ((uint32_t)0x00000000) |
bogdanm | 82:6473597d706e | 161 | #define OPAMP_PGAConnect_IO1 OPAMP_CSR_PGGAIN_3 |
bogdanm | 82:6473597d706e | 162 | #define OPAMP_PGAConnect_IO2 ((uint32_t)0x00030000) |
bogdanm | 82:6473597d706e | 163 | |
bogdanm | 82:6473597d706e | 164 | #define IS_OPAMP_PGACONNECT(CONNECT) (((CONNECT) == OPAMP_PGAConnect_No) || \ |
bogdanm | 82:6473597d706e | 165 | ((CONNECT) == OPAMP_PGAConnect_IO1) || \ |
bogdanm | 82:6473597d706e | 166 | ((CONNECT) == OPAMP_PGAConnect_IO2)) |
bogdanm | 82:6473597d706e | 167 | /** |
bogdanm | 82:6473597d706e | 168 | * @} |
bogdanm | 82:6473597d706e | 169 | */ |
bogdanm | 82:6473597d706e | 170 | |
bogdanm | 82:6473597d706e | 171 | /** @defgroup OPAMP_SecondaryInvertingInput |
bogdanm | 82:6473597d706e | 172 | * @{ |
bogdanm | 82:6473597d706e | 173 | */ |
bogdanm | 82:6473597d706e | 174 | |
bogdanm | 82:6473597d706e | 175 | #define IS_OPAMP_SECONDARY_INVINPUT(INVINPUT) (((INVINPUT) == OPAMP_InvertingInput_IO1) || \ |
bogdanm | 82:6473597d706e | 176 | ((INVINPUT) == OPAMP_InvertingInput_IO2)) |
bogdanm | 82:6473597d706e | 177 | /** |
bogdanm | 82:6473597d706e | 178 | * @} |
bogdanm | 82:6473597d706e | 179 | */ |
bogdanm | 82:6473597d706e | 180 | |
bogdanm | 82:6473597d706e | 181 | /** @defgroup OPAMP_Input |
bogdanm | 82:6473597d706e | 182 | * @{ |
bogdanm | 82:6473597d706e | 183 | */ |
bogdanm | 82:6473597d706e | 184 | |
bogdanm | 82:6473597d706e | 185 | #define OPAMP_Input_Inverting ((uint32_t)0x00000018) /*!< Inverting input */ |
bogdanm | 82:6473597d706e | 186 | #define OPAMP_Input_NonInverting ((uint32_t)0x00000013) /*!< Non inverting input */ |
bogdanm | 82:6473597d706e | 187 | |
bogdanm | 82:6473597d706e | 188 | #define IS_OPAMP_INPUT(INPUT) (((INPUT) == OPAMP_Input_Inverting) || \ |
bogdanm | 82:6473597d706e | 189 | ((INPUT) == OPAMP_Input_NonInverting)) |
bogdanm | 82:6473597d706e | 190 | |
bogdanm | 82:6473597d706e | 191 | /** |
bogdanm | 82:6473597d706e | 192 | * @} |
bogdanm | 82:6473597d706e | 193 | */ |
bogdanm | 82:6473597d706e | 194 | |
bogdanm | 82:6473597d706e | 195 | /** @defgroup OPAMP_Vref |
bogdanm | 82:6473597d706e | 196 | * @{ |
bogdanm | 82:6473597d706e | 197 | */ |
bogdanm | 82:6473597d706e | 198 | |
bogdanm | 82:6473597d706e | 199 | #define OPAMP_Vref_3VDDA ((uint32_t)0x00000000) /*!< OPMAP Vref = 3.3% VDDA */ |
bogdanm | 82:6473597d706e | 200 | #define OPAMP_Vref_10VDDA OPAMP_CSR_CALSEL_0 /*!< OPMAP Vref = 10% VDDA */ |
bogdanm | 82:6473597d706e | 201 | #define OPAMP_Vref_50VDDA OPAMP_CSR_CALSEL_1 /*!< OPMAP Vref = 50% VDDA */ |
bogdanm | 82:6473597d706e | 202 | #define OPAMP_Vref_90VDDA OPAMP_CSR_CALSEL /*!< OPMAP Vref = 90% VDDA */ |
bogdanm | 82:6473597d706e | 203 | |
bogdanm | 82:6473597d706e | 204 | #define IS_OPAMP_VREF(VREF) (((VREF) == OPAMP_Vref_3VDDA) || \ |
bogdanm | 82:6473597d706e | 205 | ((VREF) == OPAMP_Vref_10VDDA) || \ |
bogdanm | 82:6473597d706e | 206 | ((VREF) == OPAMP_Vref_50VDDA) || \ |
bogdanm | 82:6473597d706e | 207 | ((VREF) == OPAMP_Vref_90VDDA)) |
bogdanm | 82:6473597d706e | 208 | |
bogdanm | 82:6473597d706e | 209 | /** |
bogdanm | 82:6473597d706e | 210 | * @} |
bogdanm | 82:6473597d706e | 211 | */ |
bogdanm | 82:6473597d706e | 212 | |
bogdanm | 82:6473597d706e | 213 | /** @defgroup OPAMP_Trimming |
bogdanm | 82:6473597d706e | 214 | */ |
bogdanm | 82:6473597d706e | 215 | |
bogdanm | 82:6473597d706e | 216 | #define OPAMP_Trimming_Factory ((uint32_t)0x00000000) /*!< Factory trimming */ |
bogdanm | 82:6473597d706e | 217 | #define OPAMP_Trimming_User OPAMP_CSR_USERTRIM /*!< User trimming */ |
bogdanm | 82:6473597d706e | 218 | |
bogdanm | 82:6473597d706e | 219 | #define IS_OPAMP_TRIMMING(TRIMMING) (((TRIMMING) == OPAMP_Trimming_Factory) || \ |
bogdanm | 82:6473597d706e | 220 | ((TRIMMING) == OPAMP_Trimming_User)) |
bogdanm | 82:6473597d706e | 221 | |
bogdanm | 82:6473597d706e | 222 | /** |
bogdanm | 82:6473597d706e | 223 | * @} |
bogdanm | 82:6473597d706e | 224 | */ |
bogdanm | 82:6473597d706e | 225 | |
bogdanm | 82:6473597d706e | 226 | /** @defgroup OPAMP_TrimValue |
bogdanm | 82:6473597d706e | 227 | * @{ |
bogdanm | 82:6473597d706e | 228 | */ |
bogdanm | 82:6473597d706e | 229 | |
bogdanm | 82:6473597d706e | 230 | #define IS_OPAMP_TRIMMINGVALUE(VALUE) ((VALUE) <= 0x0000001F) /*!< Trimming value */ |
bogdanm | 82:6473597d706e | 231 | |
bogdanm | 82:6473597d706e | 232 | /** |
bogdanm | 82:6473597d706e | 233 | * @} |
bogdanm | 82:6473597d706e | 234 | */ |
bogdanm | 82:6473597d706e | 235 | |
bogdanm | 82:6473597d706e | 236 | /** @defgroup OPAMP_OutputLevel |
bogdanm | 82:6473597d706e | 237 | * @{ |
bogdanm | 82:6473597d706e | 238 | */ |
bogdanm | 82:6473597d706e | 239 | |
bogdanm | 82:6473597d706e | 240 | #define OPAMP_OutputLevel_High OPAMP_CSR_OUTCAL |
bogdanm | 82:6473597d706e | 241 | #define OPAMP_OutputLevel_Low ((uint32_t)0x00000000) |
bogdanm | 82:6473597d706e | 242 | |
bogdanm | 82:6473597d706e | 243 | /** |
bogdanm | 82:6473597d706e | 244 | * @} |
bogdanm | 82:6473597d706e | 245 | */ |
bogdanm | 82:6473597d706e | 246 | |
bogdanm | 82:6473597d706e | 247 | /* Exported macro ------------------------------------------------------------*/ |
bogdanm | 82:6473597d706e | 248 | /* Exported functions ------------------------------------------------------- */ |
bogdanm | 82:6473597d706e | 249 | |
bogdanm | 82:6473597d706e | 250 | /* Function used to set the OPAMP configuration to the default reset state ***/ |
bogdanm | 82:6473597d706e | 251 | void OPAMP_DeInit(uint32_t OPAMP_Selection); |
bogdanm | 82:6473597d706e | 252 | |
bogdanm | 82:6473597d706e | 253 | /* Initialization and Configuration functions *********************************/ |
bogdanm | 82:6473597d706e | 254 | void OPAMP_Init(uint32_t OPAMP_Selection, OPAMP_InitTypeDef* OPAMP_InitStruct); |
bogdanm | 82:6473597d706e | 255 | void OPAMP_StructInit(OPAMP_InitTypeDef* OPAMP_InitStruct); |
bogdanm | 82:6473597d706e | 256 | void OPAMP_PGAConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_PGAGain, uint32_t OPAMP_PGAConnect); |
bogdanm | 82:6473597d706e | 257 | void OPAMP_VrefConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_Vref); |
bogdanm | 82:6473597d706e | 258 | void OPAMP_VrefConnectADCCmd(uint32_t OPAMP_Selection, FunctionalState NewState); |
bogdanm | 82:6473597d706e | 259 | void OPAMP_TimerControlledMuxConfig(uint32_t OPAMP_Selection, OPAMP_InitTypeDef* OPAMP_InitStruct); |
bogdanm | 82:6473597d706e | 260 | void OPAMP_TimerControlledMuxCmd(uint32_t OPAMP_Selection, FunctionalState NewState); |
bogdanm | 82:6473597d706e | 261 | void OPAMP_Cmd(uint32_t OPAMP_Selection, FunctionalState NewState); |
bogdanm | 82:6473597d706e | 262 | uint32_t OPAMP_GetOutputLevel(uint32_t OPAMP_Selection); |
bogdanm | 82:6473597d706e | 263 | |
bogdanm | 82:6473597d706e | 264 | /* Calibration functions ******************************************************/ |
bogdanm | 82:6473597d706e | 265 | void OPAMP_VrefConnectNonInvertingInput(uint32_t OPAMP_Selection, FunctionalState NewState); |
bogdanm | 82:6473597d706e | 266 | void OPAMP_OffsetTrimModeSelect(uint32_t OPAMP_Selection, uint32_t OPAMP_Trimming); |
bogdanm | 82:6473597d706e | 267 | void OPAMP_OffsetTrimConfig(uint32_t OPAMP_Selection, uint32_t OPAMP_Input, uint32_t OPAMP_TrimValue); |
bogdanm | 82:6473597d706e | 268 | void OPAMP_StartCalibration(uint32_t OPAMP_Selection, FunctionalState NewState); |
bogdanm | 82:6473597d706e | 269 | |
bogdanm | 82:6473597d706e | 270 | /* OPAMP configuration locking function ***************************************/ |
bogdanm | 82:6473597d706e | 271 | void OPAMP_LockConfig(uint32_t OPAMP_Selection); |
bogdanm | 82:6473597d706e | 272 | |
bogdanm | 82:6473597d706e | 273 | #ifdef __cplusplus |
bogdanm | 82:6473597d706e | 274 | } |
bogdanm | 82:6473597d706e | 275 | #endif |
bogdanm | 82:6473597d706e | 276 | |
bogdanm | 82:6473597d706e | 277 | #endif /*__STM32F30x_OPAMP_H */ |
bogdanm | 82:6473597d706e | 278 | |
bogdanm | 82:6473597d706e | 279 | /** |
bogdanm | 82:6473597d706e | 280 | * @} |
bogdanm | 82:6473597d706e | 281 | */ |
bogdanm | 82:6473597d706e | 282 | |
bogdanm | 82:6473597d706e | 283 | /** |
bogdanm | 82:6473597d706e | 284 | * @} |
bogdanm | 82:6473597d706e | 285 | */ |
bogdanm | 82:6473597d706e | 286 | |
bogdanm | 82:6473597d706e | 287 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |