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