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