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