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 DHR12R1_OFFSET   ((uint32_t)0x00000008)
#define DHR12R2_OFFSET   ((uint32_t)0x00000014)
#define DHR12RD_OFFSET   ((uint32_t)0x00000020)
#define DOR_OFFSET   ((uint32_t)0x0000002C)
#define DUAL_SWTRIG_RESET   ((uint32_t)0xFFFFFFFC)
#define DUAL_SWTRIG_SET   ((uint32_t)0x00000003)

Functions

void DAC_Cmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel.
void DAC_DeInit (void)
 Deinitializes the DAC peripheral registers to their default reset values.
void DAC_DMACmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel DMA request.
void DAC_DualSoftwareTriggerCmd (FunctionalState NewState)
 Enables or disables simultaneously the two DAC channels software triggers.
uint16_t DAC_GetDataOutputValue (uint32_t DAC_Channel)
 Returns the last data output value of the selected DAC cahnnel.
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_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.
void DAC_SoftwareTriggerCmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the selected DAC channel software trigger.
void DAC_StructInit (DAC_InitTypeDef *DAC_InitStruct)
 Fills each DAC_InitStruct member with its default value.
void DAC_WaveGenerationCmd (uint32_t DAC_Channel, uint32_t DAC_Wave, FunctionalState NewState)
 Enables or disables the selected DAC channel wave generation.

Detailed Description

This file provides all the DAC firmware functions.

Author:
MCD Application Team
Version:
V3.4.0
Date:
10/15/2010

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 2010 STMicroelectronics

Definition in file stm32f10x_dac.c.

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32