stm32f3xx_hal_opamp.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. /**
  2. ******************************************************************************
  3. * @file stm32f3xx_hal_opamp.h
  4. * @author MCD Application Team
  5. * @brief Header file of OPAMP HAL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  10. *
  11. * Redistribution and use in source and binary forms, with or without modification,
  12. * are permitted provided that the following conditions are met:
  13. * 1. Redistributions of source code must retain the above copyright notice,
  14. * this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  19. * may be used to endorse or promote products derived from this software
  20. * without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  23. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  24. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  25. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  26. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  27. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  28. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  29. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  30. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. *
  33. ******************************************************************************
  34. */
  35. /* Define to prevent recursive inclusion -------------------------------------*/
  36. #ifndef __STM32F3xx_HAL_OPAMP_H
  37. #define __STM32F3xx_HAL_OPAMP_H
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41. #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) || \
  42. defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) || \
  43. defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) || \
  44. defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
  45. /* Includes ------------------------------------------------------------------*/
  46. #include "stm32f3xx_hal_def.h"
  47. /** @addtogroup STM32F3xx_HAL_Driver
  48. * @{
  49. */
  50. /** @addtogroup OPAMP
  51. * @{
  52. */
  53. /* Exported types ------------------------------------------------------------*/
  54. /** @defgroup OPAMP_Exported_Types OPAMP Exported Types
  55. * @{
  56. */
  57. /**
  58. * @brief OPAMP Init structure definition
  59. */
  60. typedef struct
  61. {
  62. uint32_t Mode; /*!< Specifies the OPAMP mode
  63. This parameter must be a value of @ref OPAMP_Mode
  64. mode is either Standalone, - Follower or PGA */
  65. uint32_t InvertingInput; /*!< Specifies the inverting input in Standalone & Pga modes
  66. - In Standalone mode: i.e when mode is OPAMP_STANDALONE_MODE
  67. This parameter must be a value of @ref OPAMP_InvertingInput
  68. InvertingInput is either VM0 or VM1
  69. - In PGA mode: i.e when mode is OPAMP_PGA_MODE
  70. & in Follower mode i.e when mode is OPAMP_FOLLOWER_MODE
  71. This parameter is Not Applicable */
  72. uint32_t NonInvertingInput; /*!< Specifies the non inverting input of the opamp:
  73. This parameter must be a value of @ref OPAMP_NonInvertingInput
  74. NonInvertingInput is either VP0, VP1, VP2 or VP3 */
  75. uint32_t TimerControlledMuxmode; /*!< Specifies if the Timer controlled Mux mode is enabled or disabled
  76. This parameter must be a value of @ref OPAMP_TimerControlledMuxmode */
  77. uint32_t InvertingInputSecondary; /*!< Specifies the inverting input (secondary) of the opamp when
  78. TimerControlledMuxmode is enabled
  79. i.e. when TimerControlledMuxmode is OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE
  80. - In Standalone mode: i.e when mode is OPAMP_STANDALONE_MODE
  81. This parameter must be a value of @ref OPAMP_InvertingInputSecondary
  82. InvertingInputSecondary is either VM0 or VM1
  83. - In PGA mode: i.e when mode is OPAMP_PGA_MODE
  84. & in Follower mode i.e when mode is OPAMP_FOLLOWER_MODE
  85. This parameter is Not Applicable */
  86. uint32_t NonInvertingInputSecondary; /*!< Specifies the non inverting input (secondary) of the opamp when
  87. TimerControlledMuxmode is enabled
  88. i.e. when TimerControlledMuxmode is OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE
  89. This parameter must be a value of @ref OPAMP_NonInvertingInputSecondary
  90. NonInvertingInput is either VP0, VP1, VP2 or VP3 */
  91. uint32_t PgaConnect; /*!< Specifies the inverting pin in PGA mode
  92. i.e. when mode is OPAMP_PGA_MODE
  93. This parameter must be a value of @ref OPAMP_PgaConnect
  94. Either: not connected, connected to VM0, connected to VM1
  95. (VM0 or VM1 are typically used for external filtering) */
  96. uint32_t PgaGain; /*!< Specifies the gain in PGA mode
  97. i.e. when mode is OPAMP_PGA_MODE.
  98. This parameter must be a value of @ref OPAMP_PgaGain (2U, 4U, 8 or 16U ) */
  99. uint32_t UserTrimming; /*!< Specifies the trimming mode
  100. This parameter must be a value of @ref OPAMP_UserTrimming
  101. UserTrimming is either factory or user trimming */
  102. uint32_t TrimmingValueP; /*!< Specifies the offset trimming value (PMOS)
  103. i.e. when UserTrimming is OPAMP_TRIMMING_USER.
  104. This parameter must be a number between Min_Data = 1 and Max_Data = 31U */
  105. uint32_t TrimmingValueN; /*!< Specifies the offset trimming value (NMOS)
  106. i.e. when UserTrimming is OPAMP_TRIMMING_USER.
  107. This parameter must be a number between Min_Data = 1 and Max_Data = 31U */
  108. }OPAMP_InitTypeDef;
  109. /**
  110. * @brief HAL State structures definition
  111. */
  112. typedef enum
  113. {
  114. HAL_OPAMP_STATE_RESET = 0x00000000U, /*!< OPMAP is not yet Initialized */
  115. HAL_OPAMP_STATE_READY = 0x00000001U, /*!< OPAMP is initialized and ready for use */
  116. HAL_OPAMP_STATE_CALIBBUSY = 0x00000002U, /*!< OPAMP is enabled in auto calibration mode */
  117. HAL_OPAMP_STATE_BUSY = 0x00000004U, /*!< OPAMP is enabled and running in normal mode */
  118. HAL_OPAMP_STATE_BUSYLOCKED = 0x00000005U, /*!< OPAMP is locked
  119. only system reset allows reconfiguring the opamp. */
  120. }HAL_OPAMP_StateTypeDef;
  121. /**
  122. * @brief OPAMP Handle Structure definition to @brief OPAMP Handle Structure definition
  123. */
  124. typedef struct
  125. {
  126. OPAMP_TypeDef *Instance; /*!< OPAMP instance's registers base address */
  127. OPAMP_InitTypeDef Init; /*!< OPAMP required parameters */
  128. HAL_StatusTypeDef Status; /*!< OPAMP peripheral status */
  129. HAL_LockTypeDef Lock; /*!< Locking object */
  130. __IO HAL_OPAMP_StateTypeDef State; /*!< OPAMP communication state */
  131. } OPAMP_HandleTypeDef;
  132. /**
  133. * @brief OPAMP_TrimmingValueTypeDef @brief definition
  134. */
  135. typedef uint32_t OPAMP_TrimmingValueTypeDef;
  136. /**
  137. * @}
  138. */
  139. /* Exported constants --------------------------------------------------------*/
  140. /** @defgroup OPAMP_Exported_Constants OPAMP Exported Constants
  141. * @{
  142. */
  143. /** @defgroup OPAMP_CSR_INIT OPAMP CSR init register Mask
  144. * @{
  145. */
  146. /* Used for Init phase */
  147. #define OPAMP_CSR_UPDATE_PARAMETERS_INIT_MASK (OPAMP_CSR_TRIMOFFSETN | OPAMP_CSR_TRIMOFFSETP \
  148. | OPAMP_CSR_USERTRIM | OPAMP_CSR_PGGAIN | OPAMP_CSR_VPSSEL \
  149. | OPAMP_CSR_VMSSEL | OPAMP_CSR_TCMEN | OPAMP_CSR_VPSEL \
  150. | OPAMP_CSR_VMSEL | OPAMP_CSR_FORCEVP)
  151. /**
  152. * @}
  153. */
  154. /** @defgroup OPAMP_Mode OPAMP Mode
  155. * @{
  156. */
  157. #define OPAMP_STANDALONE_MODE (0x00000000U) /*!< standalone mode */
  158. #define OPAMP_PGA_MODE OPAMP_CSR_VMSEL_1 /*!< PGA mode */
  159. #define OPAMP_FOLLOWER_MODE OPAMP_CSR_VMSEL /*!< follower mode */
  160. #define IS_OPAMP_FUNCTIONAL_NORMALMODE(INPUT) (((INPUT) == OPAMP_STANDALONE_MODE) || \
  161. ((INPUT) == OPAMP_PGA_MODE) || \
  162. ((INPUT) == OPAMP_FOLLOWER_MODE))
  163. /**
  164. * @}
  165. */
  166. /** @defgroup OPAMP_NonInvertingInput OPAMP Non Inverting Input
  167. * @{
  168. */
  169. #define OPAMP_NONINVERTINGINPUT_IO0 OPAMP_CSR_VPSEL /*!< VP0 (PA1 for OPAMP1, VP0 PA7 for OPAMP2, VP0 PB0 for OPAMP3, VP0 PB13 for OPAMP4)
  170. connected to OPAMPx non inverting input */
  171. #define OPAMP_NONINVERTINGINPUT_IO1 (0x00000000U) /*!< VP1 (PA7 for OPAMP1, VP3 PD14 for OPAMP2, VP1 PB13 for OPAMP3, VP1 PD11 for OPAMP4)
  172. connected to OPAMPx non inverting input */
  173. #define OPAMP_NONINVERTINGINPUT_IO2 OPAMP_CSR_VPSEL_1 /*!< VP2 (PA3 for OPAMP1, VP2 PB0 for OPAMP2, VP2 PA1 for OPAMP3, VP3 PA4 for OPAMP4)
  174. connected to OPAMPx non inverting input */
  175. #define OPAMP_NONINVERTINGINPUT_IO3 OPAMP_CSR_VPSEL_0 /*!< VP3 (PA5 for OPAMP1, VP1 PB14 for OPAMP2, VP3 PA5 for OPAMP3, VP2 PB11 for OPAMP4)
  176. connected to OPAMPx non inverting input */
  177. #define IS_OPAMP_NONINVERTING_INPUT(INPUT) (((INPUT) == OPAMP_NONINVERTINGINPUT_IO0) || \
  178. ((INPUT) == OPAMP_NONINVERTINGINPUT_IO1) || \
  179. ((INPUT) == OPAMP_NONINVERTINGINPUT_IO2) || \
  180. ((INPUT) == OPAMP_NONINVERTINGINPUT_IO3))
  181. /**
  182. * @}
  183. */
  184. /** @defgroup OPAMP_InvertingInput OPAMP Inverting Input
  185. * @{
  186. */
  187. #define OPAMP_INVERTINGINPUT_IO0 (0x00000000U) /*!< inverting input connected to VM0 */
  188. #define OPAMP_INVERTINGINPUT_IO1 OPAMP_CSR_VMSEL_0 /*!< inverting input connected to VM1 */
  189. #define IS_OPAMP_INVERTING_INPUT(INPUT) (((INPUT) == OPAMP_INVERTINGINPUT_IO0) || \
  190. ((INPUT) == OPAMP_INVERTINGINPUT_IO1))
  191. /**
  192. * @}
  193. */
  194. /** @defgroup OPAMP_TimerControlledMuxmode OPAMP Timer Controlled Mux mode
  195. * @{
  196. */
  197. #define OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE (0x00000000U) /*!< Timer controlled Mux mode disabled */
  198. #define OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE OPAMP_CSR_TCMEN /*!< Timer controlled Mux mode enabled */
  199. #define IS_OPAMP_TIMERCONTROLLED_MUXMODE(MUXMODE) (((MUXMODE) == OPAMP_TIMERCONTROLLEDMUXMODE_DISABLE) || \
  200. ((MUXMODE) == OPAMP_TIMERCONTROLLEDMUXMODE_ENABLE))
  201. /**
  202. * @}
  203. */
  204. /** @defgroup OPAMP_NonInvertingInputSecondary OPAMP Non Inverting Input Secondary
  205. * @{
  206. */
  207. #define OPAMP_SEC_NONINVERTINGINPUT_IO0 OPAMP_CSR_VPSSEL /*!< VP0 (PA1 for OPAMP1, PA7 for OPAMP2, PB0 for OPAMP3, PB13 for OPAMP4)
  208. connected to OPAMPx non inverting input */
  209. #define OPAMP_SEC_NONINVERTINGINPUT_IO1 (0x00000000U) /*!< VP1 (PA7 for OPAMP1, PD14 for OPAMP2, PB13 for OPAMP3, PD11 for OPAMP4)
  210. connected to OPAMPx non inverting input */
  211. #define OPAMP_SEC_NONINVERTINGINPUT_IO2 OPAMP_CSR_VPSSEL_1 /*!< VP2 (PA3 for OPAMP1, PB0 for OPAMP2, PA1 for OPAMP3, PA4 for OPAMP4)
  212. connected to OPAMPx non inverting input */
  213. #define OPAMP_SEC_NONINVERTINGINPUT_IO3 OPAMP_CSR_VPSSEL_0 /*!< VP3 (PA5 for OPAMP1, PB14 for OPAMP2, PA5 for OPAMP3, PB11 for OPAMP4)
  214. connected to OPAMPx non inverting input */
  215. #define IS_OPAMP_SEC_NONINVERTINGINPUT(INPUT) (((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO0) || \
  216. ((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO1) || \
  217. ((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO2) || \
  218. ((INPUT) == OPAMP_SEC_NONINVERTINGINPUT_IO3))
  219. /**
  220. * @}
  221. */
  222. /** @defgroup OPAMP_InvertingInputSecondary OPAMP Inverting Input Secondary
  223. * @{
  224. */
  225. #define OPAMP_SEC_INVERTINGINPUT_IO0 (0x00000000U) /*!< VM0 (PC5 for OPAMP1 and OPAMP2, PB10 for OPAMP3 and OPAMP4)
  226. connected to OPAMPx inverting input */
  227. #define OPAMP_SEC_INVERTINGINPUT_IO1 OPAMP_CSR_VMSSEL /*!< VM1 (PA3 for OPAMP1, PA5 for OPAMP2, PB2 for OPAMP3, PD8 for OPAMP4)
  228. connected to OPAMPx inverting input */
  229. #define IS_OPAMP_SEC_INVERTINGINPUT(INPUT) (((INPUT) == OPAMP_SEC_INVERTINGINPUT_IO0) || \
  230. ((INPUT) == OPAMP_SEC_INVERTINGINPUT_IO1))
  231. /**
  232. * @}
  233. */
  234. /** @defgroup OPAMP_PgaConnect OPAMP Pga Connect
  235. * @{
  236. */
  237. #define OPAMP_PGA_CONNECT_INVERTINGINPUT_NO (0x00000000U) /*!< In PGA mode, the non inverting input is not connected */
  238. #define OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0 OPAMP_CSR_PGGAIN_3 /*!< In PGA mode, the non inverting input is connected to VM0 */
  239. #define OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1 (OPAMP_CSR_PGGAIN_2 | OPAMP_CSR_PGGAIN_3) /*!< In PGA mode, the non inverting input is connected to VM1 */
  240. #define IS_OPAMP_PGACONNECT(CONNECT) (((CONNECT) == OPAMP_PGA_CONNECT_INVERTINGINPUT_NO) || \
  241. ((CONNECT) == OPAMP_PGA_CONNECT_INVERTINGINPUT_IO0) || \
  242. ((CONNECT) == OPAMP_PGA_CONNECT_INVERTINGINPUT_IO1))
  243. /**
  244. * @}
  245. */
  246. /** @defgroup OPAMP_PgaGain OPAMP Pga Gain
  247. * @{
  248. */
  249. #define OPAMP_PGA_GAIN_2 (0x00000000U) /*!< PGA gain = 2 */
  250. #define OPAMP_PGA_GAIN_4 OPAMP_CSR_PGGAIN_0 /*!< PGA gain = 4 */
  251. #define OPAMP_PGA_GAIN_8 OPAMP_CSR_PGGAIN_1 /*!< PGA gain = 8 */
  252. #define OPAMP_PGA_GAIN_16 (OPAMP_CSR_PGGAIN_0 | OPAMP_CSR_PGGAIN_1) /*!< PGA gain = 16 */
  253. #define IS_OPAMP_PGA_GAIN(GAIN) (((GAIN) == OPAMP_PGA_GAIN_2) || \
  254. ((GAIN) == OPAMP_PGA_GAIN_4) || \
  255. ((GAIN) == OPAMP_PGA_GAIN_8) || \
  256. ((GAIN) == OPAMP_PGA_GAIN_16))
  257. /**
  258. * @}
  259. */
  260. /** @defgroup OPAMP_UserTrimming OPAMP User Trimming
  261. * @{
  262. */
  263. #define OPAMP_TRIMMING_FACTORY (0x00000000U) /*!< Factory trimming */
  264. #define OPAMP_TRIMMING_USER OPAMP_CSR_USERTRIM /*!< User trimming */
  265. #define IS_OPAMP_TRIMMING(TRIMMING) (((TRIMMING) == OPAMP_TRIMMING_FACTORY) || \
  266. ((TRIMMING) == OPAMP_TRIMMING_USER))
  267. /** @defgroup OPAMP_FactoryTrimming OPAMP Factory Trimming
  268. * @{
  269. */
  270. #define OPAMP_FACTORYTRIMMING_DUMMY (0xFFFFFFFFU) /*!< Dummy trimming value */
  271. #define OPAMP_FACTORYTRIMMING_N (0x00000000U) /*!< Offset trimming N */
  272. #define OPAMP_FACTORYTRIMMING_P (0x00000001U) /*!< Offset trimming P */
  273. #define IS_OPAMP_FACTORYTRIMMING(TRIMMING) (((TRIMMING) == OPAMP_FACTORYTRIMMING_N) || \
  274. ((TRIMMING) == OPAMP_FACTORYTRIMMING_P))
  275. /**
  276. * @}
  277. */
  278. /** @defgroup OPAMP_TrimmingValue OPAMP Trimming Value
  279. * @{
  280. */
  281. #define IS_OPAMP_TRIMMINGVALUE(TRIMMINGVALUE) ((TRIMMINGVALUE) <= 0x1FU)
  282. /**
  283. * @}
  284. */
  285. /** @defgroup OPAMP_Input OPAMP Input
  286. * @{
  287. */
  288. #define OPAMP_INPUT_INVERTING ( 24U) /*!< Inverting input */
  289. #define OPAMP_INPUT_NONINVERTING ( 19U) /*!< Non inverting input */
  290. #define IS_OPAMP_INPUT(INPUT) (((INPUT) == OPAMP_INPUT_INVERTING) || \
  291. ((INPUT) == OPAMP_INPUT_NONINVERTING))
  292. /**
  293. * @}
  294. */
  295. /** @defgroup OPAMP_VREF OPAMP VREF
  296. * @{
  297. */
  298. #define OPAMP_VREF_3VDDA (0x00000000U) /*!< OPMAP Vref = 3.3U% VDDA */
  299. #define OPAMP_VREF_10VDDA OPAMP_CSR_CALSEL_0 /*!< OPMAP Vref = 10U% VDDA */
  300. #define OPAMP_VREF_50VDDA OPAMP_CSR_CALSEL_1 /*!< OPMAP Vref = 50U% VDDA */
  301. #define OPAMP_VREF_90VDDA OPAMP_CSR_CALSEL /*!< OPMAP Vref = 90U% VDDA */
  302. #define IS_OPAMP_VREF(VREF) (((VREF) == OPAMP_VREF_3VDDA) || \
  303. ((VREF) == OPAMP_VREF_10VDDA) || \
  304. ((VREF) == OPAMP_VREF_50VDDA) || \
  305. ((VREF) == OPAMP_VREF_90VDDA))
  306. /**
  307. * @}
  308. */
  309. /** @defgroup OPAMP_Vref2ADCforCalib OPAMP Vref2ADCforCalib
  310. */
  311. #define OPAMP_VREF_NOTCONNECTEDTO_ADC (0x00000000U) /*!< VREF not connected to ADC */
  312. #define OPAMP_VREF_CONNECTEDTO_ADC (0x00000001U) /*!< VREF not connected to ADC */
  313. #define IS_OPAMP_ALLOPAMPVREF_CONNECT(CONNECT) (((CONNECT) == OPAMP_VREF_NOTCONNECTEDTO_ADC) || \
  314. ((CONNECT) == OPAMP_VREF_CONNECTEDTO_ADC))
  315. /**
  316. * @}
  317. */
  318. /**
  319. * @}
  320. */
  321. /* Exported macros -----------------------------------------------------------*/
  322. /** @defgroup OPAMP_Exported_Macros OPAMP Exported Macros
  323. * @{
  324. */
  325. /** @brief Reset OPAMP handle state
  326. * @param __HANDLE__ OPAMP handle.
  327. * @retval None
  328. */
  329. #define __HAL_OPAMP_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_OPAMP_STATE_RESET)
  330. /**
  331. * @}
  332. */
  333. /* Include OPAMP HAL Extended module */
  334. #include "stm32f3xx_hal_opamp_ex.h"
  335. /* Exported functions --------------------------------------------------------*/
  336. /** @defgroup OPAMP_Exported_Functions OPAMP Exported Functions
  337. * @{
  338. */
  339. /** @defgroup OPAMP_Exported_Functions_Group1 Initialization and de-initialization functions
  340. * @{
  341. */
  342. /* Initialization/de-initialization functions **********************************/
  343. HAL_StatusTypeDef HAL_OPAMP_Init(OPAMP_HandleTypeDef *hopamp);
  344. HAL_StatusTypeDef HAL_OPAMP_DeInit (OPAMP_HandleTypeDef *hopamp);
  345. void HAL_OPAMP_MspInit(OPAMP_HandleTypeDef *hopamp);
  346. void HAL_OPAMP_MspDeInit(OPAMP_HandleTypeDef *hopamp);
  347. /**
  348. * @}
  349. */
  350. /** @defgroup OPAMP_Exported_Functions_Group2 Input and Output operation functions
  351. * @{
  352. */
  353. /* I/O operation functions *****************************************************/
  354. HAL_StatusTypeDef HAL_OPAMP_Start(OPAMP_HandleTypeDef *hopamp);
  355. HAL_StatusTypeDef HAL_OPAMP_Stop(OPAMP_HandleTypeDef *hopamp);
  356. HAL_StatusTypeDef HAL_OPAMP_SelfCalibrate(OPAMP_HandleTypeDef *hopamp);
  357. /**
  358. * @}
  359. */
  360. /** @defgroup OPAMP_Exported_Functions_Group3 Peripheral Control functions
  361. * @{
  362. */
  363. /* Peripheral Control functions ************************************************/
  364. HAL_StatusTypeDef HAL_OPAMP_Lock(OPAMP_HandleTypeDef *hopamp);
  365. /**
  366. * @}
  367. */
  368. /** @defgroup OPAMP_Exported_Functions_Group4 Peripheral State functions
  369. * @{
  370. */
  371. /* Peripheral State functions **************************************************/
  372. HAL_OPAMP_StateTypeDef HAL_OPAMP_GetState(OPAMP_HandleTypeDef *hopamp);
  373. OPAMP_TrimmingValueTypeDef HAL_OPAMP_GetTrimOffset (OPAMP_HandleTypeDef *hopamp, uint32_t trimmingoffset);
  374. /**
  375. * @}
  376. */
  377. /**
  378. * @}
  379. */
  380. /**
  381. * @}
  382. */
  383. /**
  384. * @}
  385. */
  386. #endif /* STM32F302xE || STM32F303xE || STM32F398xx || */
  387. /* STM32F302xC || STM32F303xC || STM32F358xx || */
  388. /* STM32F303x8 || STM32F334x8 || STM32F328xx || */
  389. /* STM32F301x8 || STM32F302x8 || STM32F318xx */
  390. #ifdef __cplusplus
  391. }
  392. #endif
  393. #endif /* __STM32F3xx_HAL_OPAMP_H */
  394. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/