]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F3/stm32f3xx_hal_dac_ex.h
Add a qwerty layer
[max/tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_STM / TARGET_STM32F3 / stm32f3xx_hal_dac_ex.h
1 /**
2   ******************************************************************************
3   * @file    stm32f3xx_hal_dac_ex.h
4   * @author  MCD Application Team
5   * @version V1.1.0
6   * @date    12-Sept-2014
7   * @brief   Header file of DAC HAL Extended 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 __STM32F3xx_HAL_DAC_EX_H
40 #define __STM32F3xx_HAL_DAC_EX_H
41
42 #ifdef __cplusplus
43  extern "C" {
44 #endif
45
46 /* Includes ------------------------------------------------------------------*/
47 #include "stm32f3xx_hal_def.h"
48
49 /** @addtogroup STM32F3xx_HAL_Driver
50   * @{
51   */
52
53 /** @addtogroup DACEx DAC Extended HAL module driver
54   * @{
55   */
56
57 /* Exported types ------------------------------------------------------------*/
58 /* Exported constants --------------------------------------------------------*/
59 /** @defgroup DACEx_Exported_Constants DAC Extended Exported Constants
60   * @{
61   */
62
63 /** @defgroup DACEx_trigger_selection DAC Extended trigger selection
64   * @{
65   */
66
67 #if defined(STM32F301x8) || defined(STM32F318xx)
68 #define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 
69                                                                      has been loaded, and not by external trigger */
70 #define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
71 #define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
72 #define DAC_TRIGGER_T15_TRGO               ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
73 #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 */
74 #define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
75
76 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
77                                  ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
78                                  ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
79                                  ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
80                                  ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
81                                  ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
82 #endif /* STM32F301x8 || STM32F318xx */
83
84 #if defined(STM32F302xE) || \
85     defined(STM32F302xC) || \
86     defined(STM32F302x8)
87
88 #define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 
89                                                                      has been loaded, and not by external trigger */
90 #define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
91 #define DAC_TRIGGER_T3_TRGO                ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */                                                                       
92 #define DAC_TRIGGER_T15_TRGO               ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
93 #define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
94 #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 */
95 #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 */
96 #define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
97
98 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
99                                  ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
100                                  ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
101                                  ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
102                                  ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
103                                  ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
104                                  ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
105                                  ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
106
107 #endif /* STM32F302xE || */
108        /* STM32F302xC || */
109        /* STM32F302x8 */
110
111 #if defined(STM32F303xE) || defined(STM32F398xx) || \
112     defined(STM32F303xC) || defined(STM32F358xx)
113
114 #define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 
115                                                                      has been loaded, and not by external trigger */
116 #define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
117 #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 */
118 #define DAC_TRIGGER_T15_TRGO               ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
119 #define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
120 #define DAC_TRIGGER_T7_TRGO                ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
121 #define DAC_TRIGGER_T3_TRGO                ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel 
122                                                                                            Use __HAL_REMAPTRIGGER_ENABLE(HAL_REMAPTRIGGER_DAC1_TRIG) for TIM3 selection */                                                                       
123 #define DAC_TRIGGER_T8_TRGO                DAC_TRIGGER_T3_TRGO                        /*!< TIM8 TRGO selected as external conversion trigger for DAC channel 
124                                                                                            Use __HAL_REMAPTRIGGER_DISABLE(HAL_REMAPTRIGGER_DAC1_TRIG) for TIM8 selection */                  
125
126 #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 */
127 #define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
128
129 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
130                                  ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
131                                  ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
132                                  ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
133                                  ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
134                                  ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
135                                  ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
136                                  ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
137                                  ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
138 #endif /* STM32F303xE || STM32F398xx || */
139        /* STM32F303xC || STM32F358xx    */
140
141
142 #if defined(STM32F303x8) || defined(STM32F328xx) 
143
144 #define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 
145                                                                      has been loaded, and not by external trigger */
146 #define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
147 #define DAC_TRIGGER_T15_TRGO               ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM5 TRGO selected as external conversion trigger for DAC channel */
148 #define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
149 #define DAC_TRIGGER_T7_TRGO                ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
150 #define DAC_TRIGGER_T3_TRGO                ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */                                                                       
151
152 #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 */
153 #define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
154
155 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
156                                  ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
157                                  ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
158                                  ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
159                                  ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
160                                  ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
161                                  ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
162                                  ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
163
164 #endif /* STM32F303x8 || STM32F328xx */
165
166
167 #if defined(STM32F373xC) || defined(STM32F378xx)
168  
169 #define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 
170                                                                      has been loaded, and not by external trigger */
171
172 #define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
173 #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 */
174 #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 (DAC1) */
175 #define DAC_TRIGGER_T18_TRGO               DAC_TRIGGER_T5_TRGO                                         /*!< TIM18 TRGO selected as external conversion trigger for DAC channel (DAC2) */
176 #define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
177 #define DAC_TRIGGER_T7_TRGO                ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
178 #define DAC_TRIGGER_T3_TRGO                ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */                                                                       
179
180 #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 */
181 #define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
182
183
184 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
185                                  ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
186                                  ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
187                                  ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
188                                  ((TRIGGER) == DAC_TRIGGER_T5_TRGO) || \
189                                  ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
190                                  ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
191                                  ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
192                                  ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
193 #endif /* STM32F373xC || STM32F378xx */
194
195 #if defined(STM32F334x8)
196
197 #define DAC_TRIGGER_NONE                   ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register 
198                                                                      has been loaded, and not by external trigger */
199 #define DAC_TRIGGER_T6_TRGO                ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
200 #define DAC_TRIGGER_T3_TRGO                ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel 
201                                                                                            Use __HAL_REMAPTRIGGER_ENABLE(HAL_REMAPTRIGGER_DAC1_TRIG) for TIM3 remap */
202
203 #define DAC_TRIGGER_T7_TRGO                ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
204 #define DAC_TRIGGER_T2_TRGO                ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
205 #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 
206                                                                                                             Use __HAL_REMAPTRIGGER_DISABLE(HAL_REMAPTRIGGER_DAC1_TRIG3) for TIM15 selection */ 
207 #define DAC_TRIGGER_HRTIM1_DACTRG1         DAC_TRIGGER_T15_TRGO      /*!< HRTIM1 DACTRG1 selected as external conversion trigger for DAC 
208                                                                           Use __HAL_REMAPTRIGGER_ENABLE(HAL_REMAPTRIGGER_DAC1_TRIG3) for HRTIM1 DACTRG1 selection */ 
209
210 #define DAC_TRIGGER_HRTIM1_DACTRG2         ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< HRTIM1 DACTRG2 selected as external conversion trigger for DAC channel (DAC1)
211                                                                                                             Use __HAL_REMAPTRIGGER_ENABLE(HAL_REMAPTRIGGER_DAC1_TRIG5) for HRTIM1 DACTRG2 remap */ 
212 #define DAC_TRIGGER_HRTIM1_DACTRG3         DAC_TRIGGER_HRTIM1_DACTRG2                                  /*!< HRTIM1 DACTRG3 selected as external conversion trigger for DAC channel (DAC2)*/
213
214 #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 */
215 #define DAC_TRIGGER_SOFTWARE               ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
216
217 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
218                                  ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
219                                  ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
220                                  ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
221                                  ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
222                                  ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
223                                  ((TRIGGER) == DAC_TRIGGER_HRTIM1_DACTRG2) || \
224                                  ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
225                                  ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
226
227 #endif /* STM32F334x8 */
228
229 /**
230   * @}
231   */
232
233 /** @defgroup DACEx_Channel_selection DAC Extended Channel selection
234   * @{
235   */
236  
237 #if defined(STM32F302xE) || \
238     defined(STM32F302xC) || \
239     defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx)
240 #define DAC_CHANNEL_1                      ((uint32_t)0x00000000)               /*!< DAC Channel 1 */
241 /* Aliases for compatibility */
242 #define DAC1_CHANNEL_1                     DAC_CHANNEL_1                        /*!< DAC1 Channel 1 */
243
244 #define IS_DAC_CHANNEL(CHANNEL) ((CHANNEL) == DAC_CHANNEL_1)            
245 #endif  /* STM32F302xE                               || */
246         /* STM32F302xC                               || */
247         /* STM32F301x8 || STM32F302x8 || STM32F318xx    */
248
249
250 #if defined(STM32F303xE) || defined(STM32F398xx) || \
251     defined(STM32F303xC) || defined(STM32F358xx)
252 #define DAC_CHANNEL_1                     ((uint32_t)0x00000000)       /*!< DAC Channel 1 */
253 #define DAC_CHANNEL_2                     ((uint32_t)0x00000010)       /*!< DAC Channel 2 */
254 /* Aliases for compatibility */
255 #define DAC1_CHANNEL_1                    DAC_CHANNEL_1                /*!< DAC1 Channel 1 */
256 #define DAC1_CHANNEL_2                    DAC_CHANNEL_2                /*!< DAC1 Channel 2 */
257
258 #define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_CHANNEL_1) || \
259                                  ((CHANNEL) == DAC_CHANNEL_2))
260 #endif /* STM32F303xE || STM32F398xx || */
261        /* STM32F303xC || STM32F358xx    */
262    
263 #if defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) || \
264     defined(STM32F373xC) || defined(STM32F378xx)
265
266 #define DAC_CHANNEL_1                     ((uint32_t)0x00000000)       /*!< DAC Channel 1 */
267 #define DAC_CHANNEL_2                     ((uint32_t)0x00000010)       /*!< DAC Channel 2 */
268
269 /* Aliases for compatibility */
270 #define DAC1_CHANNEL_1                     DAC_CHANNEL_1               /*!< DAC1 Channel 1 */
271 #define DAC1_CHANNEL_2                     DAC_CHANNEL_2               /*!< DAC1 Channel 2 */
272 #define DAC2_CHANNEL_1                     DAC_CHANNEL_1               /*!< DAC2 Channel 1 */
273
274 #define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_CHANNEL_1) || \
275                                  ((CHANNEL) == DAC_CHANNEL_2))
276 #endif /* STM32F303x8 || STM32F334x8 || STM32F328xx || */
277        /* STM32F373xC || STM32F378xx                   */
278    
279 /**
280   * @}
281   */
282
283 /**
284   * @}
285   */
286
287 /* Exported macro ------------------------------------------------------------*/
288 /** @addtogroup DACEx_Exported_Functions DAC Extended Exported Functions
289   * @{
290   */
291 /* Extended features functions ***********************************************/
292 uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef* hdac);
293 HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef* hdac, uint32_t alignment, uint32_t data1, uint32_t data2);
294 HAL_StatusTypeDef HAL_DACEx_TriangleWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t channel, uint32_t Amplitude);
295 HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t channel, uint32_t Amplitude);
296
297 void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac);
298 void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac);
299 void HAL_DACEx_ErrorCallbackCh2(DAC_HandleTypeDef *hdac);
300 void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef *hdac);
301
302 /**
303   * @}
304   */
305
306 /**
307    * @}
308    */
309
310 /**
311    * @}
312    */
313
314 #ifdef __cplusplus
315 }
316 #endif
317
318 #endif /* __STM32F3xx_HAL_HAL_EX_H */
319  
320 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/