The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_L486RG/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_dac.h@145:64910690c574, 2017-06-21 (annotated)
- Committer:
- AnnaBridge
- Date:
- Wed Jun 21 17:31:38 2017 +0100
- Revision:
- 145:64910690c574
- Parent:
- 128:9bcdf88f62b0
Release 145 of the mbed library.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 122:f9eeca106725 | 1 | /** |
Kojto | 122:f9eeca106725 | 2 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 3 | * @file stm32l4xx_hal_dac.h |
Kojto | 122:f9eeca106725 | 4 | * @author MCD Application Team |
AnnaBridge | 145:64910690c574 | 5 | * @version V1.7.1 |
AnnaBridge | 145:64910690c574 | 6 | * @date 21-April-2017 |
Kojto | 122:f9eeca106725 | 7 | * @brief Header file of DAC HAL module. |
Kojto | 122:f9eeca106725 | 8 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 9 | * @attention |
Kojto | 122:f9eeca106725 | 10 | * |
AnnaBridge | 145:64910690c574 | 11 | * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2> |
Kojto | 122:f9eeca106725 | 12 | * |
Kojto | 122:f9eeca106725 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
Kojto | 122:f9eeca106725 | 14 | * are permitted provided that the following conditions are met: |
Kojto | 122:f9eeca106725 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
Kojto | 122:f9eeca106725 | 16 | * this list of conditions and the following disclaimer. |
Kojto | 122:f9eeca106725 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
Kojto | 122:f9eeca106725 | 18 | * this list of conditions and the following disclaimer in the documentation |
Kojto | 122:f9eeca106725 | 19 | * and/or other materials provided with the distribution. |
Kojto | 122:f9eeca106725 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
Kojto | 122:f9eeca106725 | 21 | * may be used to endorse or promote products derived from this software |
Kojto | 122:f9eeca106725 | 22 | * without specific prior written permission. |
Kojto | 122:f9eeca106725 | 23 | * |
Kojto | 122:f9eeca106725 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
Kojto | 122:f9eeca106725 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
Kojto | 122:f9eeca106725 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
Kojto | 122:f9eeca106725 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
Kojto | 122:f9eeca106725 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
Kojto | 122:f9eeca106725 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
Kojto | 122:f9eeca106725 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
Kojto | 122:f9eeca106725 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
Kojto | 122:f9eeca106725 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
Kojto | 122:f9eeca106725 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Kojto | 122:f9eeca106725 | 34 | * |
Kojto | 122:f9eeca106725 | 35 | ****************************************************************************** |
Kojto | 122:f9eeca106725 | 36 | */ |
Kojto | 122:f9eeca106725 | 37 | |
Kojto | 122:f9eeca106725 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
Kojto | 122:f9eeca106725 | 39 | #ifndef __STM32L4xx_HAL_DAC_H |
Kojto | 122:f9eeca106725 | 40 | #define __STM32L4xx_HAL_DAC_H |
Kojto | 122:f9eeca106725 | 41 | |
Kojto | 122:f9eeca106725 | 42 | #ifdef __cplusplus |
Kojto | 122:f9eeca106725 | 43 | extern "C" { |
Kojto | 122:f9eeca106725 | 44 | #endif |
Kojto | 122:f9eeca106725 | 45 | |
Kojto | 122:f9eeca106725 | 46 | |
Kojto | 122:f9eeca106725 | 47 | /* Includes ------------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 48 | #include "stm32l4xx_hal_def.h" |
Kojto | 122:f9eeca106725 | 49 | |
Kojto | 122:f9eeca106725 | 50 | /** @addtogroup STM32L4xx_HAL_Driver |
Kojto | 122:f9eeca106725 | 51 | * @{ |
Kojto | 122:f9eeca106725 | 52 | */ |
Kojto | 122:f9eeca106725 | 53 | |
Kojto | 122:f9eeca106725 | 54 | /** @addtogroup DAC |
Kojto | 122:f9eeca106725 | 55 | * @{ |
Kojto | 122:f9eeca106725 | 56 | */ |
Kojto | 122:f9eeca106725 | 57 | |
Kojto | 122:f9eeca106725 | 58 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 59 | |
Kojto | 122:f9eeca106725 | 60 | /** @defgroup DAC_Exported_Types DAC Exported Types |
Kojto | 122:f9eeca106725 | 61 | * @{ |
Kojto | 122:f9eeca106725 | 62 | */ |
Kojto | 122:f9eeca106725 | 63 | |
Kojto | 122:f9eeca106725 | 64 | /** |
Kojto | 122:f9eeca106725 | 65 | * @brief HAL State structures definition |
Kojto | 122:f9eeca106725 | 66 | */ |
Kojto | 122:f9eeca106725 | 67 | typedef enum |
Kojto | 122:f9eeca106725 | 68 | { |
Kojto | 122:f9eeca106725 | 69 | HAL_DAC_STATE_RESET = 0x00, /*!< DAC not yet initialized or disabled */ |
Kojto | 122:f9eeca106725 | 70 | HAL_DAC_STATE_READY = 0x01, /*!< DAC initialized and ready for use */ |
Kojto | 122:f9eeca106725 | 71 | HAL_DAC_STATE_BUSY = 0x02, /*!< DAC internal processing is ongoing */ |
Kojto | 122:f9eeca106725 | 72 | HAL_DAC_STATE_TIMEOUT = 0x03, /*!< DAC timeout state */ |
Kojto | 122:f9eeca106725 | 73 | HAL_DAC_STATE_ERROR = 0x04 /*!< DAC error state */ |
Kojto | 122:f9eeca106725 | 74 | |
Kojto | 122:f9eeca106725 | 75 | }HAL_DAC_StateTypeDef; |
Kojto | 122:f9eeca106725 | 76 | |
Kojto | 122:f9eeca106725 | 77 | /** |
Kojto | 122:f9eeca106725 | 78 | * @brief DAC handle Structure definition |
Kojto | 122:f9eeca106725 | 79 | */ |
Kojto | 122:f9eeca106725 | 80 | typedef struct |
Kojto | 122:f9eeca106725 | 81 | { |
Kojto | 122:f9eeca106725 | 82 | DAC_TypeDef *Instance; /*!< Register base address */ |
Kojto | 122:f9eeca106725 | 83 | |
Kojto | 122:f9eeca106725 | 84 | __IO HAL_DAC_StateTypeDef State; /*!< DAC communication state */ |
Kojto | 122:f9eeca106725 | 85 | |
Kojto | 122:f9eeca106725 | 86 | HAL_LockTypeDef Lock; /*!< DAC locking object */ |
Kojto | 122:f9eeca106725 | 87 | |
Kojto | 122:f9eeca106725 | 88 | DMA_HandleTypeDef *DMA_Handle1; /*!< Pointer DMA handler for channel 1 */ |
Kojto | 122:f9eeca106725 | 89 | |
Kojto | 122:f9eeca106725 | 90 | DMA_HandleTypeDef *DMA_Handle2; /*!< Pointer DMA handler for channel 2 */ |
Kojto | 122:f9eeca106725 | 91 | |
Kojto | 122:f9eeca106725 | 92 | __IO uint32_t ErrorCode; /*!< DAC Error code */ |
Kojto | 122:f9eeca106725 | 93 | |
Kojto | 122:f9eeca106725 | 94 | }DAC_HandleTypeDef; |
Kojto | 122:f9eeca106725 | 95 | |
Kojto | 122:f9eeca106725 | 96 | /** |
Kojto | 122:f9eeca106725 | 97 | * @brief DAC Configuration sample and hold Channel structure definition |
Kojto | 122:f9eeca106725 | 98 | */ |
Kojto | 122:f9eeca106725 | 99 | typedef struct |
Kojto | 122:f9eeca106725 | 100 | { |
Kojto | 122:f9eeca106725 | 101 | uint32_t DAC_SampleTime ; /*!< Specifies the Sample time for the selected channel. |
Kojto | 122:f9eeca106725 | 102 | This parameter applies when DAC_SampleAndHold is DAC_SAMPLEANDHOLD_ENABLE. |
Kojto | 122:f9eeca106725 | 103 | This parameter must be a number between Min_Data = 0 and Max_Data = 1023 */ |
Kojto | 122:f9eeca106725 | 104 | |
Kojto | 122:f9eeca106725 | 105 | uint32_t DAC_HoldTime ; /*!< Specifies the hold time for the selected channel |
Kojto | 122:f9eeca106725 | 106 | This parameter applies when DAC_SampleAndHold is DAC_SAMPLEANDHOLD_ENABLE. |
Kojto | 122:f9eeca106725 | 107 | This parameter must be a number between Min_Data = 0 and Max_Data = 1023 */ |
Kojto | 122:f9eeca106725 | 108 | |
Kojto | 122:f9eeca106725 | 109 | uint32_t DAC_RefreshTime ; /*!< Specifies the refresh time for the selected channel |
Kojto | 122:f9eeca106725 | 110 | This parameter applies when DAC_SampleAndHold is DAC_SAMPLEANDHOLD_ENABLE. |
Kojto | 122:f9eeca106725 | 111 | This parameter must be a number between Min_Data = 0 and Max_Data = 255 */ |
Kojto | 122:f9eeca106725 | 112 | } |
Kojto | 122:f9eeca106725 | 113 | DAC_SampleAndHoldConfTypeDef; |
Kojto | 122:f9eeca106725 | 114 | |
Kojto | 122:f9eeca106725 | 115 | /** |
Kojto | 122:f9eeca106725 | 116 | * @brief DAC Configuration regular Channel structure definition |
Kojto | 122:f9eeca106725 | 117 | */ |
Kojto | 122:f9eeca106725 | 118 | typedef struct |
Kojto | 122:f9eeca106725 | 119 | { |
Kojto | 122:f9eeca106725 | 120 | uint32_t DAC_SampleAndHold; /*!< Specifies whether the DAC mode. |
Kojto | 122:f9eeca106725 | 121 | This parameter can be a value of @ref DAC_SampleAndHold */ |
Kojto | 122:f9eeca106725 | 122 | |
Kojto | 122:f9eeca106725 | 123 | uint32_t DAC_Trigger; /*!< Specifies the external trigger for the selected DAC channel. |
Kojto | 122:f9eeca106725 | 124 | This parameter can be a value of @ref DAC_trigger_selection */ |
Kojto | 122:f9eeca106725 | 125 | |
Kojto | 122:f9eeca106725 | 126 | uint32_t DAC_OutputBuffer; /*!< Specifies whether the DAC channel output buffer is enabled or disabled. |
Kojto | 122:f9eeca106725 | 127 | This parameter can be a value of @ref DAC_output_buffer */ |
Kojto | 122:f9eeca106725 | 128 | |
Kojto | 122:f9eeca106725 | 129 | uint32_t DAC_ConnectOnChipPeripheral ; /*!< Specifies whether the DAC output is connected or not to on chip peripheral . |
Kojto | 122:f9eeca106725 | 130 | This parameter can be a value of @ref DAC_ConnectOnChipPeripheral */ |
Kojto | 122:f9eeca106725 | 131 | |
Kojto | 122:f9eeca106725 | 132 | uint32_t DAC_UserTrimming; /*!< Specifies the trimming mode |
Kojto | 122:f9eeca106725 | 133 | This parameter must be a value of @ref DAC_UserTrimming |
Kojto | 122:f9eeca106725 | 134 | DAC_UserTrimming is either factory or user trimming */ |
Kojto | 122:f9eeca106725 | 135 | |
Kojto | 122:f9eeca106725 | 136 | uint32_t DAC_TrimmingValue; /*!< Specifies the offset trimming value |
Kojto | 122:f9eeca106725 | 137 | i.e. when DAC_SampleAndHold is DAC_TRIMMING_USER. |
Kojto | 122:f9eeca106725 | 138 | This parameter must be a number between Min_Data = 1 and Max_Data = 31 */ |
Kojto | 122:f9eeca106725 | 139 | |
Kojto | 122:f9eeca106725 | 140 | DAC_SampleAndHoldConfTypeDef DAC_SampleAndHoldConfig; /*!< Sample and Hold settings */ |
Kojto | 122:f9eeca106725 | 141 | |
Kojto | 122:f9eeca106725 | 142 | }DAC_ChannelConfTypeDef; |
Kojto | 122:f9eeca106725 | 143 | |
Kojto | 122:f9eeca106725 | 144 | /** |
Kojto | 122:f9eeca106725 | 145 | * @} |
Kojto | 122:f9eeca106725 | 146 | */ |
Kojto | 122:f9eeca106725 | 147 | |
Kojto | 122:f9eeca106725 | 148 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 149 | |
Kojto | 122:f9eeca106725 | 150 | /** @defgroup DAC_Exported_Constants DAC Exported Constants |
Kojto | 122:f9eeca106725 | 151 | * @{ |
Kojto | 122:f9eeca106725 | 152 | */ |
Kojto | 122:f9eeca106725 | 153 | |
Kojto | 122:f9eeca106725 | 154 | /** @defgroup DAC_Error_Code DAC Error Code |
Kojto | 122:f9eeca106725 | 155 | * @{ |
Kojto | 122:f9eeca106725 | 156 | */ |
Kojto | 122:f9eeca106725 | 157 | #define HAL_DAC_ERROR_NONE 0x00 /*!< No error */ |
Kojto | 122:f9eeca106725 | 158 | #define HAL_DAC_ERROR_DMAUNDERRUNCH1 0x01 /*!< DAC channel1 DMA underrun error */ |
Kojto | 122:f9eeca106725 | 159 | #define HAL_DAC_ERROR_DMAUNDERRUNCH2 0x02 /*!< DAC channel2 DMA underrun error */ |
Kojto | 122:f9eeca106725 | 160 | #define HAL_DAC_ERROR_DMA 0x04 /*!< DMA error */ |
Kojto | 122:f9eeca106725 | 161 | #define HAL_DAC_ERROR_TIMEOUT 0x08 /*!< Timeout error */ |
Kojto | 122:f9eeca106725 | 162 | /** |
Kojto | 122:f9eeca106725 | 163 | * @} |
Kojto | 122:f9eeca106725 | 164 | */ |
Kojto | 122:f9eeca106725 | 165 | |
Kojto | 122:f9eeca106725 | 166 | /** @defgroup DAC_trigger_selection DAC trigger selection |
Kojto | 122:f9eeca106725 | 167 | * @{ |
Kojto | 122:f9eeca106725 | 168 | */ |
Kojto | 122:f9eeca106725 | 169 | |
Kojto | 122:f9eeca106725 | 170 | #if defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) |
Kojto | 122:f9eeca106725 | 171 | #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC_DHRxxxx register |
Kojto | 122:f9eeca106725 | 172 | has been loaded, and not by external trigger */ |
Kojto | 122:f9eeca106725 | 173 | #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 | 122:f9eeca106725 | 174 | #define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */ |
Kojto | 122:f9eeca106725 | 175 | #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 | 122:f9eeca106725 | 176 | #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 | 122:f9eeca106725 | 177 | #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */ |
Kojto | 122:f9eeca106725 | 178 | #endif /* STM32L431xx STM32L432xx STM32L433xx STM32L442xx STM32L443xx */ |
AnnaBridge | 145:64910690c574 | 179 | |
AnnaBridge | 145:64910690c574 | 180 | #if defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) |
AnnaBridge | 145:64910690c574 | 181 | #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC_DHRxxxx register |
AnnaBridge | 145:64910690c574 | 182 | has been loaded, and not by external trigger */ |
AnnaBridge | 145:64910690c574 | 183 | #define DAC_TRIGGER_T2_TRGO ((uint32_t)(DAC_CR_TSEL1_2 | DAC_CR_TEN1)) /*!< TIM2 TRGO selected as external conversion trigger for DAC channel */ |
AnnaBridge | 145:64910690c574 | 184 | #define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */ |
AnnaBridge | 145:64910690c574 | 185 | #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 */ |
AnnaBridge | 145:64910690c574 | 186 | #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */ |
AnnaBridge | 145:64910690c574 | 187 | #endif /* STM32L451xx STM32L452xx STM32L462xx */ |
AnnaBridge | 145:64910690c574 | 188 | |
AnnaBridge | 145:64910690c574 | 189 | #if defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx) |
Kojto | 122:f9eeca106725 | 190 | #define DAC_TRIGGER_NONE ((uint32_t)0x00000000) /*!< Conversion is automatic once the DAC_DHRxxxx register |
Kojto | 122:f9eeca106725 | 191 | has been loaded, and not by external trigger */ |
Kojto | 122:f9eeca106725 | 192 | #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 | 122:f9eeca106725 | 193 | #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 */ |
Kojto | 122:f9eeca106725 | 194 | #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 */ |
Kojto | 122:f9eeca106725 | 195 | #define DAC_TRIGGER_T6_TRGO ((uint32_t)DAC_CR_TEN1) /*!< TIM6 TRGO selected as external conversion trigger for DAC channel */ |
Kojto | 122:f9eeca106725 | 196 | #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 | 122:f9eeca106725 | 197 | #define DAC_TRIGGER_T8_TRGO ((uint32_t)(DAC_CR_TSEL1_0 | DAC_CR_TEN1)) /*!< TIM8 TRGO selected as external conversion trigger for DAC channel */ |
Kojto | 122:f9eeca106725 | 198 | #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 | 122:f9eeca106725 | 199 | #define DAC_TRIGGER_SOFTWARE ((uint32_t)(DAC_CR_TSEL1 | DAC_CR_TEN1)) /*!< Conversion started by software trigger for DAC channel */ |
AnnaBridge | 145:64910690c574 | 200 | #endif /* STM32L471xx STM32L475xx STM32L476xx STM32L485xx STM32L486xx STM32L496xx STM32L4A6xx*/ |
AnnaBridge | 145:64910690c574 | 201 | |
AnnaBridge | 145:64910690c574 | 202 | |
Kojto | 122:f9eeca106725 | 203 | |
Kojto | 122:f9eeca106725 | 204 | /** |
Kojto | 122:f9eeca106725 | 205 | * @} |
Kojto | 122:f9eeca106725 | 206 | */ |
Kojto | 122:f9eeca106725 | 207 | |
Kojto | 122:f9eeca106725 | 208 | /** @defgroup DAC_output_buffer DAC output buffer |
Kojto | 122:f9eeca106725 | 209 | * @{ |
Kojto | 122:f9eeca106725 | 210 | */ |
Kojto | 122:f9eeca106725 | 211 | #define DAC_OUTPUTBUFFER_ENABLE ((uint32_t)0x00000000) |
Kojto | 122:f9eeca106725 | 212 | #define DAC_OUTPUTBUFFER_DISABLE ((uint32_t)DAC_MCR_MODE1_1) |
Kojto | 122:f9eeca106725 | 213 | |
Kojto | 122:f9eeca106725 | 214 | /** |
Kojto | 122:f9eeca106725 | 215 | * @} |
Kojto | 122:f9eeca106725 | 216 | */ |
Kojto | 122:f9eeca106725 | 217 | |
Kojto | 122:f9eeca106725 | 218 | /** @defgroup DAC_Channel_selection DAC Channel selection |
Kojto | 122:f9eeca106725 | 219 | * @{ |
Kojto | 122:f9eeca106725 | 220 | */ |
Kojto | 122:f9eeca106725 | 221 | #define DAC_CHANNEL_1 ((uint32_t)0x00000000) |
AnnaBridge | 145:64910690c574 | 222 | #if defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || \ |
AnnaBridge | 145:64910690c574 | 223 | defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx) |
Kojto | 122:f9eeca106725 | 224 | #define DAC_CHANNEL_2 ((uint32_t)0x00000010) |
AnnaBridge | 145:64910690c574 | 225 | #endif /* STM32L431xx STM32L432xx STM32L433xx STM32L442xx STM32L443xx */ |
AnnaBridge | 145:64910690c574 | 226 | /* STM32L471xx STM32L475xx STM32L476xx STM32L485xx STM32L486xx STM32L496xx STM32L4A6xx */ |
Kojto | 122:f9eeca106725 | 227 | |
Kojto | 122:f9eeca106725 | 228 | /** |
Kojto | 122:f9eeca106725 | 229 | * @} |
Kojto | 122:f9eeca106725 | 230 | */ |
Kojto | 122:f9eeca106725 | 231 | |
Kojto | 122:f9eeca106725 | 232 | /** @defgroup DAC_data_alignment DAC data alignment |
Kojto | 122:f9eeca106725 | 233 | * @{ |
Kojto | 122:f9eeca106725 | 234 | */ |
Kojto | 122:f9eeca106725 | 235 | #define DAC_ALIGN_12B_R ((uint32_t)0x00000000) |
Kojto | 122:f9eeca106725 | 236 | #define DAC_ALIGN_12B_L ((uint32_t)0x00000004) |
Kojto | 122:f9eeca106725 | 237 | #define DAC_ALIGN_8B_R ((uint32_t)0x00000008) |
Kojto | 122:f9eeca106725 | 238 | |
Kojto | 122:f9eeca106725 | 239 | /** |
Kojto | 122:f9eeca106725 | 240 | * @} |
Kojto | 122:f9eeca106725 | 241 | */ |
Kojto | 122:f9eeca106725 | 242 | |
Kojto | 122:f9eeca106725 | 243 | /** @defgroup DAC_flags_definition DAC flags definition |
Kojto | 122:f9eeca106725 | 244 | * @{ |
Kojto | 122:f9eeca106725 | 245 | */ |
Kojto | 122:f9eeca106725 | 246 | #define DAC_FLAG_DMAUDR1 ((uint32_t)DAC_SR_DMAUDR1) |
Kojto | 122:f9eeca106725 | 247 | #define DAC_FLAG_DMAUDR2 ((uint32_t)DAC_SR_DMAUDR2) |
Kojto | 122:f9eeca106725 | 248 | |
Kojto | 122:f9eeca106725 | 249 | /** |
Kojto | 122:f9eeca106725 | 250 | * @} |
Kojto | 122:f9eeca106725 | 251 | */ |
Kojto | 122:f9eeca106725 | 252 | |
Kojto | 122:f9eeca106725 | 253 | /** @defgroup DAC_IT_definition DAC IT definition |
Kojto | 122:f9eeca106725 | 254 | * @{ |
Kojto | 122:f9eeca106725 | 255 | */ |
Kojto | 122:f9eeca106725 | 256 | #define DAC_IT_DMAUDR1 ((uint32_t)DAC_SR_DMAUDR1) |
Kojto | 122:f9eeca106725 | 257 | #define DAC_IT_DMAUDR2 ((uint32_t)DAC_SR_DMAUDR2) |
Kojto | 122:f9eeca106725 | 258 | |
Kojto | 122:f9eeca106725 | 259 | /** |
Kojto | 122:f9eeca106725 | 260 | * @} |
Kojto | 122:f9eeca106725 | 261 | */ |
Kojto | 122:f9eeca106725 | 262 | |
Kojto | 122:f9eeca106725 | 263 | /** @defgroup DAC_ConnectOnChipPeripheral DAC ConnectOnChipPeripheral |
Kojto | 122:f9eeca106725 | 264 | * @{ |
Kojto | 122:f9eeca106725 | 265 | */ |
Kojto | 122:f9eeca106725 | 266 | #define DAC_CHIPCONNECT_DISABLE ((uint32_t)0x00000000) |
Kojto | 122:f9eeca106725 | 267 | #define DAC_CHIPCONNECT_ENABLE ((uint32_t)DAC_MCR_MODE1_0) |
Kojto | 122:f9eeca106725 | 268 | |
Kojto | 122:f9eeca106725 | 269 | /** |
Kojto | 122:f9eeca106725 | 270 | * @} |
Kojto | 122:f9eeca106725 | 271 | */ |
Kojto | 122:f9eeca106725 | 272 | |
Kojto | 122:f9eeca106725 | 273 | /** @defgroup DAC_UserTrimming DAC User Trimming |
Kojto | 122:f9eeca106725 | 274 | * @{ |
Kojto | 122:f9eeca106725 | 275 | */ |
Kojto | 122:f9eeca106725 | 276 | |
Kojto | 122:f9eeca106725 | 277 | #define DAC_TRIMMING_FACTORY ((uint32_t)0x00000000) /*!< Factory trimming */ |
Kojto | 122:f9eeca106725 | 278 | #define DAC_TRIMMING_USER ((uint32_t)0x00000001) /*!< User trimming */ |
Kojto | 122:f9eeca106725 | 279 | |
Kojto | 122:f9eeca106725 | 280 | /** |
Kojto | 122:f9eeca106725 | 281 | * @} |
Kojto | 122:f9eeca106725 | 282 | */ |
Kojto | 122:f9eeca106725 | 283 | |
Kojto | 122:f9eeca106725 | 284 | /** @defgroup DAC_SampleAndHold DAC power mode |
Kojto | 122:f9eeca106725 | 285 | * @{ |
Kojto | 122:f9eeca106725 | 286 | */ |
Kojto | 122:f9eeca106725 | 287 | #define DAC_SAMPLEANDHOLD_DISABLE ((uint32_t)0x00000000) |
Kojto | 122:f9eeca106725 | 288 | #define DAC_SAMPLEANDHOLD_ENABLE ((uint32_t)DAC_MCR_MODE1_2) |
Kojto | 122:f9eeca106725 | 289 | |
Kojto | 122:f9eeca106725 | 290 | /** |
Kojto | 122:f9eeca106725 | 291 | * @} |
Kojto | 122:f9eeca106725 | 292 | */ |
AnnaBridge | 145:64910690c574 | 293 | |
Kojto | 122:f9eeca106725 | 294 | /** |
Kojto | 122:f9eeca106725 | 295 | * @} |
Kojto | 122:f9eeca106725 | 296 | */ |
Kojto | 122:f9eeca106725 | 297 | |
Kojto | 122:f9eeca106725 | 298 | /* Exported macro ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 299 | |
Kojto | 122:f9eeca106725 | 300 | /** @defgroup DAC_Exported_Macros DAC Exported Macros |
Kojto | 122:f9eeca106725 | 301 | * @{ |
Kojto | 122:f9eeca106725 | 302 | */ |
Kojto | 122:f9eeca106725 | 303 | |
Kojto | 122:f9eeca106725 | 304 | /** @brief Reset DAC handle state. |
Kojto | 122:f9eeca106725 | 305 | * @param __HANDLE__: specifies the DAC handle. |
Kojto | 122:f9eeca106725 | 306 | * @retval None |
Kojto | 122:f9eeca106725 | 307 | */ |
Kojto | 122:f9eeca106725 | 308 | #define __HAL_DAC_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DAC_STATE_RESET) |
Kojto | 122:f9eeca106725 | 309 | |
Kojto | 122:f9eeca106725 | 310 | /** @brief Enable the DAC channel. |
Kojto | 122:f9eeca106725 | 311 | * @param __HANDLE__: specifies the DAC handle. |
Kojto | 122:f9eeca106725 | 312 | * @param __DAC_Channel__: specifies the DAC channel |
Kojto | 122:f9eeca106725 | 313 | * @retval None |
Kojto | 122:f9eeca106725 | 314 | */ |
Kojto | 122:f9eeca106725 | 315 | #define __HAL_DAC_ENABLE(__HANDLE__, __DAC_Channel__) \ |
Kojto | 122:f9eeca106725 | 316 | ((__HANDLE__)->Instance->CR |= (DAC_CR_EN1 << (__DAC_Channel__))) |
Kojto | 122:f9eeca106725 | 317 | |
Kojto | 122:f9eeca106725 | 318 | /** @brief Disable the DAC channel. |
Kojto | 122:f9eeca106725 | 319 | * @param __HANDLE__: specifies the DAC handle |
Kojto | 122:f9eeca106725 | 320 | * @param __DAC_Channel__: specifies the DAC channel. |
Kojto | 122:f9eeca106725 | 321 | * @retval None |
Kojto | 122:f9eeca106725 | 322 | */ |
Kojto | 122:f9eeca106725 | 323 | #define __HAL_DAC_DISABLE(__HANDLE__, __DAC_Channel__) \ |
Kojto | 122:f9eeca106725 | 324 | ((__HANDLE__)->Instance->CR &= ~(DAC_CR_EN1 << (__DAC_Channel__))) |
Kojto | 122:f9eeca106725 | 325 | |
Kojto | 122:f9eeca106725 | 326 | /** @brief Set DHR12R1 alignment. |
Kojto | 122:f9eeca106725 | 327 | * @param __ALIGNMENT__: specifies the DAC alignment |
Kojto | 122:f9eeca106725 | 328 | * @retval None |
Kojto | 122:f9eeca106725 | 329 | */ |
Kojto | 122:f9eeca106725 | 330 | #define DAC_DHR12R1_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000008) + (__ALIGNMENT__)) |
Kojto | 122:f9eeca106725 | 331 | |
Kojto | 122:f9eeca106725 | 332 | /** @brief Set DHR12R2 alignment. |
Kojto | 122:f9eeca106725 | 333 | * @param __ALIGNMENT__: specifies the DAC alignment |
Kojto | 122:f9eeca106725 | 334 | * @retval None |
Kojto | 122:f9eeca106725 | 335 | */ |
Kojto | 122:f9eeca106725 | 336 | #define DAC_DHR12R2_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000014) + (__ALIGNMENT__)) |
Kojto | 122:f9eeca106725 | 337 | |
Kojto | 122:f9eeca106725 | 338 | /** @brief Set DHR12RD alignment. |
Kojto | 122:f9eeca106725 | 339 | * @param __ALIGNMENT__: specifies the DAC alignment |
Kojto | 122:f9eeca106725 | 340 | * @retval None |
Kojto | 122:f9eeca106725 | 341 | */ |
Kojto | 122:f9eeca106725 | 342 | #define DAC_DHR12RD_ALIGNMENT(__ALIGNMENT__) (((uint32_t)0x00000020) + (__ALIGNMENT__)) |
Kojto | 122:f9eeca106725 | 343 | |
Kojto | 122:f9eeca106725 | 344 | /** @brief Enable the DAC interrupt. |
Kojto | 122:f9eeca106725 | 345 | * @param __HANDLE__: specifies the DAC handle |
Kojto | 122:f9eeca106725 | 346 | * @param __INTERRUPT__: specifies the DAC interrupt. |
Kojto | 122:f9eeca106725 | 347 | * This parameter can be any combination of the following values: |
Kojto | 122:f9eeca106725 | 348 | * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt |
Kojto | 122:f9eeca106725 | 349 | * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt |
Kojto | 122:f9eeca106725 | 350 | * @retval None |
Kojto | 122:f9eeca106725 | 351 | */ |
Kojto | 122:f9eeca106725 | 352 | #define __HAL_DAC_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) |= (__INTERRUPT__)) |
Kojto | 122:f9eeca106725 | 353 | |
Kojto | 122:f9eeca106725 | 354 | /** @brief Disable the DAC interrupt. |
Kojto | 122:f9eeca106725 | 355 | * @param __HANDLE__: specifies the DAC handle |
Kojto | 122:f9eeca106725 | 356 | * @param __INTERRUPT__: specifies the DAC interrupt. |
Kojto | 122:f9eeca106725 | 357 | * This parameter can be any combination of the following values: |
Kojto | 122:f9eeca106725 | 358 | * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt |
Kojto | 122:f9eeca106725 | 359 | * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt |
Kojto | 122:f9eeca106725 | 360 | * @retval None |
Kojto | 122:f9eeca106725 | 361 | */ |
Kojto | 122:f9eeca106725 | 362 | #define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__)) |
Kojto | 122:f9eeca106725 | 363 | |
Kojto | 122:f9eeca106725 | 364 | /** @brief Check whether the specified DAC interrupt source is enabled or not. |
Kojto | 122:f9eeca106725 | 365 | * @param __HANDLE__: DAC handle |
Kojto | 122:f9eeca106725 | 366 | * @param __INTERRUPT__: DAC interrupt source to check |
Kojto | 122:f9eeca106725 | 367 | * This parameter can be any combination of the following values: |
Kojto | 122:f9eeca106725 | 368 | * @arg DAC_IT_DMAUDR1: DAC channel 1 DMA underrun interrupt |
Kojto | 122:f9eeca106725 | 369 | * @arg DAC_IT_DMAUDR2: DAC channel 2 DMA underrun interrupt |
Kojto | 122:f9eeca106725 | 370 | * @retval State of interruption (SET or RESET) |
Kojto | 122:f9eeca106725 | 371 | */ |
Kojto | 122:f9eeca106725 | 372 | #define __HAL_DAC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CR & (__INTERRUPT__)) == (__INTERRUPT__)) |
Kojto | 122:f9eeca106725 | 373 | |
Kojto | 122:f9eeca106725 | 374 | /** @brief Get the selected DAC's flag status. |
Kojto | 122:f9eeca106725 | 375 | * @param __HANDLE__: specifies the DAC handle. |
Kojto | 122:f9eeca106725 | 376 | * @param __FLAG__: specifies the DAC flag to get. |
Kojto | 122:f9eeca106725 | 377 | * This parameter can be any combination of the following values: |
Kojto | 122:f9eeca106725 | 378 | * @arg DAC_FLAG_DMAUDR1: DAC channel 1 DMA underrun flag |
Kojto | 122:f9eeca106725 | 379 | * @arg DAC_FLAG_DMAUDR2: DAC channel 2 DMA underrun flag |
Kojto | 122:f9eeca106725 | 380 | * @retval None |
Kojto | 122:f9eeca106725 | 381 | */ |
Kojto | 122:f9eeca106725 | 382 | #define __HAL_DAC_GET_FLAG(__HANDLE__, __FLAG__) ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__)) |
Kojto | 122:f9eeca106725 | 383 | |
Kojto | 122:f9eeca106725 | 384 | /** @brief Clear the DAC's flag. |
Kojto | 122:f9eeca106725 | 385 | * @param __HANDLE__: specifies the DAC handle. |
Kojto | 122:f9eeca106725 | 386 | * @param __FLAG__: specifies the DAC flag to clear. |
Kojto | 122:f9eeca106725 | 387 | * This parameter can be any combination of the following values: |
Kojto | 122:f9eeca106725 | 388 | * @arg DAC_FLAG_DMAUDR1: DAC channel 1 DMA underrun flag |
Kojto | 122:f9eeca106725 | 389 | * @arg DAC_FLAG_DMAUDR2: DAC channel 2 DMA underrun flag |
Kojto | 122:f9eeca106725 | 390 | * @retval None |
Kojto | 122:f9eeca106725 | 391 | */ |
Kojto | 122:f9eeca106725 | 392 | #define __HAL_DAC_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR) = (__FLAG__)) |
Kojto | 122:f9eeca106725 | 393 | |
Kojto | 122:f9eeca106725 | 394 | /** |
Kojto | 122:f9eeca106725 | 395 | * @} |
Kojto | 122:f9eeca106725 | 396 | */ |
Kojto | 122:f9eeca106725 | 397 | |
Kojto | 122:f9eeca106725 | 398 | /* Private macro -------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 399 | |
Kojto | 122:f9eeca106725 | 400 | /** @defgroup DAC_Private_Macros DAC Private Macros |
Kojto | 122:f9eeca106725 | 401 | * @{ |
Kojto | 122:f9eeca106725 | 402 | */ |
Kojto | 122:f9eeca106725 | 403 | #define IS_DAC_OUTPUT_BUFFER_STATE(STATE) (((STATE) == DAC_OUTPUTBUFFER_ENABLE) || \ |
Kojto | 122:f9eeca106725 | 404 | ((STATE) == DAC_OUTPUTBUFFER_DISABLE)) |
Kojto | 122:f9eeca106725 | 405 | |
AnnaBridge | 145:64910690c574 | 406 | #if defined (STM32L431xx) || defined (STM32L432xx) || defined (STM32L433xx) || defined (STM32L442xx) || defined (STM32L443xx) || \ |
AnnaBridge | 145:64910690c574 | 407 | defined (STM32L471xx) || defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) || defined (STM32L496xx) || defined (STM32L4A6xx) |
Kojto | 122:f9eeca106725 | 408 | #define IS_DAC_CHANNEL(CHANNEL) (((CHANNEL) == DAC_CHANNEL_1) || \ |
Kojto | 122:f9eeca106725 | 409 | ((CHANNEL) == DAC_CHANNEL_2)) |
AnnaBridge | 145:64910690c574 | 410 | #endif /* STM32L431xx STM32L432xx STM32L433xx STM32L442xx STM32L443xx */ |
AnnaBridge | 145:64910690c574 | 411 | /* STM32L471xx STM32L475xx STM32L476xx STM32L485xx STM32L486xx STM32L496xx STM32L4A6xx */ |
AnnaBridge | 145:64910690c574 | 412 | |
AnnaBridge | 145:64910690c574 | 413 | #if defined (STM32L451xx) || defined (STM32L452xx) || defined (STM32L462xx) |
AnnaBridge | 145:64910690c574 | 414 | #define IS_DAC_CHANNEL(CHANNEL) ((CHANNEL) == DAC_CHANNEL_1) |
AnnaBridge | 145:64910690c574 | 415 | #endif /* STM32L451xx STM32L452xx STM32L462xx */ |
Kojto | 122:f9eeca106725 | 416 | |
Kojto | 122:f9eeca106725 | 417 | #define IS_DAC_ALIGN(ALIGN) (((ALIGN) == DAC_ALIGN_12B_R) || \ |
Kojto | 122:f9eeca106725 | 418 | ((ALIGN) == DAC_ALIGN_12B_L) || \ |
Kojto | 122:f9eeca106725 | 419 | ((ALIGN) == DAC_ALIGN_8B_R)) |
Kojto | 122:f9eeca106725 | 420 | |
Kojto | 122:f9eeca106725 | 421 | #define IS_DAC_DATA(DATA) ((DATA) <= 0xFFF0) |
Kojto | 122:f9eeca106725 | 422 | |
Kojto | 122:f9eeca106725 | 423 | #define IS_DAC_REFRESHTIME(TIME) ((TIME) <= 0x0000000FF) |
Kojto | 122:f9eeca106725 | 424 | |
Kojto | 122:f9eeca106725 | 425 | /** |
Kojto | 122:f9eeca106725 | 426 | * @} |
Kojto | 122:f9eeca106725 | 427 | */ |
Kojto | 122:f9eeca106725 | 428 | |
Kojto | 122:f9eeca106725 | 429 | /* Include DAC HAL Extended module */ |
Kojto | 122:f9eeca106725 | 430 | #include "stm32l4xx_hal_dac_ex.h" |
Kojto | 122:f9eeca106725 | 431 | |
Kojto | 122:f9eeca106725 | 432 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 433 | |
Kojto | 122:f9eeca106725 | 434 | /** @addtogroup DAC_Exported_Functions |
Kojto | 122:f9eeca106725 | 435 | * @{ |
Kojto | 122:f9eeca106725 | 436 | */ |
Kojto | 122:f9eeca106725 | 437 | |
Kojto | 122:f9eeca106725 | 438 | /** @addtogroup DAC_Exported_Functions_Group1 |
Kojto | 122:f9eeca106725 | 439 | * @{ |
Kojto | 122:f9eeca106725 | 440 | */ |
Kojto | 122:f9eeca106725 | 441 | /* Initialization and de-initialization functions *****************************/ |
Kojto | 122:f9eeca106725 | 442 | HAL_StatusTypeDef HAL_DAC_Init(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 443 | HAL_StatusTypeDef HAL_DAC_DeInit(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 444 | void HAL_DAC_MspInit(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 445 | void HAL_DAC_MspDeInit(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 446 | |
Kojto | 122:f9eeca106725 | 447 | /** |
Kojto | 122:f9eeca106725 | 448 | * @} |
Kojto | 122:f9eeca106725 | 449 | */ |
Kojto | 122:f9eeca106725 | 450 | |
Kojto | 122:f9eeca106725 | 451 | /** @addtogroup DAC_Exported_Functions_Group2 |
Kojto | 122:f9eeca106725 | 452 | * @{ |
Kojto | 122:f9eeca106725 | 453 | */ |
Kojto | 122:f9eeca106725 | 454 | /* IO operation functions *****************************************************/ |
Kojto | 122:f9eeca106725 | 455 | HAL_StatusTypeDef HAL_DAC_Start(DAC_HandleTypeDef* hdac, uint32_t Channel); |
Kojto | 122:f9eeca106725 | 456 | HAL_StatusTypeDef HAL_DAC_Stop(DAC_HandleTypeDef* hdac, uint32_t Channel); |
Kojto | 122:f9eeca106725 | 457 | HAL_StatusTypeDef HAL_DAC_Start_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t* pData, uint32_t Length, uint32_t Alignment); |
Kojto | 122:f9eeca106725 | 458 | HAL_StatusTypeDef HAL_DAC_Stop_DMA(DAC_HandleTypeDef* hdac, uint32_t Channel); |
Kojto | 122:f9eeca106725 | 459 | |
Kojto | 122:f9eeca106725 | 460 | void HAL_DAC_IRQHandler(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 461 | |
Kojto | 122:f9eeca106725 | 462 | HAL_StatusTypeDef HAL_DAC_SetValue(DAC_HandleTypeDef* hdac, uint32_t Channel, uint32_t Alignment, uint32_t Data); |
Kojto | 122:f9eeca106725 | 463 | |
Kojto | 122:f9eeca106725 | 464 | void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 465 | void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 466 | void HAL_DAC_ErrorCallbackCh1(DAC_HandleTypeDef *hdac); |
Kojto | 122:f9eeca106725 | 467 | void HAL_DAC_DMAUnderrunCallbackCh1(DAC_HandleTypeDef *hdac); |
Kojto | 122:f9eeca106725 | 468 | /** |
Kojto | 122:f9eeca106725 | 469 | * @} |
Kojto | 122:f9eeca106725 | 470 | */ |
Kojto | 122:f9eeca106725 | 471 | |
Kojto | 122:f9eeca106725 | 472 | /** @addtogroup DAC_Exported_Functions_Group3 |
Kojto | 122:f9eeca106725 | 473 | * @{ |
Kojto | 122:f9eeca106725 | 474 | */ |
Kojto | 122:f9eeca106725 | 475 | /* Peripheral Control functions ***********************************************/ |
Kojto | 122:f9eeca106725 | 476 | uint32_t HAL_DAC_GetValue(DAC_HandleTypeDef* hdac, uint32_t Channel); |
Kojto | 122:f9eeca106725 | 477 | |
Kojto | 122:f9eeca106725 | 478 | HAL_StatusTypeDef HAL_DAC_ConfigChannel(DAC_HandleTypeDef* hdac, DAC_ChannelConfTypeDef* sConfig, uint32_t Channel); |
Kojto | 122:f9eeca106725 | 479 | /** |
Kojto | 122:f9eeca106725 | 480 | * @} |
Kojto | 122:f9eeca106725 | 481 | */ |
Kojto | 122:f9eeca106725 | 482 | |
Kojto | 122:f9eeca106725 | 483 | /** @addtogroup DAC_Exported_Functions_Group4 |
Kojto | 122:f9eeca106725 | 484 | * @{ |
Kojto | 122:f9eeca106725 | 485 | */ |
Kojto | 122:f9eeca106725 | 486 | /* Peripheral State and Error functions ***************************************/ |
Kojto | 122:f9eeca106725 | 487 | HAL_DAC_StateTypeDef HAL_DAC_GetState(DAC_HandleTypeDef* hdac); |
Kojto | 122:f9eeca106725 | 488 | uint32_t HAL_DAC_GetError(DAC_HandleTypeDef *hdac); |
Kojto | 122:f9eeca106725 | 489 | |
Kojto | 122:f9eeca106725 | 490 | /** |
Kojto | 122:f9eeca106725 | 491 | * @} |
Kojto | 122:f9eeca106725 | 492 | */ |
Kojto | 122:f9eeca106725 | 493 | |
Kojto | 122:f9eeca106725 | 494 | /** |
Kojto | 122:f9eeca106725 | 495 | * @} |
Kojto | 122:f9eeca106725 | 496 | */ |
Kojto | 122:f9eeca106725 | 497 | |
Kojto | 122:f9eeca106725 | 498 | /** |
Kojto | 122:f9eeca106725 | 499 | * @} |
Kojto | 122:f9eeca106725 | 500 | */ |
Kojto | 122:f9eeca106725 | 501 | |
Kojto | 122:f9eeca106725 | 502 | /** |
Kojto | 122:f9eeca106725 | 503 | * @} |
Kojto | 122:f9eeca106725 | 504 | */ |
Kojto | 122:f9eeca106725 | 505 | |
Kojto | 122:f9eeca106725 | 506 | #ifdef __cplusplus |
Kojto | 122:f9eeca106725 | 507 | } |
Kojto | 122:f9eeca106725 | 508 | #endif |
Kojto | 122:f9eeca106725 | 509 | |
Kojto | 122:f9eeca106725 | 510 | |
Kojto | 122:f9eeca106725 | 511 | #endif /*__STM32L4xx_HAL_DAC_H */ |
Kojto | 122:f9eeca106725 | 512 | |
Kojto | 122:f9eeca106725 | 513 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
Kojto | 122:f9eeca106725 | 514 |