meh

Fork of mbed by mbed official

Committer:
Kojto
Date:
Fri Oct 02 07:35:07 2015 +0200
Revision:
108:34e6b704fe68
Parent:
93:e188a91d3eaa
Release 108  of the mbed library

Changes:
- new platforms - ELMO_F411RE, WIZNET_7500P, ARM_MPS2_BEID
- EFM32 - bugfixes in rtc, serial
- Cortex A cmsis - update files
- STML4 - RAM fixes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 90:cb3d968589d8 1 /**
Kojto 90:cb3d968589d8 2 ******************************************************************************
Kojto 90:cb3d968589d8 3 * @file stm32f0xx_hal_dac_ex.h
Kojto 90:cb3d968589d8 4 * @author MCD Application Team
Kojto 108:34e6b704fe68 5 * @version V1.3.0
Kojto 108:34e6b704fe68 6 * @date 26-June-2015
Kojto 90:cb3d968589d8 7 * @brief Header file of DAC HAL Extension module.
Kojto 90:cb3d968589d8 8 ******************************************************************************
Kojto 90:cb3d968589d8 9 * @attention
Kojto 90:cb3d968589d8 10 *
Kojto 108:34e6b704fe68 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
Kojto 90:cb3d968589d8 12 *
Kojto 90:cb3d968589d8 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 90:cb3d968589d8 14 * are permitted provided that the following conditions are met:
Kojto 90:cb3d968589d8 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 90:cb3d968589d8 16 * this list of conditions and the following disclaimer.
Kojto 90:cb3d968589d8 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 90:cb3d968589d8 18 * this list of conditions and the following disclaimer in the documentation
Kojto 90:cb3d968589d8 19 * and/or other materials provided with the distribution.
Kojto 90:cb3d968589d8 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 90:cb3d968589d8 21 * may be used to endorse or promote products derived from this software
Kojto 90:cb3d968589d8 22 * without specific prior written permission.
Kojto 90:cb3d968589d8 23 *
Kojto 90:cb3d968589d8 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 90:cb3d968589d8 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 90:cb3d968589d8 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 90:cb3d968589d8 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 90:cb3d968589d8 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 90:cb3d968589d8 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 90:cb3d968589d8 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 90:cb3d968589d8 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 90:cb3d968589d8 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 90:cb3d968589d8 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 90:cb3d968589d8 34 *
Kojto 90:cb3d968589d8 35 ******************************************************************************
Kojto 90:cb3d968589d8 36 */
Kojto 90:cb3d968589d8 37
Kojto 90:cb3d968589d8 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 90:cb3d968589d8 39 #ifndef __STM32F0xx_HAL_DAC_EX_H
Kojto 90:cb3d968589d8 40 #define __STM32F0xx_HAL_DAC_EX_H
Kojto 90:cb3d968589d8 41
Kojto 90:cb3d968589d8 42 #ifdef __cplusplus
Kojto 90:cb3d968589d8 43 extern "C" {
Kojto 90:cb3d968589d8 44 #endif
Kojto 90:cb3d968589d8 45
Kojto 108:34e6b704fe68 46 /** @addtogroup STM32F0xx_HAL_Driver
Kojto 108:34e6b704fe68 47 * @{
Kojto 108:34e6b704fe68 48 */
Kojto 108:34e6b704fe68 49
Kojto 90:cb3d968589d8 50 #if defined(STM32F051x8) || defined(STM32F058xx) || \
Kojto 90:cb3d968589d8 51 defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
Kojto 90:cb3d968589d8 52 defined(STM32F091xC) || defined(STM32F098xx)
Kojto 90:cb3d968589d8 53
Kojto 90:cb3d968589d8 54 /* Includes ------------------------------------------------------------------*/
Kojto 90:cb3d968589d8 55 #include "stm32f0xx_hal_def.h"
Kojto 90:cb3d968589d8 56
Kojto 90:cb3d968589d8 57 /** @addtogroup DACEx
Kojto 90:cb3d968589d8 58 * @{
Kojto 90:cb3d968589d8 59 */
Kojto 90:cb3d968589d8 60
Kojto 90:cb3d968589d8 61 /* Exported types ------------------------------------------------------------*/
Kojto 90:cb3d968589d8 62
Kojto 108:34e6b704fe68 63 /* Exported constants --------------------------------------------------------*/
Kojto 90:cb3d968589d8 64
Kojto 90:cb3d968589d8 65 /** @defgroup DACEx_Exported_Constants DACEx Exported Constants
Kojto 90:cb3d968589d8 66 * @{
Kojto 90:cb3d968589d8 67 */
Kojto 90:cb3d968589d8 68
Kojto 90:cb3d968589d8 69 /** @defgroup DACEx_lfsrunmask_triangleamplitude DACEx lfsrunmask triangleamplitude
Kojto 90:cb3d968589d8 70 * @{
Kojto 90:cb3d968589d8 71 */
Kojto 90:cb3d968589d8 72 #define DAC_LFSRUNMASK_BIT0 ((uint32_t)0x00000000) /*!< Unmask DAC channel LFSR bit0 for noise wave generation */
Kojto 90:cb3d968589d8 73 #define DAC_LFSRUNMASK_BITS1_0 ((uint32_t)DAC_CR_MAMP1_0) /*!< Unmask DAC channel LFSR bit[1:0] for noise wave generation */
Kojto 90:cb3d968589d8 74 #define DAC_LFSRUNMASK_BITS2_0 ((uint32_t)DAC_CR_MAMP1_1) /*!< Unmask DAC channel LFSR bit[2:0] for noise wave generation */
Kojto 90:cb3d968589d8 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 90:cb3d968589d8 76 #define DAC_LFSRUNMASK_BITS4_0 ((uint32_t)DAC_CR_MAMP1_2) /*!< Unmask DAC channel LFSR bit[4:0] for noise wave generation */
Kojto 90:cb3d968589d8 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 90:cb3d968589d8 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 90:cb3d968589d8 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 90:cb3d968589d8 80 #define DAC_LFSRUNMASK_BITS8_0 ((uint32_t)DAC_CR_MAMP1_3) /*!< Unmask DAC channel LFSR bit[8:0] for noise wave generation */
Kojto 90:cb3d968589d8 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 90:cb3d968589d8 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 90:cb3d968589d8 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 90:cb3d968589d8 84 #define DAC_TRIANGLEAMPLITUDE_1 ((uint32_t)0x00000000) /*!< Select max triangle amplitude of 1 */
Kojto 90:cb3d968589d8 85 #define DAC_TRIANGLEAMPLITUDE_3 ((uint32_t)DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 3 */
Kojto 90:cb3d968589d8 86 #define DAC_TRIANGLEAMPLITUDE_7 ((uint32_t)DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 7 */
Kojto 90:cb3d968589d8 87 #define DAC_TRIANGLEAMPLITUDE_15 ((uint32_t)DAC_CR_MAMP1_1 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 15 */
Kojto 90:cb3d968589d8 88 #define DAC_TRIANGLEAMPLITUDE_31 ((uint32_t)DAC_CR_MAMP1_2) /*!< Select max triangle amplitude of 31 */
Kojto 90:cb3d968589d8 89 #define DAC_TRIANGLEAMPLITUDE_63 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 63 */
Kojto 90:cb3d968589d8 90 #define DAC_TRIANGLEAMPLITUDE_127 ((uint32_t)DAC_CR_MAMP1_2 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 127 */
Kojto 90:cb3d968589d8 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 90:cb3d968589d8 92 #define DAC_TRIANGLEAMPLITUDE_511 ((uint32_t)DAC_CR_MAMP1_3) /*!< Select max triangle amplitude of 511 */
Kojto 90:cb3d968589d8 93 #define DAC_TRIANGLEAMPLITUDE_1023 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_0) /*!< Select max triangle amplitude of 1023 */
Kojto 90:cb3d968589d8 94 #define DAC_TRIANGLEAMPLITUDE_2047 ((uint32_t)DAC_CR_MAMP1_3 | DAC_CR_MAMP1_1) /*!< Select max triangle amplitude of 2047 */
Kojto 90:cb3d968589d8 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 90:cb3d968589d8 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 90:cb3d968589d8 224 #define IS_DAC_LFSR_UNMASK_TRIANGLE_AMPLITUDE(VALUE) (((VALUE) == DAC_LFSRUNMASK_BIT0) || \
Kojto 90:cb3d968589d8 225 ((VALUE) == DAC_LFSRUNMASK_BITS1_0) || \
Kojto 90:cb3d968589d8 226 ((VALUE) == DAC_LFSRUNMASK_BITS2_0) || \
Kojto 90:cb3d968589d8 227 ((VALUE) == DAC_LFSRUNMASK_BITS3_0) || \
Kojto 90:cb3d968589d8 228 ((VALUE) == DAC_LFSRUNMASK_BITS4_0) || \
Kojto 90:cb3d968589d8 229 ((VALUE) == DAC_LFSRUNMASK_BITS5_0) || \
Kojto 90:cb3d968589d8 230 ((VALUE) == DAC_LFSRUNMASK_BITS6_0) || \
Kojto 90:cb3d968589d8 231 ((VALUE) == DAC_LFSRUNMASK_BITS7_0) || \
Kojto 90:cb3d968589d8 232 ((VALUE) == DAC_LFSRUNMASK_BITS8_0) || \
Kojto 90:cb3d968589d8 233 ((VALUE) == DAC_LFSRUNMASK_BITS9_0) || \
Kojto 90:cb3d968589d8 234 ((VALUE) == DAC_LFSRUNMASK_BITS10_0) || \
Kojto 90:cb3d968589d8 235 ((VALUE) == DAC_LFSRUNMASK_BITS11_0) || \
Kojto 90:cb3d968589d8 236 ((VALUE) == DAC_TRIANGLEAMPLITUDE_1) || \
Kojto 90:cb3d968589d8 237 ((VALUE) == DAC_TRIANGLEAMPLITUDE_3) || \
Kojto 90:cb3d968589d8 238 ((VALUE) == DAC_TRIANGLEAMPLITUDE_7) || \
Kojto 90:cb3d968589d8 239 ((VALUE) == DAC_TRIANGLEAMPLITUDE_15) || \
Kojto 90:cb3d968589d8 240 ((VALUE) == DAC_TRIANGLEAMPLITUDE_31) || \
Kojto 90:cb3d968589d8 241 ((VALUE) == DAC_TRIANGLEAMPLITUDE_63) || \
Kojto 90:cb3d968589d8 242 ((VALUE) == DAC_TRIANGLEAMPLITUDE_127) || \
Kojto 90:cb3d968589d8 243 ((VALUE) == DAC_TRIANGLEAMPLITUDE_255) || \
Kojto 90:cb3d968589d8 244 ((VALUE) == DAC_TRIANGLEAMPLITUDE_511) || \
Kojto 90:cb3d968589d8 245 ((VALUE) == DAC_TRIANGLEAMPLITUDE_1023) || \
Kojto 90:cb3d968589d8 246 ((VALUE) == DAC_TRIANGLEAMPLITUDE_2047) || \
Kojto 90:cb3d968589d8 247 ((VALUE) == DAC_TRIANGLEAMPLITUDE_4095))
Kojto 108:34e6b704fe68 248
Kojto 90:cb3d968589d8 249 /**
Kojto 90:cb3d968589d8 250 * @}
Kojto 90:cb3d968589d8 251 */
Kojto 90:cb3d968589d8 252
Kojto 108:34e6b704fe68 253 /* Exported functions --------------------------------------------------------*/
Kojto 108:34e6b704fe68 254
Kojto 108:34e6b704fe68 255 /** @addtogroup DACEx_Exported_Functions
Kojto 90:cb3d968589d8 256 * @{
Kojto 90:cb3d968589d8 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 90:cb3d968589d8 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 90:cb3d968589d8 284 /**
Kojto 90:cb3d968589d8 285 * @}
Kojto 90:cb3d968589d8 286 */
Kojto 90:cb3d968589d8 287
Kojto 90:cb3d968589d8 288 /**
Kojto 90:cb3d968589d8 289 * @}
Kojto 90:cb3d968589d8 290 */
Kojto 90:cb3d968589d8 291
Kojto 90:cb3d968589d8 292 /**
Kojto 90:cb3d968589d8 293 * @}
Kojto 90:cb3d968589d8 294 */
Kojto 90:cb3d968589d8 295
Kojto 108:34e6b704fe68 296 #endif /* STM32F051x8 || STM32F058xx || */
Kojto 108:34e6b704fe68 297 /* STM32F071xB || STM32F072xB || STM32F078xx || */
Kojto 108:34e6b704fe68 298 /* STM32F091xC || STM32F098xx */
Kojto 90:cb3d968589d8 299
Kojto 90:cb3d968589d8 300 /**
Kojto 90:cb3d968589d8 301 * @}
Kojto 90:cb3d968589d8 302 */
Kojto 90:cb3d968589d8 303
Kojto 90:cb3d968589d8 304 #ifdef __cplusplus
Kojto 90:cb3d968589d8 305 }
Kojto 108:34e6b704fe68 306 #endif
Kojto 108:34e6b704fe68 307
Kojto 90:cb3d968589d8 308 #endif /*__STM32F0xx_HAL_DAC_EX_H */
Kojto 90:cb3d968589d8 309
Kojto 90:cb3d968589d8 310 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/