mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
Kojto
Date:
Tue Feb 16 14:28:01 2016 +0000
Revision:
114:252557024ec3
Parent:
108:34e6b704fe68
Child:
122:f9eeca106725
Release 114 of the mbed library

Changes:
- Atmel SAM - warnings fixes
- B96B F446VE - hw control flow addition
- Remove of GCC CW which was not active
- Remove GCC CS, not released anymore - deprecated

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 93:e188a91d3eaa 1 /**
Kojto 93:e188a91d3eaa 2 ******************************************************************************
Kojto 93:e188a91d3eaa 3 * @file stm32f0xx_hal_dac_ex.h
Kojto 93:e188a91d3eaa 4 * @author MCD Application Team
Kojto 108:34e6b704fe68 5 * @version V1.3.0
Kojto 108:34e6b704fe68 6 * @date 26-June-2015
Kojto 93:e188a91d3eaa 7 * @brief Header file of DAC HAL Extension module.
Kojto 93:e188a91d3eaa 8 ******************************************************************************
Kojto 93:e188a91d3eaa 9 * @attention
Kojto 93:e188a91d3eaa 10 *
Kojto 108:34e6b704fe68 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 93:e188a91d3eaa 12 *
Kojto 93:e188a91d3eaa 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 93:e188a91d3eaa 14 * are permitted provided that the following conditions are met:
Kojto 93:e188a91d3eaa 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 93:e188a91d3eaa 16 * this list of conditions and the following disclaimer.
Kojto 93:e188a91d3eaa 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 93:e188a91d3eaa 18 * this list of conditions and the following disclaimer in the documentation
Kojto 93:e188a91d3eaa 19 * and/or other materials provided with the distribution.
Kojto 93:e188a91d3eaa 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 93:e188a91d3eaa 21 * may be used to endorse or promote products derived from this software
Kojto 93:e188a91d3eaa 22 * without specific prior written permission.
Kojto 93:e188a91d3eaa 23 *
Kojto 93:e188a91d3eaa 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 93:e188a91d3eaa 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 93:e188a91d3eaa 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 93:e188a91d3eaa 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 93:e188a91d3eaa 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 93:e188a91d3eaa 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 93:e188a91d3eaa 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 93:e188a91d3eaa 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 93:e188a91d3eaa 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 93:e188a91d3eaa 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 93:e188a91d3eaa 34 *
Kojto 93:e188a91d3eaa 35 ******************************************************************************
Kojto 93:e188a91d3eaa 36 */
Kojto 93:e188a91d3eaa 37
Kojto 93:e188a91d3eaa 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 93:e188a91d3eaa 39 #ifndef __STM32F0xx_HAL_DAC_EX_H
Kojto 93:e188a91d3eaa 40 #define __STM32F0xx_HAL_DAC_EX_H
Kojto 93:e188a91d3eaa 41
Kojto 93:e188a91d3eaa 42 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 43 extern "C" {
Kojto 93:e188a91d3eaa 44 #endif
Kojto 93:e188a91d3eaa 45
Kojto 108:34e6b704fe68 46 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 108:34e6b704fe68 47 * @{
Kojto 108:34e6b704fe68 48 */
Kojto 108:34e6b704fe68 49
Kojto 93:e188a91d3eaa 50 #if defined(STM32F051x8) || defined(STM32F058xx) || \
Kojto 93:e188a91d3eaa 51 defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
Kojto 93:e188a91d3eaa 52 defined(STM32F091xC) || defined(STM32F098xx)
Kojto 93:e188a91d3eaa 53
Kojto 93:e188a91d3eaa 54 /* Includes ------------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 55 #include "stm32f0xx_hal_def.h"
Kojto 93:e188a91d3eaa 56
Kojto 93:e188a91d3eaa 57 /** @addtogroup DACEx
Kojto 93:e188a91d3eaa 58 * @{
Kojto 93:e188a91d3eaa 59 */
Kojto 93:e188a91d3eaa 60
Kojto 93:e188a91d3eaa 61 /* Exported types ------------------------------------------------------------*/
Kojto 93:e188a91d3eaa 62
Kojto 108:34e6b704fe68 63 /* Exported constants --------------------------------------------------------*/
Kojto 93:e188a91d3eaa 64
Kojto 93:e188a91d3eaa 65 /** @defgroup DACEx_Exported_Constants DACEx Exported Constants
Kojto 93:e188a91d3eaa 66 * @{
Kojto 93:e188a91d3eaa 67 */
Kojto 93:e188a91d3eaa 68
Kojto 93:e188a91d3eaa 69 /** @defgroup DACEx_lfsrunmask_triangleamplitude DACEx lfsrunmask triangleamplitude
Kojto 93:e188a91d3eaa 70 * @{
Kojto 93:e188a91d3eaa 71 */
Kojto 93:e188a91d3eaa 72 #define DAC_LFSRUNMASK_BIT0 ((uint32_t)0x00000000) /*!< Unmask DAC channel LFSR bit0 for noise wave generation */
Kojto 93:e188a91d3eaa 73 #define DAC_LFSRUNMASK_BITS1_0 ((uint32_t)DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[1:0] for noise wave generation */
Kojto 93:e188a91d3eaa 74 #define DAC_LFSRUNMASK_BITS2_0 ((uint32_t)DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[2:0] for noise wave generation */
Kojto 93:e188a91d3eaa 75 #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 */
Kojto 93:e188a91d3eaa 76 #define DAC_LFSRUNMASK_BITS4_0 ((uint32_t)DAC_CR_MAMP1_2) /*!< Unmask DAC channel LFSR bit[4:0] for noise wave generation */
Kojto 93:e188a91d3eaa 77 #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 */
Kojto 93:e188a91d3eaa 78 #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 */
Kojto 93:e188a91d3eaa 79 #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 */
Kojto 93:e188a91d3eaa 80 #define DAC_LFSRUNMASK_BITS8_0 ((uint32_t)DAC_CR_MAMP1_3) /*!< Unmask DAC channel LFSR bit[8:0] for noise wave generation */
Kojto 93:e188a91d3eaa 81 #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 */
Kojto 93:e188a91d3eaa 82 #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 */
Kojto 93:e188a91d3eaa 83 #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 */
Kojto 93:e188a91d3eaa 84 #define DAC_TRIANGLEAMPLITUDE_1 ((uint32_t)0x00000000) /*!< Select max triangle amplitude of 1 */
Kojto 93:e188a91d3eaa 85 #define DAC_TRIANGLEAMPLITUDE_3 ((uint32_t)DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 3 */
Kojto 93:e188a91d3eaa 86 #define DAC_TRIANGLEAMPLITUDE_7 ((uint32_t)DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 7 */
Kojto 93:e188a91d3eaa 87 #define DAC_TRIANGLEAMPLITUDE_15 ((uint32_t)DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 15 */
Kojto 93:e188a91d3eaa 88 #define DAC_TRIANGLEAMPLITUDE_31 ((uint32_t)DAC_CR_MAMP1_2) /*!< Select max triangle amplitude of 31 */
Kojto 93:e188a91d3eaa 89 #define DAC_TRIANGLEAMPLITUDE_63 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 63 */
Kojto 93:e188a91d3eaa 90 #define DAC_TRIANGLEAMPLITUDE_127 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 127 */
Kojto 93:e188a91d3eaa 91 #define DAC_TRIANGLEAMPLITUDE_255 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 255 */
Kojto 93:e188a91d3eaa 92 #define DAC_TRIANGLEAMPLITUDE_511 ((uint32_t)DAC_CR_MAMP1_3) /*!< Select max triangle amplitude of 511 */
Kojto 93:e188a91d3eaa 93 #define DAC_TRIANGLEAMPLITUDE_1023 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 1023 */
Kojto 93:e188a91d3eaa 94 #define DAC_TRIANGLEAMPLITUDE_2047 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 2047 */
Kojto 93:e188a91d3eaa 95 #define DAC_TRIANGLEAMPLITUDE_4095 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 4095 */
Kojto 93:e188a91d3eaa 96
Kojto 108:34e6b704fe68 97
Kojto 108:34e6b704fe68 98 /**
Kojto 108:34e6b704fe68 99 * @}
Kojto 108:34e6b704fe68 100 */
Kojto 108:34e6b704fe68 101
Kojto 108:34e6b704fe68 102 /**
Kojto 108:34e6b704fe68 103 * @}
Kojto 108:34e6b704fe68 104 */
Kojto 108:34e6b704fe68 105
Kojto 108:34e6b704fe68 106 /* Exported macro ------------------------------------------------------------*/
Kojto 108:34e6b704fe68 107
Kojto 108:34e6b704fe68 108
Kojto 108:34e6b704fe68 109 /** @defgroup DACEx_Exported_Macros DACEx Exported Macros
Kojto 108:34e6b704fe68 110 * @{
Kojto 108:34e6b704fe68 111 */
Kojto 108:34e6b704fe68 112
Kojto 108:34e6b704fe68 113 /** @defgroup DAC_trigger_selection DAC trigger selection
Kojto 108:34e6b704fe68 114 * @{
Kojto 108:34e6b704fe68 115 */
Kojto 108:34e6b704fe68 116 #if defined(STM32F051x8) || defined(STM32F058xx)
Kojto 108:34e6b704fe68 117
Kojto 108:34e6b704fe68 118 #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register
Kojto 108:34e6b704fe68 119 has been loaded, and not by external trigger */
Kojto 108:34e6b704fe68 120 #define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
Kojto 108:34e6b704fe68 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 */
Kojto 108:34e6b704fe68 122 #define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
Kojto 108:34e6b704fe68 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 */
Kojto 108:34e6b704fe68 124 #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 */
Kojto 108:34e6b704fe68 125 #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
Kojto 108:34e6b704fe68 126
Kojto 108:34e6b704fe68 127 #endif /* STM32F051x8 || STM32F058xx */
Kojto 108:34e6b704fe68 128
Kojto 108:34e6b704fe68 129 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
Kojto 108:34e6b704fe68 130 defined(STM32F091xC) || defined(STM32F098xx)
Kojto 108:34e6b704fe68 131
Kojto 108:34e6b704fe68 132 #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC1_DHRxxxx register
Kojto 108:34e6b704fe68 133 has been loaded, and not by external trigger */
Kojto 108:34e6b704fe68 134 #define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */
Kojto 108:34e6b704fe68 135 #define DAC_TRIGGER_T3_TRGO ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM3 TRGO selected as external conversion trigger for DAC channel */
Kojto 108:34e6b704fe68 136 #define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */
Kojto 108:34e6b704fe68 137 #define DAC_TRIGGER_T7_TRGO ((uint32_t)(DAC_CR_TSEL1_1 | DAC_CR_TEN1)) /*!< TIM7 TRGO selected as external conversion trigger for DAC channel */
Kojto 108:34e6b704fe68 138 #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 */
Kojto 108:34e6b704fe68 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 */
Kojto 108:34e6b704fe68 140 #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */
Kojto 108:34e6b704fe68 141
Kojto 108:34e6b704fe68 142 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || */
Kojto 108:34e6b704fe68 143 /* STM32F091xC || STM32F098xx */
Kojto 108:34e6b704fe68 144
Kojto 108:34e6b704fe68 145 /**
Kojto 108:34e6b704fe68 146 * @}
Kojto 108:34e6b704fe68 147 */
Kojto 108:34e6b704fe68 148
Kojto 108:34e6b704fe68 149 /** @defgroup DAC_Channel_selection DAC Channel selection
Kojto 108:34e6b704fe68 150 * @{
Kojto 108:34e6b704fe68 151 */
Kojto 108:34e6b704fe68 152
Kojto 108:34e6b704fe68 153 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
Kojto 108:34e6b704fe68 154 defined(STM32F091xC) || defined(STM32F098xx)
Kojto 108:34e6b704fe68 155
Kojto 108:34e6b704fe68 156 #define DAC_CHANNEL_1 ((uint32_t)0x00000000)
Kojto 108:34e6b704fe68 157 #define DAC_CHANNEL_2 ((uint32_t)0x00000010)
Kojto 108:34e6b704fe68 158
Kojto 108:34e6b704fe68 159 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || */
Kojto 108:34e6b704fe68 160 /* STM32F091xC || STM32F098xx */
Kojto 108:34e6b704fe68 161
Kojto 108:34e6b704fe68 162 #if defined(STM32F051x8) || defined(STM32F058xx)
Kojto 108:34e6b704fe68 163
Kojto 108:34e6b704fe68 164 #define DAC_CHANNEL_1 ((uint32_t)0x00000000)
Kojto 108:34e6b704fe68 165
Kojto 108:34e6b704fe68 166 #endif /* STM32F051x8 || STM32F058xx */
Kojto 108:34e6b704fe68 167
Kojto 108:34e6b704fe68 168 /**
Kojto 108:34e6b704fe68 169 * @}
Kojto 108:34e6b704fe68 170 */
Kojto 108:34e6b704fe68 171
Kojto 108:34e6b704fe68 172 /**
Kojto 108:34e6b704fe68 173 * @}
Kojto 108:34e6b704fe68 174 */
Kojto 108:34e6b704fe68 175
Kojto 108:34e6b704fe68 176 /* Private macro -------------------------------------------------------------*/
Kojto 108:34e6b704fe68 177
Kojto 108:34e6b704fe68 178 /** @addtogroup DACEx_Private_Macros
Kojto 108:34e6b704fe68 179 * @{
Kojto 108:34e6b704fe68 180 */
Kojto 108:34e6b704fe68 181
Kojto 108:34e6b704fe68 182 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
Kojto 108:34e6b704fe68 183 defined(STM32F091xC) || defined(STM32F098xx)
Kojto 108:34e6b704fe68 184
Kojto 108:34e6b704fe68 185 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
Kojto 108:34e6b704fe68 186 ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
Kojto 108:34e6b704fe68 187 ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
Kojto 108:34e6b704fe68 188 ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
Kojto 108:34e6b704fe68 189 ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
Kojto 108:34e6b704fe68 190 ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
Kojto 108:34e6b704fe68 191 ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
Kojto 108:34e6b704fe68 192 ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
Kojto 108:34e6b704fe68 193
Kojto 108:34e6b704fe68 194 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || */
Kojto 108:34e6b704fe68 195 /* STM32F091xC || STM32F098xx */
Kojto 108:34e6b704fe68 196
Kojto 108:34e6b704fe68 197 #if defined(STM32F051x8) || defined(STM32F058xx)
Kojto 108:34e6b704fe68 198
Kojto 108:34e6b704fe68 199 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
Kojto 108:34e6b704fe68 200 ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
Kojto 108:34e6b704fe68 201 ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
Kojto 108:34e6b704fe68 202 ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
Kojto 108:34e6b704fe68 203 ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
Kojto 108:34e6b704fe68 204 ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
Kojto 108:34e6b704fe68 205 ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
Kojto 108:34e6b704fe68 206
Kojto 108:34e6b704fe68 207 #endif /* STM32F051x8 || STM32F058xx */
Kojto 108:34e6b704fe68 208
Kojto 108:34e6b704fe68 209 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
Kojto 108:34e6b704fe68 210 defined(STM32F091xC) || defined(STM32F098xx)
Kojto 108:34e6b704fe68 211
Kojto 108:34e6b704fe68 212 #define IS_DAC_TRIGGER(TRIGGER) (((TRIGGER) == DAC_TRIGGER_NONE) || \
Kojto 108:34e6b704fe68 213 ((TRIGGER) == DAC_TRIGGER_T2_TRGO) || \
Kojto 108:34e6b704fe68 214 ((TRIGGER) == DAC_TRIGGER_T3_TRGO) || \
Kojto 108:34e6b704fe68 215 ((TRIGGER) == DAC_TRIGGER_T6_TRGO) || \
Kojto 108:34e6b704fe68 216 ((TRIGGER) == DAC_TRIGGER_T7_TRGO) || \
Kojto 108:34e6b704fe68 217 ((TRIGGER) == DAC_TRIGGER_T15_TRGO) || \
Kojto 108:34e6b704fe68 218 ((TRIGGER) == DAC_TRIGGER_EXT_IT9) || \
Kojto 108:34e6b704fe68 219 ((TRIGGER) == DAC_TRIGGER_SOFTWARE))
Kojto 108:34e6b704fe68 220
Kojto 108:34e6b704fe68 221 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || */
Kojto 108:34e6b704fe68 222 /* STM32F091xC || STM32F098xx */
Kojto 108:34e6b704fe68 223
Kojto 93:e188a91d3eaa 224 #define IS_DAC_LFSR_UNMASK_TRIANGLE_AMPLITUDE(VALUE) (((VALUE) == DAC_LFSRUNMASK_BIT0) || \
Kojto 93:e188a91d3eaa 225 ((VALUE) == DAC_LFSRUNMASK_BITS1_0) || \
Kojto 93:e188a91d3eaa 226 ((VALUE) == DAC_LFSRUNMASK_BITS2_0) || \
Kojto 93:e188a91d3eaa 227 ((VALUE) == DAC_LFSRUNMASK_BITS3_0) || \
Kojto 93:e188a91d3eaa 228 ((VALUE) == DAC_LFSRUNMASK_BITS4_0) || \
Kojto 93:e188a91d3eaa 229 ((VALUE) == DAC_LFSRUNMASK_BITS5_0) || \
Kojto 93:e188a91d3eaa 230 ((VALUE) == DAC_LFSRUNMASK_BITS6_0) || \
Kojto 93:e188a91d3eaa 231 ((VALUE) == DAC_LFSRUNMASK_BITS7_0) || \
Kojto 93:e188a91d3eaa 232 ((VALUE) == DAC_LFSRUNMASK_BITS8_0) || \
Kojto 93:e188a91d3eaa 233 ((VALUE) == DAC_LFSRUNMASK_BITS9_0) || \
Kojto 93:e188a91d3eaa 234 ((VALUE) == DAC_LFSRUNMASK_BITS10_0) || \
Kojto 93:e188a91d3eaa 235 ((VALUE) == DAC_LFSRUNMASK_BITS11_0) || \
Kojto 93:e188a91d3eaa 236 ((VALUE) == DAC_TRIANGLEAMPLITUDE_1) || \
Kojto 93:e188a91d3eaa 237 ((VALUE) == DAC_TRIANGLEAMPLITUDE_3) || \
Kojto 93:e188a91d3eaa 238 ((VALUE) == DAC_TRIANGLEAMPLITUDE_7) || \
Kojto 93:e188a91d3eaa 239 ((VALUE) == DAC_TRIANGLEAMPLITUDE_15) || \
Kojto 93:e188a91d3eaa 240 ((VALUE) == DAC_TRIANGLEAMPLITUDE_31) || \
Kojto 93:e188a91d3eaa 241 ((VALUE) == DAC_TRIANGLEAMPLITUDE_63) || \
Kojto 93:e188a91d3eaa 242 ((VALUE) == DAC_TRIANGLEAMPLITUDE_127) || \
Kojto 93:e188a91d3eaa 243 ((VALUE) == DAC_TRIANGLEAMPLITUDE_255) || \
Kojto 93:e188a91d3eaa 244 ((VALUE) == DAC_TRIANGLEAMPLITUDE_511) || \
Kojto 93:e188a91d3eaa 245 ((VALUE) == DAC_TRIANGLEAMPLITUDE_1023) || \
Kojto 93:e188a91d3eaa 246 ((VALUE) == DAC_TRIANGLEAMPLITUDE_2047) || \
Kojto 93:e188a91d3eaa 247 ((VALUE) == DAC_TRIANGLEAMPLITUDE_4095))
Kojto 108:34e6b704fe68 248
Kojto 93:e188a91d3eaa 249 /**
Kojto 93:e188a91d3eaa 250 * @}
Kojto 93:e188a91d3eaa 251 */
Kojto 93:e188a91d3eaa 252
Kojto 108:34e6b704fe68 253 /* Exported functions --------------------------------------------------------*/
Kojto 108:34e6b704fe68 254
Kojto 108:34e6b704fe68 255 /** @addtogroup DACEx_Exported_Functions
Kojto 93:e188a91d3eaa 256 * @{
Kojto 93:e188a91d3eaa 257 */
Kojto 108:34e6b704fe68 258
Kojto 108:34e6b704fe68 259 /** @addtogroup DACEx_Exported_Functions_Group1
Kojto 108:34e6b704fe68 260 * @{
Kojto 108:34e6b704fe68 261 */
Kojto 108:34e6b704fe68 262 /* IO operation functions *****************************************************/
Kojto 108:34e6b704fe68 263
Kojto 108:34e6b704fe68 264 HAL_StatusTypeDef HAL_DACEx_TriangleWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Amplitude);
Kojto 108:34e6b704fe68 265 HAL_StatusTypeDef HAL_DACEx_NoiseWaveGenerate(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Amplitude);
Kojto 108:34e6b704fe68 266 HAL_StatusTypeDef HAL_DACEx_DualSetValue(DAC_HandleTypeDef* hdac, uint32_t Alignment, uint32_t Data1, uint32_t Data2);
Kojto 93:e188a91d3eaa 267
Kojto 108:34e6b704fe68 268 void HAL_DACEx_ConvCpltCallbackCh2(DAC_HandleTypeDef* hdac);
Kojto 108:34e6b704fe68 269 void HAL_DACEx_ConvHalfCpltCallbackCh2(DAC_HandleTypeDef* hdac);
Kojto 108:34e6b704fe68 270 void HAL_DACEx_ErrorCallbackCh2(DAC_HandleTypeDef* hdac);
Kojto 108:34e6b704fe68 271 void HAL_DACEx_DMAUnderrunCallbackCh2(DAC_HandleTypeDef* hdac);
Kojto 108:34e6b704fe68 272
Kojto 108:34e6b704fe68 273 /**
Kojto 108:34e6b704fe68 274 * @}
Kojto 108:34e6b704fe68 275 */
Kojto 108:34e6b704fe68 276
Kojto 108:34e6b704fe68 277 /** @addtogroup DACEx_Exported_Functions_Group3
Kojto 108:34e6b704fe68 278 * @{
Kojto 108:34e6b704fe68 279 */
Kojto 108:34e6b704fe68 280 /* Peripheral Control functions ***********************************************/
Kojto 108:34e6b704fe68 281
Kojto 108:34e6b704fe68 282 uint32_t HAL_DACEx_DualGetValue(DAC_HandleTypeDef* hdac);
Kojto 108:34e6b704fe68 283
Kojto 93:e188a91d3eaa 284 /**
Kojto 93:e188a91d3eaa 285 * @}
Kojto 93:e188a91d3eaa 286 */
Kojto 93:e188a91d3eaa 287
Kojto 93:e188a91d3eaa 288 /**
Kojto 93:e188a91d3eaa 289 * @}
Kojto 93:e188a91d3eaa 290 */
Kojto 93:e188a91d3eaa 291
Kojto 93:e188a91d3eaa 292 /**
Kojto 93:e188a91d3eaa 293 * @}
Kojto 93:e188a91d3eaa 294 */
Kojto 93:e188a91d3eaa 295
Kojto 108:34e6b704fe68 296 #endif /* STM32F051x8 || STM32F058xx || */
Kojto 108:34e6b704fe68 297 /* STM32F071xB || STM32F072xB || STM32F078xx || */
Kojto 108:34e6b704fe68 298 /* STM32F091xC || STM32F098xx */
Kojto 93:e188a91d3eaa 299
Kojto 93:e188a91d3eaa 300 /**
Kojto 93:e188a91d3eaa 301 * @}
Kojto 93:e188a91d3eaa 302 */
Kojto 93:e188a91d3eaa 303
Kojto 93:e188a91d3eaa 304 #ifdef __cplusplus
Kojto 93:e188a91d3eaa 305 }
Kojto 108:34e6b704fe68 306 #endif
Kojto 108:34e6b704fe68 307
Kojto 93:e188a91d3eaa 308 #endif /*__STM32F0xx_HAL_DAC_EX_H */
Kojto 93:e188a91d3eaa 309
Kojto 93:e188a91d3eaa 310 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/