stm32f1xx_hal_dac_ex.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. /**
  2. ******************************************************************************
  3. * @file stm32f1xx_hal_dac_ex.h
  4. * @author MCD Application Team
  5. * @version V1.0.4
  6. * @date 29-April-2016
  7. * @brief Header file of DAC HAL Extension module.
  8. ******************************************************************************
  9. * @attention
  10. *
  11. * <h2><center>&copy; COPYRIGHT(c) 2016 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. /* Define to prevent recursive inclusion -------------------------------------*/
  38. #ifndef __STM32F1xx_HAL_DAC_EX_H
  39. #define __STM32F1xx_HAL_DAC_EX_H
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43. #if defined (STM32F100xB) || defined (STM32F100xE) || defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG) || defined (STM32F105xC) || defined (STM32F107xC)
  44. /* Includes ------------------------------------------------------------------*/
  45. #include "stm32f1xx_hal_def.h"
  46. /** @addtogroup STM32F1xx_HAL_Driver
  47. * @{
  48. */
  49. /** @addtogroup DACEx
  50. * @{
  51. */
  52. /* Exported types ------------------------------------------------------------*/
  53. /* Exported constants --------------------------------------------------------*/
  54. /** @defgroup DACEx_Exported_Constants DACEx Exported Constants
  55. * @{
  56. */
  57. /** @defgroup DACEx_lfsrunmask_triangleamplitude DACEx lfsrunmask triangleamplitude
  58. * @{
  59. */
  60. #define DAC_LFSRUNMASK_BIT0 ((uint32_t)0x00000000) /*!< Unmask DAC channel LFSR bit0 for noise wave generation */
  61. #define DAC_LFSRUNMASK_BITS1_0 ((uint32_t)DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[1:0] for noise wave generation */
  62. #define DAC_LFSRUNMASK_BITS2_0 ((uint32_t)DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[2:0] for noise wave generation */
  63. #define DAC_LFSRUNMASK_BITS3_0 ((uint32_t)DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0)/*!< Unmask DAC channel LFSR bit[3:0] for noise wave generation */
  64. #define DAC_LFSRUNMASK_BITS4_0 ((uint32_t)DAC_CR_MAMP1_2) /*!< Unmask DAC channel LFSR bit[4:0] for noise wave generation */
  65. #define DAC_LFSRUNMASK_BITS5_0 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[5:0] for noise wave generation */
  66. #define DAC_LFSRUNMASK_BITS6_0 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[6:0] for noise wave generation */
  67. #define DAC_LFSRUNMASK_BITS7_0 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[7:0] for noise wave generation */
  68. #define DAC_LFSRUNMASK_BITS8_0 ((uint32_t)DAC_CR_MAMP1_3) /*!< Unmask DAC channel LFSR bit[8:0] for noise wave generation */
  69. #define DAC_LFSRUNMASK_BITS9_0 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[9:0] for noise wave generation */
  70. #define DAC_LFSRUNMASK_BITS10_0 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[10:0] for noise wave generation */
  71. #define DAC_LFSRUNMASK_BITS11_0 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[11:0] for noise wave generation */
  72. #define DAC_TRIANGLEAMPLITUDE_1 ((uint32_t)0x00000000) /*!< Select max triangle amplitude of 1 */
  73. #define DAC_TRIANGLEAMPLITUDE_3 ((uint32_t)DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 3 */
  74. #define DAC_TRIANGLEAMPLITUDE_7 ((uint32_t)DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 7 */
  75. #define DAC_TRIANGLEAMPLITUDE_15 ((uint32_t)DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 15 */
  76. #define DAC_TRIANGLEAMPLITUDE_31 ((uint32_t)DAC_CR_MAMP1_2) /*!< Select max triangle amplitude of 31 */
  77. #define DAC_TRIANGLEAMPLITUDE_63 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 63 */
  78. #define DAC_TRIANGLEAMPLITUDE_127 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 127 */
  79. #define DAC_TRIANGLEAMPLITUDE_255 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 255 */
  80. #define DAC_TRIANGLEAMPLITUDE_511 ((uint32_t)DAC_CR_MAMP1_3) /*!< Select max triangle amplitude of 511 */
  81. #define DAC_TRIANGLEAMPLITUDE_1023 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 1023 */
  82. #define DAC_TRIANGLEAMPLITUDE_2047 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 2047 */
  83. #define DAC_TRIANGLEAMPLITUDE_4095 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 4095 */
  84. /**
  85. * @}
  86. */
  87. /** @defgroup DACEx_wave_generation DACEx wave generation
  88. * @{
  89. */
  90. #define DAC_WAVE_NOISE ((uint32_t)DAC_CR_WAVE1_0)
  91. #define DAC_WAVE_TRIANGLE ((uint32_t)DAC_CR_WAVE1_1)
  92. /**
  93. * @}
  94. */
  95. /** @defgroup DACEx_trigger_selection DAC trigger selection
  96. * @{
  97. */
  98. #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register
  99. has been loaded, and not by external trigger */
  100. #define DAC_TRIGGER_T6_TRGO ((uint32_t) DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
  101. #define DAC_TRIGGER_T7_TRGO ((uint32_t)( DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
  102. #define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
  103. #define DAC_TRIGGER_T4_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM4 TRGO selected as external conversion trigger for DAC channel */
  104. #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 */
  105. #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
  106. #if defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG)
  107. /* For STM32F10x high-density and XL-density devices: TIM8 */
  108. #define DAC_TRIGGER_T8_TRGO ((uint32_t) DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< TIM8 TRGO selected as external conversion trigger for DAC channel */
  109. #endif /* STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
  110. #if defined (STM32F100xB) || defined (STM32F100xE) || defined (STM32F105xC) || defined (STM32F107xC)
  111. /* For STM32F10x connectivity line devices and STM32F100x devices: TIM3 */
  112. #define DAC_TRIGGER_T3_TRGO ((uint32_t) DAC_CR_TSEL1_0 | DAC_CR_TEN1) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */
  113. #endif /* STM32F100xB || STM32F100xE || STM32F105xC || STM32F107xC */
  114. /* Availability of trigger from TIM5 and TIM15: */
  115. /* - For STM32F10x value line devices STM32F100xB: */
  116. /* trigger from TIM15 is available, TIM5 not available. */
  117. /* - For STM32F10x value line devices STM32F100xE: */
  118. /* trigger from TIM15 and TIM5 are both available, */
  119. /* selection depends on remap (with TIM5 as default configuration). */
  120. /* - Other STM32F1 devices: */
  121. /* trigger from TIM5 is available, TIM15 not available. */
  122. #if defined (STM32F100xB)
  123. #define DAC_TRIGGER_T15_TRGO ((uint32_t)( DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM15 TRGO selected as external conversion trigger for DAC channel */
  124. #else
  125. #define DAC_TRIGGER_T5_TRGO ((uint32_t)( DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
  126. #if defined (STM32F100xE)
  127. /*!< DAC trigger availability depending on STM32F1 devices:
  128. For STM32F100x high-density value line devices, the TIM15 TRGO event can be selected
  129. as replacement of TIM5 TRGO if the MISC_REMAP bit in the AFIO_MAPR2 register is set.
  130. Refer to macro "__HAL_AFIO_REMAP_MISC_ENABLE()/__HAL_AFIO_REMAP_MISC_DISABLE()".
  131. Otherwise, TIM5 TRGO is used and TIM15 TRGO is not used (default case).
  132. For more details please refer to the AFIO section. */
  133. #define DAC_TRIGGER_T15_TRGO DAC_TRIGGER_T5_TRGO
  134. #endif /* STM32F100xE */
  135. #endif /* STM32F100xB */
  136. /**
  137. * @}
  138. */
  139. #if defined (STM32F100xB) || defined (STM32F100xE)
  140. /** @defgroup DAC_flags_definition DAC flags definition
  141. * @{
  142. */
  143. #define DAC_FLAG_DMAUDR1 ((uint32_t)DAC_SR_DMAUDR1)
  144. #define DAC_FLAG_DMAUDR2 ((uint32_t)DAC_SR_DMAUDR2)
  145. /**
  146. * @}
  147. */
  148. /** @defgroup DAC_IT_definition DAC IT definition
  149. * @{
  150. */
  151. #define DAC_IT_DMAUDR1 ((uint32_t)DAC_SR_DMAUDR1)
  152. #define DAC_IT_DMAUDR2 ((uint32_t)DAC_SR_DMAUDR2)
  153. /**
  154. * @}
  155. */
  156. #endif /* STM32F100xB || STM32F100xE */
  157. /**
  158. * @}
  159. */
  160. /* Exported macro ------------------------------------------------------------*/
  161. #if defined (STM32F100xB) || defined (STM32F100xE)
  162. /** @defgroup DACEx_Exported_Macros DACEx Exported Macros
  163. * @{
  164. */
  165. /** @brief Enable the DAC interrupt
  166. * @param __HANDLE__: specifies the DAC handle
  167. * @param __INTERRUPT__: specifies the DAC interrupt.
  168. * This parameter can be any combination of the following values:
  169. * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
  170. * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt
  171. * @retval None
  172. */
  173. #define __HAL_DAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) |= (__INTERRUPT__))
  174. /** @brief Disable the DAC interrupt
  175. * @param __HANDLE__: specifies the DAC handle
  176. * @param __INTERRUPT__: specifies the DAC interrupt.
  177. * This parameter can be any combination of the following values:
  178. * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
  179. * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt
  180. * @retval None
  181. */
  182. #define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__))
  183. /** @brief Checks if the specified DAC interrupt source is enabled or disabled.
  184. * @param __HANDLE__: DAC handle
  185. * @param __INTERRUPT__: DAC interrupt source to check
  186. * This parameter can be any combination of the following values:
  187. * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt
  188. * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt
  189. * @retval State of interruption (SET or RESET)
  190. */
  191. #define __HAL_DAC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR & (__INTERRUPT__)) == (__INTERRUPT__))
  192. /** @brief Get the selected DAC's flag status.
  193. * @param __HANDLE__: specifies the DAC handle.
  194. * @param __FLAG__: specifies the DAC flag to get.
  195. * This parameter can be any combination of the following values:
  196. * @arg DAC_FLAG_DMAUDR1: DAC channel 1 DMA underrun flag
  197. * @arg DAC_FLAG_DMAUDR2: DAC channel 2 DMA underrun flag
  198. * @retval None
  199. */
  200. #define __HAL_DAC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
  201. /** @brief Clear the DAC's flag.
  202. * @param __HANDLE__: specifies the DAC handle.
  203. * @param __FLAG__: specifies the DAC flag to clear.
  204. * This parameter can be any combination of the following values:
  205. * @arg DAC_FLAG_DMAUDR1: DAC channel 1 DMA underrun flag
  206. * @arg DAC_FLAG_DMAUDR2: DAC channel 2 DMA underrun flag
  207. * @retval None
  208. */
  209. #define __HAL_DAC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = (__FLAG__))
  210. /**
  211. * @}
  212. */
  213. #endif /* STM32F100xB || STM32F100xE */
  214. /* Private macro -------------------------------------------------------------*/
  215. /** @defgroup DACEx_Private_Macros DACEx Private Macros
  216. * @{
  217. */
  218. #if defined (STM32F101xE) || defined (STM32F101xG) || defined (STM32F103xE) || defined (STM32F103xG)
  219. #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
  220. ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
  221. ((TRIGGER) == DAC_TRIGGER_T8_TRGO) || \
  222. ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
  223. ((TRIGGER) == DAC_TRIGGER_T5_TRGO) || \
  224. ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
  225. ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
  226. ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
  227. ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
  228. #endif /* STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG */
  229. #if defined (STM32F100xE) || defined (STM32F105xC) || defined (STM32F107xC)
  230. #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
  231. ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
  232. ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
  233. ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
  234. ((TRIGGER) == DAC_TRIGGER_T5_TRGO) || \
  235. ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
  236. ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
  237. ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
  238. ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
  239. #endif /* STM32F100xE || STM32F105xC || STM32F107xC */
  240. #if defined (STM32F100xB)
  241. #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
  242. ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
  243. ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
  244. ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
  245. ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
  246. ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
  247. ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
  248. ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
  249. ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
  250. #endif /* STM32F100xB */
  251. #define IS_DAC_LFSR_UNMASK_TRIANGLE_AMPLITUDE(VALUE) (((VALUE) == DAC_LFSRUNMASK_BIT0) || \
  252. ((VALUE) == DAC_LFSRUNMASK_BITS1_0) || \
  253. ((VALUE) == DAC_LFSRUNMASK_BITS2_0) || \
  254. ((VALUE) == DAC_LFSRUNMASK_BITS3_0) || \
  255. ((VALUE) == DAC_LFSRUNMASK_BITS4_0) || \
  256. ((VALUE) == DAC_LFSRUNMASK_BITS5_0) || \
  257. ((VALUE) == DAC_LFSRUNMASK_BITS6_0) || \
  258. ((VALUE) == DAC_LFSRUNMASK_BITS7_0) || \
  259. ((VALUE) == DAC_LFSRUNMASK_BITS8_0) || \
  260. ((VALUE) == DAC_LFSRUNMASK_BITS9_0) || \
  261. ((VALUE) == DAC_LFSRUNMASK_BITS10_0) || \
  262. ((VALUE) == DAC_LFSRUNMASK_BITS11_0) || \
  263. ((VALUE) == DAC_TRIANGLEAMPLITUDE_1) || \
  264. ((VALUE) == DAC_TRIANGLEAMPLITUDE_3) || \
  265. ((VALUE) == DAC_TRIANGLEAMPLITUDE_7) || \
  266. ((VALUE) == DAC_TRIANGLEAMPLITUDE_15) || \
  267. ((VALUE) == DAC_TRIANGLEAMPLITUDE_31) || \
  268. ((VALUE) == DAC_TRIANGLEAMPLITUDE_63) || \
  269. ((VALUE) == DAC_TRIANGLEAMPLITUDE_127) || \
  270. ((VALUE) == DAC_TRIANGLEAMPLITUDE_255) || \
  271. ((VALUE) == DAC_TRIANGLEAMPLITUDE_511) || \
  272. ((VALUE) == DAC_TRIANGLEAMPLITUDE_1023) || \
  273. ((VALUE) == DAC_TRIANGLEAMPLITUDE_2047) || \
  274. ((VALUE) == DAC_TRIANGLEAMPLITUDE_4095))
  275. /**
  276. * @}
  277. */
  278. /* Exported functions --------------------------------------------------------*/
  279. /** @addtogroup DACEx_Exported_Functions
  280. * @{
  281. */
  282. /** @addtogroup DACEx_Exported_Functions_Group1
  283. * @{
  284. */
  285. /* Extension features functions ***********************************************/
  286. uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef* hdac);
  287. HAL_StatusTypeDef HAL_DACEx_TriangleWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Amplitude);
  288. HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Amplitude);
  289. HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef* hdac, uint32_t Alignment, uint32_t Data1, uint32_t Data2);
  290. void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac);
  291. void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac);
  292. void HAL_DACEx_ErrorCallbackCh2(DAC_HandleTypeDef* hdac);
  293. #if defined (STM32F100xB) || defined (STM32F100xE)
  294. void HAL_DAC_IRQHandler(DAC_HandleTypeDef* hdac);
  295. void HAL_DAC_DMAUnderrunCallbackCh1(DAC_HandleTypeDef *hdac);
  296. void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef* hdac);
  297. #endif /* STM32F100xB) || defined (STM32F100xE) */
  298. /**
  299. * @}
  300. */
  301. /**
  302. * @}
  303. */
  304. /** @addtogroup DACEx_Private_Functions
  305. * @{
  306. */
  307. void DAC_DMAConvCpltCh2(DMA_HandleTypeDef *hdma);
  308. void DAC_DMAHalfConvCpltCh2(DMA_HandleTypeDef *hdma);
  309. void DAC_DMAErrorCh2(DMA_HandleTypeDef *hdma);
  310. /**
  311. * @}
  312. */
  313. /**
  314. * @}
  315. */
  316. /**
  317. * @}
  318. */
  319. #endif /* STM32F100xB || STM32F100xE || STM32F101xE || STM32F101xG || STM32F103xE || STM32F103xG || STM32F105xC || STM32F107xC */
  320. #ifdef __cplusplus
  321. }
  322. #endif
  323. #endif /*__STM32F1xx_HAL_DAC_EX_H */
  324. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/