annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_dac.h @ 80:cc2bb7bb8456

Added Spanish language
author heinrichsweikamp
date Sat, 06 Oct 2018 15:02:11 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_dac.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of DAC HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_DAC_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_DAC_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 #include "stm32f4xx_hal_def.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 /** @addtogroup DAC
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /** @defgroup DAC_Exported_Types DAC Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 * @brief HAL State structures definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 HAL_DAC_STATE_RESET = 0x00, /*!< DAC not yet initialized or disabled */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 HAL_DAC_STATE_READY = 0x01, /*!< DAC initialized and ready for use */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 HAL_DAC_STATE_BUSY = 0x02, /*!< DAC internal processing is ongoing */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 HAL_DAC_STATE_TIMEOUT = 0x03, /*!< DAC timeout state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 HAL_DAC_STATE_ERROR = 0x04 /*!< DAC error state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 }HAL_DAC_StateTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 * @brief DAC handle Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 DAC_TypeDef *Instance; /*!< Register base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 __IO HAL_DAC_StateTypeDef State; /*!< DAC communication state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 HAL_LockTypeDef Lock; /*!< DAC locking object */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 DMA_HandleTypeDef *DMA_Handle1; /*!< Pointer DMA handler for channel 1 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 DMA_HandleTypeDef *DMA_Handle2; /*!< Pointer DMA handler for channel 2 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 __IO uint32_t ErrorCode; /*!< DAC Error code */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 }DAC_HandleTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 * @brief DAC Configuration regular Channel structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 uint32_t DAC_Trigger; /*!< Specifies the external trigger for the selected DAC channel.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 This parameter can be a value of @ref DAC_trigger_selection */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103 uint32_t DAC_OutputBuffer; /*!< Specifies whether the DAC channel output buffer is enabled or disabled.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 This parameter can be a value of @ref DAC_output_buffer */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 }DAC_ChannelConfTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 /** @defgroup DAC_Exported_Constants DAC Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 /** @defgroup DAC_Error_Code DAC Error Code
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 #define HAL_DAC_ERROR_NONE 0x00 /*!< No error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 #define HAL_DAC_ERROR_DMAUNDERRUNCH1 0x01 /*!< DAC channel1 DAM underrun error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 #define HAL_DAC_ERROR_DMAUNDERRUNCH2 0x02 /*!< DAC channel2 DAM underrun error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 #define HAL_DAC_ERROR_DMA 0x04 /*!< DMA error */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126 /** @defgroup DAC_trigger_selection DAC Trigger Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130 #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 has been loaded, and not by external trigger */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 #define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 #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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 #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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 #define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 #define DAC_TRIGGER_T7_TRGO ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 #define DAC_TRIGGER_T8_TRGO ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM8 TRGO selected as external conversion trigger for DAC channel */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 #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 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 /** @defgroup DAC_output_buffer DAC Output Buffer
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 #define DAC_OUTPUTBUFFER_ENABLE ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 #define DAC_OUTPUTBUFFER_DISABLE ((uint32_t)DAC_CR_BOFF1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 /** @defgroup DAC_Channel_selection DAC Channel Selection
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 #define DAC_CHANNEL_1 ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 #define DAC_CHANNEL_2 ((uint32_t)0x00000010)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 /** @defgroup DAC_data_alignment DAC Data Alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 #define DAC_ALIGN_12B_R ((uint32_t)0x00000000)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 #define DAC_ALIGN_12B_L ((uint32_t)0x00000004)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 #define DAC_ALIGN_8B_R ((uint32_t)0x00000008)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /** @defgroup DAC_flags_definition DAC Flags Definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176 #define DAC_FLAG_DMAUDR1 ((uint32_t)DAC_SR_DMAUDR1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 #define DAC_FLAG_DMAUDR2 ((uint32_t)DAC_SR_DMAUDR2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 /** @defgroup DAC_IT_definition DAC IT Definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 #define DAC_IT_DMAUDR1 ((uint32_t)DAC_SR_DMAUDR1)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 #define DAC_IT_DMAUDR2 ((uint32_t)DAC_SR_DMAUDR2)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 /** @defgroup DAC_Exported_Macros DAC Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200 /** @brief Reset DAC handle state
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 * @param __HANDLE__: specifies the DAC handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 #define __HAL_DAC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DAC_STATE_RESET)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 /** @brief Enable the DAC channel
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 * @param __HANDLE__: specifies the DAC handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 * @param __DAC_Channel__: specifies the DAC channel
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 #define __HAL_DAC_ENABLE(__HANDLE__, __DAC_Channel__) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 ((__HANDLE__)->Instance->CR |= (DAC_CR_EN1 << (__DAC_Channel__)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 /** @brief Disable the DAC channel
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 * @param __HANDLE__: specifies the DAC handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 * @param __DAC_Channel__: specifies the DAC channel.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 #define __HAL_DAC_DISABLE(__HANDLE__, __DAC_Channel__) \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 ((__HANDLE__)->Instance->CR &= ~(DAC_CR_EN1 << (__DAC_Channel__)))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 /** @brief Enable the DAC interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223 * @param __HANDLE__: specifies the DAC handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 * @param __INTERRUPT__: specifies the DAC interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227 #define __HAL_DAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) |= (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 /** @brief Disable the DAC interrupt
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 * @param __HANDLE__: specifies the DAC handle
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 * @param __INTERRUPT__: specifies the DAC interrupt.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 #define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 /** @brief Get the selected DAC's flag status.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 * @param __HANDLE__: specifies the DAC handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 * @param __FLAG__: specifies the flag to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 * @arg DAC_FLAG_DMAUDR1: DMA underrun 1 flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 * @arg DAC_FLAG_DMAUDR2: DMA underrun 2 flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244 #define __HAL_DAC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 /** @brief Clear the DAC's flag.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 * @param __HANDLE__: specifies the DAC handle.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248 * @param __FLAG__: specifies the flag to clear.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 * This parameter can be any combination of the following values:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 * @arg DAC_FLAG_DMAUDR1: DMA underrun 1 flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 * @arg DAC_FLAG_DMAUDR2: DMA underrun 2 flag
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 #define __HAL_DAC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = (__FLAG__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 /* Include DAC HAL Extension module */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 #include "stm32f4xx_hal_dac_ex.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 /** @addtogroup DAC_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 /** @addtogroup DAC_Exported_Functions_Group1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270 /* Initialization/de-initialization functions *********************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 HAL_StatusTypeDef HAL_DAC_DeInit(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274 void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 /** @addtogroup DAC_Exported_Functions_Group2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
282 /* I/O operation functions ****************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
283 HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
284 HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef* hdac, uint32_t Channel);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
285 HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t* pData, uint32_t Length, uint32_t Alignment);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
286 HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
287 uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
288 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
289 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
290 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
291
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
292 /** @addtogroup DAC_Exported_Functions_Group3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
293 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
294 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
295 /* Peripheral Control functions ***********************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
296 HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef* hdac, DAC_ChannelConfTypeDef* sConfig, uint32_t Channel);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
297 HAL_StatusTypeDef HAL_DAC_SetValue(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Alignment, uint32_t Data);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
298 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
299 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
300 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
301
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
302 /** @addtogroup DAC_Exported_Functions_Group4
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
303 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
304 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
305 /* Peripheral State functions *************************************************/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
306 HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
307 void HAL_DAC_IRQHandler(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
308 uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
309
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
310 void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
311 void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
312 void HAL_DAC_ErrorCallbackCh1(DAC_HandleTypeDef *hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
313 void HAL_DAC_DMAUnderrunCallbackCh1(DAC_HandleTypeDef *hdac);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
314 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
315 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
316 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
317
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
318 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
319 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
320 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
321 /* Private types -------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
322 /* Private variables ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
323 /* Private constants ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
324 /** @defgroup DAC_Private_Constants DAC Private Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
325 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
326 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
327
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
328 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
329 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
330 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
331
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
332 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
333 /** @defgroup DAC_Private_Macros DAC Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
334 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
335 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
336 #define IS_DAC_DATA(DATA) ((DATA) <= 0xFFF0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
337 #define IS_DAC_ALIGN(ALIGN) (((ALIGN) == DAC_ALIGN_12B_R) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
338 ((ALIGN) == DAC_ALIGN_12B_L) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
339 ((ALIGN) == DAC_ALIGN_8B_R))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
340 #define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_CHANNEL_1) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
341 ((CHANNEL) == DAC_CHANNEL_2))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
342 #define IS_DAC_OUTPUT_BUFFER_STATE(STATE) (((STATE) == DAC_OUTPUTBUFFER_ENABLE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
343 ((STATE) == DAC_OUTPUTBUFFER_DISABLE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
344
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
345 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
346 ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
347 ((TRIGGER) == DAC_TRIGGER_T8_TRGO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
348 ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
349 ((TRIGGER) == DAC_TRIGGER_T5_TRGO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
350 ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
351 ((TRIGGER) == DAC_TRIGGER_T4_TRGO) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
352 ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
353 ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
354
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
355 /** @brief Set DHR12R1 alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
356 * @param __ALIGNMENT__: specifies the DAC alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
357 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
358 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
359 #define DAC_DHR12R1_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000008) + (__ALIGNMENT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
360
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
361 /** @brief Set DHR12R2 alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
362 * @param __ALIGNMENT__: specifies the DAC alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
363 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
364 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
365 #define DAC_DHR12R2_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000014) + (__ALIGNMENT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
366
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
367 /** @brief Set DHR12RD alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
368 * @param __ALIGNMENT__: specifies the DAC alignment
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
369 * @retval None
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
370 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
371 #define DAC_DHR12RD_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000020) + (__ALIGNMENT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
372
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
373 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
374 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
375 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
376
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
377 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
378 /** @defgroup DAC_Private_Functions DAC Private Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
379 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
380 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
381 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
382 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
383 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
384 #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
385
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
386 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
387 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
388 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
389
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
390 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
391 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
392 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
393
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
394 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
395 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
396 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
397
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
398 #endif /*__STM32F4xx_HAL_DAC_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
399
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
400 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/