stm32l0xx_hal_dac.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. /**
  2. ******************************************************************************
  3. * @file stm32l0xx_hal_dac.h
  4. * @author MCD Application Team
  5. * @brief Header file of DAC HAL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2016 STMicroelectronics.
  10. * All rights reserved.
  11. *
  12. * This software is licensed under terms that can be found in the LICENSE file
  13. * in the root directory of this software component.
  14. * If no LICENSE file comes with this software, it is provided AS-IS.
  15. *
  16. ******************************************************************************
  17. */
  18. /* Define to prevent recursive inclusion -------------------------------------*/
  19. #ifndef __STM32L0xx_HAL_DAC_H
  20. #define __STM32L0xx_HAL_DAC_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. #if !defined (STM32L010xB) && !defined (STM32L010x8) && !defined (STM32L010x6) && !defined (STM32L010x4) && !defined (STM32L011xx) && !defined (STM32L021xx) && !defined (STM32L031xx) && !defined (STM32L041xx) && !defined (STM32L051xx) && !defined (STM32L071xx) && !defined (STM32L081xx)
  25. /* Includes ------------------------------------------------------------------*/
  26. #include "stm32l0xx_hal_def.h"
  27. /** @addtogroup STM32L0xx_HAL_Driver
  28. * @{
  29. */
  30. /** @defgroup DAC DAC
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /** @defgroup DAC_Exported_Types DAC Exported Types
  35. * @{
  36. */
  37. /**
  38. * @brief HAL State structures definition
  39. */
  40. typedef enum
  41. {
  42. HAL_DAC_STATE_RESET = 0x00U, /*!< DAC not yet initialized or disabled */
  43. HAL_DAC_STATE_READY = 0x01U, /*!< DAC initialized and ready for use */
  44. HAL_DAC_STATE_BUSY = 0x02U, /*!< DAC internal processing is ongoing */
  45. HAL_DAC_STATE_TIMEOUT = 0x03U, /*!< DAC timeout state */
  46. HAL_DAC_STATE_ERROR = 0x04U /*!< DAC error state */
  47. }HAL_DAC_StateTypeDef;
  48. /**
  49. * @brief DAC handle Structure definition
  50. */
  51. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  52. typedef struct __DAC_HandleTypeDef
  53. #else
  54. typedef struct
  55. #endif
  56. {
  57. DAC_TypeDef *Instance; /*!< Register base address */
  58. __IO HAL_DAC_StateTypeDef State; /*!< DAC communication state */
  59. HAL_LockTypeDef Lock; /*!< DAC locking object */
  60. DMA_HandleTypeDef *DMA_Handle1; /*!< Pointer DMA handler for channel 1 */
  61. #if defined (DAC_CHANNEL2_SUPPORT)
  62. DMA_HandleTypeDef *DMA_Handle2; /*!< Pointer DMA handler for channel 2 */
  63. #endif
  64. __IO uint32_t ErrorCode; /*!< DAC Error code */
  65. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  66. void (* ConvCpltCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
  67. void (* ConvHalfCpltCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
  68. void (* ErrorCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
  69. void (* DMAUnderrunCallbackCh1) (struct __DAC_HandleTypeDef *hdac);
  70. void (* ConvCpltCallbackCh2) (struct __DAC_HandleTypeDef* hdac);
  71. void (* ConvHalfCpltCallbackCh2) (struct __DAC_HandleTypeDef* hdac);
  72. void (* ErrorCallbackCh2) (struct __DAC_HandleTypeDef* hdac);
  73. void (* DMAUnderrunCallbackCh2) (struct __DAC_HandleTypeDef* hdac);
  74. void (* MspInitCallback) (struct __DAC_HandleTypeDef *hdac);
  75. void (* MspDeInitCallback ) (struct __DAC_HandleTypeDef *hdac);
  76. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  77. }DAC_HandleTypeDef;
  78. /**
  79. * @brief DAC Configuration regular Channel structure definition
  80. */
  81. typedef struct
  82. {
  83. uint32_t DAC_Trigger; /*!< Specifies the external trigger for the selected DAC channel.
  84. This parameter can be a value of @ref DAC_trigger_selection */
  85. uint32_t DAC_OutputBuffer; /*!< Specifies whether the DAC channel output buffer is enabled or disabled.
  86. This parameter can be a value of @ref DAC_output_buffer */
  87. }DAC_ChannelConfTypeDef;
  88. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  89. /**
  90. * @brief HAL DAC Callback ID enumeration definition
  91. */
  92. typedef enum
  93. {
  94. HAL_DAC_CH1_COMPLETE_CB_ID = 0x00U, /*!< DAC CH1 Complete Callback ID */
  95. HAL_DAC_CH1_HALF_COMPLETE_CB_ID = 0x01U, /*!< DAC CH1 half Complete Callback ID */
  96. HAL_DAC_CH1_ERROR_ID = 0x02U, /*!< DAC CH1 error Callback ID */
  97. HAL_DAC_CH1_UNDERRUN_CB_ID = 0x03U, /*!< DAC CH1 underrun Callback ID */
  98. HAL_DAC_CH2_COMPLETE_CB_ID = 0x04U, /*!< DAC CH2 Complete Callback ID */
  99. HAL_DAC_CH2_HALF_COMPLETE_CB_ID = 0x05U, /*!< DAC CH2 half Complete Callback ID */
  100. HAL_DAC_CH2_ERROR_ID = 0x06U, /*!< DAC CH2 error Callback ID */
  101. HAL_DAC_CH2_UNDERRUN_CB_ID = 0x07U, /*!< DAC CH2 underrun Callback ID */
  102. HAL_DAC_MSP_INIT_CB_ID = 0x08U, /*!< DAC MspInit Callback ID */
  103. HAL_DAC_MSP_DEINIT_CB_ID = 0x09U, /*!< DAC MspDeInit Callback ID */
  104. HAL_DAC_ALL_CB_ID = 0x0AU /*!< DAC All ID */
  105. }HAL_DAC_CallbackIDTypeDef;
  106. /**
  107. * @brief HAL DAC Callback pointer definition
  108. */
  109. typedef void (*pDAC_CallbackTypeDef)(DAC_HandleTypeDef *hdac);
  110. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  111. /**
  112. * @}
  113. */
  114. /* Exported constants --------------------------------------------------------*/
  115. /** @defgroup DAC_Exported_Constants DAC Exported Constants
  116. * @{
  117. */
  118. /** @defgroup DAC_Error_Code DAC Error Code
  119. * @{
  120. */
  121. #define HAL_DAC_ERROR_NONE 0x00U /*!< No error */
  122. #define HAL_DAC_ERROR_DMAUNDERRUNCH1 0x01U /*!< DAC channel1 DMA underrun error */
  123. #if defined (DAC_CHANNEL2_SUPPORT)
  124. #define HAL_DAC_ERROR_DMAUNDERRUNCH2 0x02U /*!< DAC channel2 DMA underrun error */
  125. #endif
  126. #define HAL_DAC_ERROR_DMA 0x04U /*!< DMA error */
  127. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  128. #define HAL_DAC_ERROR_INVALID_CALLBACK 0x10U /*!< Invalid callback error */
  129. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  130. /**
  131. * @}
  132. */
  133. /** @defgroup DAC_trigger_selection DAC trigger selection
  134. * @{
  135. */
  136. #define DAC_TRIGGER_NONE (0x00000000U) /*!< Conversion is automatic once the DAC1_DHRxxxx register has been loaded, and not by external trigger */
  137. #define DAC_TRIGGER_T6_TRGO ( DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
  138. #define DAC_TRIGGER_T21_TRGO ((uint32_t)( DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM21 TRGO selected as external conversion trigger for DAC channel */
  139. #define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
  140. #define DAC_TRIGGER_EXT_IT9 ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< EXTI Line9 event selected as external conversion trigger for DAC channel */
  141. #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
  142. #if defined (DAC_CHANNEL2_SUPPORT)
  143. #define DAC_TRIGGER_T3_TRGO ((uint32_t)( DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */
  144. #define DAC_TRIGGER_T3_CH3 ((uint32_t)( DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM3 CH3 selected as external conversion trigger for DAC channel */
  145. #define DAC_TRIGGER_T7_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
  146. #endif
  147. #if defined (DAC_CHANNEL2_SUPPORT)
  148. #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
  149. ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
  150. ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
  151. ((TRIGGER) == DAC_TRIGGER_T3_CH3) || \
  152. ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
  153. ((TRIGGER) == DAC_TRIGGER_T21_TRGO) || \
  154. ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
  155. ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
  156. ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
  157. #else
  158. #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
  159. ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
  160. ((TRIGGER) == DAC_TRIGGER_T21_TRGO) || \
  161. ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
  162. ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
  163. ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
  164. #endif /* DAC_CHANNEL2_SUPPORT */
  165. /**
  166. * @}
  167. */
  168. /** @defgroup DAC_output_buffer DAC output buffer
  169. * @{
  170. */
  171. #define DAC_OUTPUTBUFFER_ENABLE (0x00000000U)
  172. #define DAC_OUTPUTBUFFER_DISABLE (DAC_CR_BOFF1)
  173. #define IS_DAC_OUTPUT_BUFFER_STATE(STATE) (((STATE) == DAC_OUTPUTBUFFER_ENABLE) || \
  174. ((STATE) == DAC_OUTPUTBUFFER_DISABLE))
  175. /**
  176. * @}
  177. */
  178. /** @defgroup DAC_Channel_selection DAC Channel selection
  179. * @{
  180. */
  181. #define DAC_CHANNEL_1 (0x00000000U)
  182. #if defined (DAC_CHANNEL2_SUPPORT)
  183. #define DAC_CHANNEL_2 (0x00000010U)
  184. #endif
  185. #if defined (DAC_CHANNEL2_SUPPORT)
  186. #define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_CHANNEL_1) || \
  187. ((CHANNEL) == DAC_CHANNEL_2))
  188. #else
  189. #define IS_DAC_CHANNEL(CHANNEL) ((CHANNEL) == DAC_CHANNEL_1)
  190. #endif
  191. /**
  192. * @}
  193. */
  194. /** @defgroup DAC_data_alignement DAC data alignment
  195. * @{
  196. */
  197. #define DAC_ALIGN_12B_R (0x00000000U)
  198. #define DAC_ALIGN_12B_L (0x00000004U)
  199. #define DAC_ALIGN_8B_R (0x00000008U)
  200. #define IS_DAC_ALIGN(ALIGN) (((ALIGN) == DAC_ALIGN_12B_R) || \
  201. ((ALIGN) == DAC_ALIGN_12B_L) || \
  202. ((ALIGN) == DAC_ALIGN_8B_R))
  203. /**
  204. * @}
  205. */
  206. /** @defgroup DAC_data DAC data
  207. * @{
  208. */
  209. #define IS_DAC_DATA(DATA) ((DATA) <= 0xFFF0U)
  210. /**
  211. * @}
  212. */
  213. /** @defgroup DAC_flags_definition DAC flags definition
  214. * @{
  215. */
  216. #define DAC_FLAG_DMAUDR1 (DAC_SR_DMAUDR1)
  217. #if defined (DAC_CHANNEL2_SUPPORT)
  218. #define DAC_FLAG_DMAUDR2 (DAC_SR_DMAUDR2)
  219. #endif
  220. /**
  221. * @}
  222. */
  223. /** @defgroup DAC_IT_definition DAC IT definition
  224. * @{
  225. */
  226. #define DAC_IT_DMAUDR1 (DAC_SR_DMAUDR1)
  227. #if defined (DAC_CHANNEL2_SUPPORT)
  228. #define DAC_IT_DMAUDR2 (DAC_SR_DMAUDR2)
  229. #endif
  230. /**
  231. * @}
  232. */
  233. /**
  234. * @}
  235. */
  236. /* Exported macro ------------------------------------------------------------*/
  237. /** @defgroup DAC_Exported_Macros DAC Exported Macros
  238. * @{
  239. */
  240. /** @brief Reset DAC handle state
  241. * @param __HANDLE__ specifies the DAC handle.
  242. * @retval None
  243. */
  244. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  245. #define __HAL_DAC_RESET_HANDLE_STATE(__HANDLE__) do { \
  246. (__HANDLE__)->State = HAL_DAC_STATE_RESET; \
  247. (__HANDLE__)->MspInitCallback = NULL; \
  248. (__HANDLE__)->MspDeInitCallback = NULL; \
  249. } while(0)
  250. #else
  251. #define __HAL_DAC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DAC_STATE_RESET)
  252. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  253. /** @brief Enable the DAC channel
  254. * @param __HANDLE__ specifies the DAC handle.
  255. * @param __DAC_CHANNEL__ specifies the DAC channel
  256. * @retval None
  257. */
  258. #define __HAL_DAC_ENABLE(__HANDLE__, __DAC_CHANNEL__) \
  259. SET_BIT((__HANDLE__)->Instance->CR, (DAC_CR_EN1 << (__DAC_CHANNEL__)))
  260. /** @brief Disable the DAC channel
  261. * @param __HANDLE__ specifies the DAC handle
  262. * @param __DAC_CHANNEL__ specifies the DAC channel.
  263. * @retval None
  264. */
  265. #define __HAL_DAC_DISABLE(__HANDLE__, __DAC_CHANNEL__) \
  266. CLEAR_BIT((__HANDLE__)->Instance->CR, (DAC_CR_EN1 << (__DAC_CHANNEL__)))
  267. #define __HAL_DAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) \
  268. SET_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))
  269. /** @brief Disable the DAC interrupt
  270. * @param __HANDLE__ specifies the DAC handle
  271. * @param __INTERRUPT__ specifies the DAC interrupt.
  272. * @retval None
  273. */
  274. #define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) \
  275. CLEAR_BIT((__HANDLE__)->Instance->CR, (__INTERRUPT__))
  276. /** @brief Check whether the specified DAC interrupt source is enabled or not.
  277. * @param __HANDLE__ DAC handle
  278. * @param __INTERRUPT__ DAC interrupt source to check
  279. * This parameter can be any combination of the following values:
  280. * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
  281. * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt (STM32L072xx STM32L073xx STM32L082xx STM32L083xx only)
  282. * @retval State of interruption (SET or RESET)
  283. */
  284. #define __HAL_DAC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) \
  285. (((__HANDLE__)->Instance->CR & (__INTERRUPT__)) == (__INTERRUPT__))
  286. /** @brief Get the selected DAC's flag status.
  287. * @param __HANDLE__ specifies the DAC handle.
  288. * @param __FLAG__ specifies the FLAG.
  289. * @retval None
  290. */
  291. #define __HAL_DAC_GET_FLAG(__HANDLE__, __FLAG__) \
  292. ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
  293. /** @brief Clear the DAC's flag.
  294. * @param __HANDLE__ specifies the DAC handle.
  295. * @param __FLAG__ specifies the FLAG.
  296. * @retval None
  297. */
  298. #define __HAL_DAC_CLEAR_FLAG(__HANDLE__, __FLAG__) \
  299. (((__HANDLE__)->Instance->SR) = (__FLAG__))
  300. /**
  301. * @}
  302. */
  303. /* Private macro ------------------------------------------------------------*/
  304. /** @defgroup DAC_Private_Macros DAC Private Macros
  305. * @{
  306. */
  307. /** @brief Set DHR12R1 alignment
  308. * @param __ALIGNMENT__ specifies the DAC alignment
  309. * @retval None
  310. */
  311. #define DAC_DHR12R1_ALIGNMENT(__ALIGNMENT__) ((0x00000008U) + (__ALIGNMENT__))
  312. /** @brief Set DHR12R2 alignment
  313. * @param __ALIGNMENT__ specifies the DAC alignment
  314. * @retval None
  315. */
  316. #define DAC_DHR12R2_ALIGNMENT(__ALIGNMENT__) ((0x00000014U) + (__ALIGNMENT__))
  317. /** @brief Set DHR12RD alignment
  318. * @param __ALIGNMENT__ specifies the DAC alignment
  319. * @retval None
  320. */
  321. #define DAC_DHR12RD_ALIGNMENT(__ALIGNMENT__) ((0x00000020U) + (__ALIGNMENT__))
  322. /** @brief Enable the DAC interrupt
  323. * @param __HANDLE__ specifies the DAC handle
  324. * @param __INTERRUPT__ specifies the DAC interrupt.
  325. * @retval None
  326. */
  327. /**
  328. * @}
  329. */
  330. /* Include DAC HAL Extension module */
  331. #include "stm32l0xx_hal_dac_ex.h"
  332. /* Exported functions --------------------------------------------------------*/
  333. /** @defgroup DAC_Exported_Functions DAC Exported Functions
  334. * @{
  335. */
  336. /** @defgroup DAC_Exported_Functions_Group1 Initialization and de-initialization functions
  337. * @{
  338. */
  339. /* Initialization and de-initialization functions *****************************/
  340. HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef* hdac);
  341. HAL_StatusTypeDef HAL_DAC_DeInit(DAC_HandleTypeDef* hdac);
  342. void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac);
  343. void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac);
  344. /**
  345. * @}
  346. */
  347. /** @defgroup DAC_Exported_Functions_Group2 IO operation functions
  348. * @{
  349. */
  350. /* IO operation functions *****************************************************/
  351. HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel);
  352. HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef* hdac, uint32_t Channel);
  353. HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t* pData, uint32_t Length, uint32_t Alignment);
  354. HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel);
  355. HAL_StatusTypeDef HAL_DAC_SetValue(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Alignment, uint32_t Data);
  356. uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel);
  357. void HAL_DAC_IRQHandler(DAC_HandleTypeDef* hdac);
  358. void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac);
  359. void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac);
  360. void HAL_DAC_ErrorCallbackCh1(DAC_HandleTypeDef *hdac);
  361. void HAL_DAC_DMAUnderrunCallbackCh1(DAC_HandleTypeDef *hdac);
  362. #if (USE_HAL_DAC_REGISTER_CALLBACKS == 1)
  363. /* DAC callback registering/unregistering */
  364. HAL_StatusTypeDef HAL_DAC_RegisterCallback (DAC_HandleTypeDef *hdac, HAL_DAC_CallbackIDTypeDef CallbackId, pDAC_CallbackTypeDef pCallback);
  365. HAL_StatusTypeDef HAL_DAC_UnRegisterCallback (DAC_HandleTypeDef *hdac, HAL_DAC_CallbackIDTypeDef CallbackId);
  366. #endif /* USE_HAL_DAC_REGISTER_CALLBACKS */
  367. /**
  368. * @}
  369. */
  370. /** @defgroup DAC_Exported_Functions_Group3 Peripheral Control functions
  371. * @{
  372. */
  373. /* Peripheral Control functions ***********************************************/
  374. HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef* hdac, DAC_ChannelConfTypeDef* sConfig, uint32_t Channel);
  375. /**
  376. * @}
  377. */
  378. /** @defgroup DAC_Exported_Functions_Group4 Peripheral State and Errors functions
  379. * @{
  380. */
  381. /* Peripheral State functions ***************************************************/
  382. HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef* hdac);
  383. uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac);
  384. /**
  385. * @}
  386. */
  387. /**
  388. * @}
  389. */
  390. /**
  391. * @}
  392. */
  393. /**
  394. * @}
  395. */
  396. #endif /* !STM32L010xB && !STM32L010x8 && !STM32L010x6 && !STM32L010x4 && !STM32L011xx && !STM32L021xx && !STM32L031xx && !STM32L041xx && !STM32L071xx && !STM32L081xx*/
  397. #ifdef __cplusplus
  398. }
  399. #endif
  400. #endif /*__STM32L0xx_HAL_DAC_H */