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