STM32F10x Standard Peripherals Library  3.5.0
/opt/STM32F10x_StdPeriph_Lib_V3.5.0/Libraries/STM32F10x_StdPeriph_Driver/src/stm32f10x_dac.c File Reference

This file provides all the DAC firmware functions. More...

#include "stm32f10x_dac.h"
#include "stm32f10x_rcc.h"

Go to the source code of this file.

Defines

#define CR_CLEAR_MASK   ((uint32_t)0x00000FFE)
#define DUAL_SWTRIG_SET   ((uint32_t)0x00000003)
#define DUAL_SWTRIG_RESET   ((uint32_t)0xFFFFFFFC)
#define DHR12R1_OFFSET   ((uint32_t)0x00000008)
#define DHR12R2_OFFSET   ((uint32_t)0x00000014)
#define DHR12RD_OFFSET   ((uint32_t)0x00000020)
#define DOR_OFFSET   ((uint32_t)0x0000002C)

Functions

void DAC_DeInit (void)
 Deinitializes the DAC peripheral registers to their default reset values.
void DAC_Init (uint32_t DAC_Channel, DAC_InitTypeDef *DAC_InitStruct)
 Initializes the DAC peripheral according to the specified parameters in the DAC_InitStruct.
void DAC_StructInit (DAC_InitTypeDef *DAC_InitStruct)
 Fills each DAC_InitStruct member with its default value.
void DAC_Cmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel.
void DAC_DMACmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel DMA request.
void DAC_SoftwareTriggerCmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the selected DAC channel software trigger.
void DAC_DualSoftwareTriggerCmd (FunctionalState NewState)
 Enables or disables simultaneously the two DAC channels software triggers.
void DAC_WaveGenerationCmd (uint32_t DAC_Channel, uint32_t DAC_Wave, FunctionalState NewState)
 Enables or disables the selected DAC channel wave generation.
void DAC_SetChannel1Data (uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel1.
void DAC_SetChannel2Data (uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel2.
void DAC_SetDualChannelData (uint32_t DAC_Align, uint16_t Data2, uint16_t Data1)
 Set the specified data holding register value for dual channel DAC.
uint16_t DAC_GetDataOutputValue (uint32_t DAC_Channel)
 Returns the last data output value of the selected DAC channel.

Detailed Description

This file provides all the DAC firmware functions.

Author:
MCD Application Team
Version:
V3.5.0
Date:
11-March-2011
Attention:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm32f10x_dac.c.