/TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc/fsl_adc_hal.h substitute line 894 extern } by }

Fork of mbed by mbed official

Committer:
fblanc
Date:
Fri Dec 05 15:42:32 2014 +0000
Revision:
93:9dd889aeda0e
Parent:
92:4fc01daae5a5
substitute line 894 extern } by }; /TARGET_K64F/TARGET_Freescale/TARGET_KPSDK_MCUS/TARGET_KPSDK_CODE/hal/adc/fsl_adc_hal.h

Who changed what in which revision?

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