Modules | Classes | Macros | Functions

DAC driver modules. More...

Collaboration diagram for DAC:

Modules

 DAC_Exported_Constants
 
 DAC_Private_Functions
 
 DAC_Exported_Types
 
 DAC_Exported_Macros
 
 DAC_Exported_Functions
 
 DAC_Private_TypesDefinitions
 
 DAC_Private_Defines
 
 DAC_Private_Macros
 
 DAC_Private_Variables
 
 DAC_Private_FunctionPrototypes
 

Classes

struct  DAC_InitTypeDef
 DAC Init structure definition. More...
 

Macros

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

Functions

void DAC_ClearFlag (uint32_t DAC_Channel, uint32_t DAC_FLAG)
 Clears the DAC channel's pending flags. More...
 
void DAC_ClearFlag (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t DAC_FLAG)
 Clears the DAC channel's pending flags. More...
 
void DAC_ClearITPendingBit (uint32_t DAC_Channel, uint32_t DAC_IT)
 Clears the DAC channel's interrupt pending bits. More...
 
void DAC_ClearITPendingBit (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t DAC_IT)
 Clears the DAC channel's interrupt pending bits. More...
 
void DAC_Cmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel. More...
 
void DAC_Cmd (DAC_TypeDef *DACx, uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel. More...
 
void DAC_DeInit (void)
 Deinitializes the DAC peripheral registers to their default reset values. More...
 
void DAC_DeInit (DAC_TypeDef *DACx)
 Deinitializes the DAC peripheral registers to their default reset values. More...
 
void DAC_DMACmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel DMA request. More...
 
void DAC_DMACmd (DAC_TypeDef *DACx, uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel DMA request. When enabled DMA1 is generated when an external trigger (EXTI Line9, TIM2, TIM4, TIM6, TIM7 or TIM9 but not a software trigger) occurs. More...
 
void DAC_DualSoftwareTriggerCmd (FunctionalState NewState)
 Enables or disables simultaneously the two DAC channels software triggers. More...
 
void DAC_DualSoftwareTriggerCmd (DAC_TypeDef *DACx, FunctionalState NewState)
 Enables or disables simultaneously the two DAC channels software triggers. More...
 
uint16_t DAC_GetDataOutputValue (uint32_t DAC_Channel)
 Returns the last data output value of the selected DAC channel. More...
 
uint16_t DAC_GetDataOutputValue (DAC_TypeDef *DACx, uint32_t DAC_Channel)
 Returns the last data output value of the selected DAC channel. More...
 
FlagStatus DAC_GetFlagStatus (uint32_t DAC_Channel, uint32_t DAC_FLAG)
 Checks whether the specified DAC flag is set or not. More...
 
FlagStatus DAC_GetFlagStatus (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t DAC_FLAG)
 Checks whether the specified DAC flag is set or not. More...
 
ITStatus DAC_GetITStatus (uint32_t DAC_Channel, uint32_t DAC_IT)
 Checks whether the specified DAC interrupt has occurred or not. More...
 
ITStatus DAC_GetITStatus (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t DAC_IT)
 Checks whether the specified DAC interrupt has occurred or not. More...
 
void DAC_Init (uint32_t DAC_Channel, DAC_InitTypeDef *DAC_InitStruct)
 Initializes the DAC peripheral according to the specified parameters in the DAC_InitStruct. More...
 
void DAC_Init (DAC_TypeDef *DACx, uint32_t DAC_Channel, DAC_InitTypeDef *DAC_InitStruct)
 Initializes the DAC peripheral according to the specified parameters in the DAC_InitStruct. More...
 
void DAC_ITConfig (uint32_t DAC_Channel, uint32_t DAC_IT, FunctionalState NewState)
 Enables or disables the specified DAC interrupts. More...
 
void DAC_ITConfig (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t DAC_IT, FunctionalState NewState)
 Enables or disables the specified DAC interrupts. More...
 
void DAC_SetChannel1Data (uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel1. More...
 
void DAC_SetChannel1Data (DAC_TypeDef *DACx, uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel1. More...
 
void DAC_SetChannel2Data (uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel2. More...
 
void DAC_SetChannel2Data (DAC_TypeDef *DACx, uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel2. More...
 
void DAC_SetDualChannelData (uint32_t DAC_Align, uint16_t Data2, uint16_t Data1)
 Set the specified data holding register value for dual channel DAC. More...
 
void DAC_SetDualChannelData (DAC_TypeDef *DACx, uint32_t DAC_Align, uint16_t Data2, uint16_t Data1)
 Set the specified data holding register value for dual channel DAC. More...
 
void DAC_SoftwareTriggerCmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the selected DAC channel software trigger. More...
 
void DAC_SoftwareTriggerCmd (DAC_TypeDef *DACx, uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the selected DAC channel software trigger. More...
 
void DAC_WaveGenerationCmd (uint32_t DAC_Channel, uint32_t DAC_Wave, FunctionalState NewState)
 Enables or disables the selected DAC channel wave generation. More...
 
void DAC_WaveGenerationCmd (DAC_TypeDef *DACx, uint32_t DAC_Channel, uint32_t DAC_Wave, FunctionalState NewState)
 Enables or disables the selected DAC channel wave generation. More...
 

Detailed Description

DAC driver modules.

Macro Definition Documentation

#define CR_CLEAR_MASK   ((uint32_t)0x00000FFE)

Definition at line 136 of file stm32f30x_dac.c.

#define CR_CLEAR_MASK   ((uint32_t)0x00000FFE)

Definition at line 147 of file stm32f4xx_dac.c.

#define DAC_CR_DMAUDRIE   ((uint32_t)0x00002000)

DAC channel DMA underrun interrupt enable

Definition at line 49 of file stm32f30x_dac.h.

#define DHR12R1_OFFSET   ((uint32_t)0x00000008)

Definition at line 143 of file stm32f30x_dac.c.

#define DHR12R1_OFFSET   ((uint32_t)0x00000008)

Definition at line 154 of file stm32f4xx_dac.c.

#define DHR12R2_OFFSET   ((uint32_t)0x00000014)

Definition at line 144 of file stm32f30x_dac.c.

#define DHR12R2_OFFSET   ((uint32_t)0x00000014)

Definition at line 155 of file stm32f4xx_dac.c.

#define DHR12RD_OFFSET   ((uint32_t)0x00000020)

Definition at line 145 of file stm32f30x_dac.c.

#define DHR12RD_OFFSET   ((uint32_t)0x00000020)

Definition at line 156 of file stm32f4xx_dac.c.

#define DOR_OFFSET   ((uint32_t)0x0000002C)

Definition at line 148 of file stm32f30x_dac.c.

#define DOR_OFFSET   ((uint32_t)0x0000002C)

Definition at line 159 of file stm32f4xx_dac.c.

#define DUAL_SWTRIG_RESET   ((uint32_t)0xFFFFFFFC)

Definition at line 140 of file stm32f30x_dac.c.

#define DUAL_SWTRIG_RESET   ((uint32_t)0xFFFFFFFC)

Definition at line 151 of file stm32f4xx_dac.c.

#define DUAL_SWTRIG_SET   ((uint32_t)0x00000003)

Definition at line 139 of file stm32f30x_dac.c.

#define DUAL_SWTRIG_SET   ((uint32_t)0x00000003)

Definition at line 150 of file stm32f4xx_dac.c.

Function Documentation

void DAC_ClearFlag ( uint32_t  DAC_Channel,
uint32_t  DAC_FLAG 
)

Clears the DAC channel's pending flags.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_FLAGspecifies the flag to clear. This parameter can be of the following value:
  • DAC_FLAG_DMAUDR: DMA underrun flag
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Return values
None

Definition at line 625 of file stm32f4xx_dac.c.

void DAC_ClearFlag ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
uint32_t  DAC_FLAG 
)

Clears the DAC channel's pending flags.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_FLAGspecifies the flag to clear. This parameter can be:
  • DAC_FLAG_DMAUDR: DMA underrun flag
Return values
None

Definition at line 661 of file stm32f30x_dac.c.

void DAC_ClearITPendingBit ( uint32_t  DAC_Channel,
uint32_t  DAC_IT 
)

Clears the DAC channel's interrupt pending bits.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_ITspecifies the DAC interrupt pending bit to clear. This parameter can be the following values:
  • DAC_IT_DMAUDR: DMA underrun interrupt mask
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Return values
None

Definition at line 688 of file stm32f4xx_dac.c.

void DAC_ClearITPendingBit ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
uint32_t  DAC_IT 
)

Clears the DAC channel's interrupt pending bits.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_ITspecifies the DAC interrupt pending bit to clear. This parameter can be the following values:
  • DAC_IT_DMAUDR: DMA underrun interrupt mask
Return values
None

Definition at line 726 of file stm32f30x_dac.c.

void DAC_Cmd ( uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the specified DAC channel.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the DAC channel. This parameter can be: ENABLE or DISABLE.
Note
When the DAC channel is enabled the trigger source can no more be modified.
Return values
None
Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the DAC channel. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 266 of file stm32f4xx_dac.c.

void DAC_Cmd ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the specified DAC channel.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the DAC channel. This parameter can be: ENABLE or DISABLE.
Note
When the DAC channel is enabled the trigger source can no more be modified.
Return values
None

Definition at line 273 of file stm32f30x_dac.c.

void DAC_DeInit ( void  )

Deinitializes the DAC peripheral registers to their default reset values.

Parameters
None
Return values
None

Definition at line 187 of file stm32f4xx_dac.c.

void DAC_DeInit ( DAC_TypeDef DACx)

Deinitializes the DAC peripheral registers to their default reset values.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
Return values
None

Definition at line 176 of file stm32f30x_dac.c.

void DAC_DMACmd ( uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the specified DAC channel DMA request.

Note
When enabled DMA1 is generated when an external trigger (EXTI Line9, TIM2, TIM4, TIM5, TIM6, TIM7 or TIM8 but not a software trigger) occurs.
Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the selected DAC channel DMA request. This parameter can be: ENABLE or DISABLE.
Note
The DAC channel1 is mapped on DMA1 Stream 5 channel7 which must be already configured.
The DAC channel2 is mapped on DMA1 Stream 6 channel7 which must be already configured.
Return values
None
Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the selected DAC channel DMA request. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 510 of file stm32f4xx_dac.c.

void DAC_DMACmd ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the specified DAC channel DMA request. When enabled DMA1 is generated when an external trigger (EXTI Line9, TIM2, TIM4, TIM6, TIM7 or TIM9 but not a software trigger) occurs.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the selected DAC channel DMA request. This parameter can be: ENABLE or DISABLE.
Note
The DAC channel1 (channel2) is mapped on DMA1 channel3 (channel4) which must be already configured.
Return values
None

Definition at line 540 of file stm32f30x_dac.c.

void DAC_DualSoftwareTriggerCmd ( FunctionalState  NewState)

Enables or disables simultaneously the two DAC channels software triggers.

Parameters
NewStatenew state of the DAC channels software triggers. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 318 of file stm32f4xx_dac.c.

void DAC_DualSoftwareTriggerCmd ( DAC_TypeDef DACx,
FunctionalState  NewState 
)

Enables or disables simultaneously the two DAC channels software triggers.

Parameters
DACxwhere x can be 1 to select the DAC1 peripheral.
Note
Dual trigger is not applicable for DAC2 (DAC2 integrates one channel).
Parameters
NewStatenew state of the DAC channels software triggers. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 331 of file stm32f30x_dac.c.

uint16_t DAC_GetDataOutputValue ( uint32_t  DAC_Channel)

Returns the last data output value of the selected DAC channel.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
Return values
Theselected DAC channel data output value.
Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
Return values
Theselected DAC channel data output value.

Definition at line 465 of file stm32f4xx_dac.c.

uint16_t DAC_GetDataOutputValue ( DAC_TypeDef DACx,
uint32_t  DAC_Channel 
)

Returns the last data output value of the selected DAC channel.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
Return values
Theselected DAC channel data output value.

Definition at line 494 of file stm32f30x_dac.c.

FlagStatus DAC_GetFlagStatus ( uint32_t  DAC_Channel,
uint32_t  DAC_FLAG 
)

Checks whether the specified DAC flag is set or not.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_FLAGspecifies the flag to check. This parameter can be only of the following value:
  • DAC_FLAG_DMAUDR: DMA underrun flag
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Return values
Thenew state of DAC_FLAG (SET or RESET).

Definition at line 590 of file stm32f4xx_dac.c.

FlagStatus DAC_GetFlagStatus ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
uint32_t  DAC_FLAG 
)

Checks whether the specified DAC flag is set or not.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthee selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_FLAGspecifies the flag to check. This parameter can be:
  • DAC_FLAG_DMAUDR: DMA underrun flag
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Return values
Thenew state of DAC_FLAG (SET or RESET).

Definition at line 625 of file stm32f30x_dac.c.

ITStatus DAC_GetITStatus ( uint32_t  DAC_Channel,
uint32_t  DAC_IT 
)

Checks whether the specified DAC interrupt has occurred or not.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_ITspecifies the DAC interrupt source to check. This parameter can be the following values:
  • DAC_IT_DMAUDR: DMA underrun interrupt mask
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Return values
Thenew state of DAC_IT (SET or RESET).

Definition at line 648 of file stm32f4xx_dac.c.

ITStatus DAC_GetITStatus ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
uint32_t  DAC_IT 
)

Checks whether the specified DAC interrupt has occurred or not.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_ITspecifies the DAC interrupt source to check. This parameter can be:
  • DAC_IT_DMAUDR: DMA underrun interrupt mask
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Return values
Thenew state of DAC_IT (SET or RESET).

Definition at line 686 of file stm32f30x_dac.c.

void DAC_Init ( uint32_t  DAC_Channel,
DAC_InitTypeDef DAC_InitStruct 
)

Initializes the DAC peripheral according to the specified parameters in the DAC_InitStruct.

Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_InitStructpointer to a DAC_InitTypeDef structure that contains the configuration information for the specified DAC channel.
Return values
None

Definition at line 206 of file stm32f4xx_dac.c.

void DAC_Init ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
DAC_InitTypeDef DAC_InitStruct 
)

Initializes the DAC peripheral according to the specified parameters in the DAC_InitStruct.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_InitStructpointer to a DAC_InitTypeDef structure that contains the configuration information for the specified DAC channel.
Return values
None

Definition at line 209 of file stm32f30x_dac.c.

void DAC_ITConfig ( uint32_t  DAC_Channel,
uint32_t  DAC_IT,
FunctionalState  NewState 
)

Enables or disables the specified DAC interrupts.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_ITspecifies the DAC interrupt sources to be enabled or disabled. This parameter can be the following values:
  • DAC_IT_DMAUDR: DMA underrun interrupt mask
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Parameters
NewStatenew state of the specified DAC interrupts. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 558 of file stm32f4xx_dac.c.

void DAC_ITConfig ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
uint32_t  DAC_IT,
FunctionalState  NewState 
)

Enables or disables the specified DAC interrupts.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_ITspecifies the DAC interrupt sources to be enabled or disabled. This parameter can be:
  • DAC_IT_DMAUDR: DMA underrun interrupt mask
Note
The DMA underrun occurs when a second external trigger arrives before the acknowledgement for the first external trigger is received (first request).
Parameters
NewStatenew state of the specified DAC interrupts. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 591 of file stm32f30x_dac.c.

void DAC_SetChannel1Data ( uint32_t  DAC_Align,
uint16_t  Data 
)

Set the specified data holding register value for DAC channel1.

Parameters
DAC_AlignSpecifies the data alignment for DAC channel1. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
DataData to be loaded in the selected data holding register.
Return values
None
Parameters
DAC_AlignSpecifies the data alignment for DAC channel1. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
Data: Data to be loaded in the selected data holding register.
Return values
None

Definition at line 378 of file stm32f4xx_dac.c.

void DAC_SetChannel1Data ( DAC_TypeDef DACx,
uint32_t  DAC_Align,
uint16_t  Data 
)

Set the specified data holding register value for DAC channel1.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_AlignSpecifies the data alignment for DAC channel1. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
DataData to be loaded in the selected data holding register.
Return values
None

Definition at line 397 of file stm32f30x_dac.c.

void DAC_SetChannel2Data ( uint32_t  DAC_Align,
uint16_t  Data 
)

Set the specified data holding register value for DAC channel2.

Parameters
DAC_AlignSpecifies the data alignment for DAC channel2. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
DataData to be loaded in the selected data holding register.
Return values
None
Parameters
DAC_AlignSpecifies the data alignment for DAC channel2. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
Data: Data to be loaded in the selected data holding register.
Return values
None

Definition at line 403 of file stm32f4xx_dac.c.

void DAC_SetChannel2Data ( DAC_TypeDef DACx,
uint32_t  DAC_Align,
uint16_t  Data 
)

Set the specified data holding register value for DAC channel2.

Parameters
DACxwhere x can be 1 to select the DAC peripheral.
Note
This function is available only for DAC1.
Parameters
DAC_AlignSpecifies the data alignment for DAC channel2. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
Data: Data to be loaded in the selected data holding register.
Return values
None

Definition at line 425 of file stm32f30x_dac.c.

void DAC_SetDualChannelData ( uint32_t  DAC_Align,
uint16_t  Data2,
uint16_t  Data1 
)

Set the specified data holding register value for dual channel DAC.

Parameters
DAC_AlignSpecifies the data alignment for dual channel DAC. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
Data2Data for DAC Channel2 to be loaded in the selected data holding register.
Data1Data for DAC Channel1 to be loaded in the selected data holding register.
Note
In dual mode, a unique register access is required to write in both DAC channels at the same time.
Return values
None
Parameters
DAC_AlignSpecifies the data alignment for dual channel DAC. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
Data2Data for DAC Channel2 to be loaded in the selected data holding register.
Data1Data for DAC Channel1 to be loaded in the selected data holding register.
Return values
None

Definition at line 431 of file stm32f4xx_dac.c.

void DAC_SetDualChannelData ( DAC_TypeDef DACx,
uint32_t  DAC_Align,
uint16_t  Data2,
uint16_t  Data1 
)

Set the specified data holding register value for dual channel DAC.

Parameters
DACxwhere x can be 1 to select the DAC peripheral.
Note
This function isn't applicable for DAC2.
Parameters
DAC_AlignSpecifies the data alignment for dual channel DAC. This parameter can be one of the following values:
  • DAC_Align_8b_R: 8bit right data alignment selected
  • DAC_Align_12b_L: 12bit left data alignment selected
  • DAC_Align_12b_R: 12bit right data alignment selected
Data2Data for DAC Channel2 to be loaded in the selected data holding register.
Data1Data for DAC Channel1 to be loaded in the selected data holding register.
Note
In dual mode, a unique register access is required to write in both DAC channels at the same time.
Return values
None

Definition at line 458 of file stm32f30x_dac.c.

void DAC_SoftwareTriggerCmd ( uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the selected DAC channel software trigger.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the selected DAC channel software trigger. This parameter can be: ENABLE or DISABLE.
Return values
None
Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the selected DAC channel software trigger. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 294 of file stm32f4xx_dac.c.

void DAC_SoftwareTriggerCmd ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the selected DAC channel software trigger.

Parameters
DACxwhere x can be 1 or 2 to select the DAC peripheral.
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
NewStatenew state of the selected DAC channel software trigger. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 303 of file stm32f30x_dac.c.

void DAC_WaveGenerationCmd ( uint32_t  DAC_Channel,
uint32_t  DAC_Wave,
FunctionalState  NewState 
)

Enables or disables the selected DAC channel wave generation.

Parameters
DAC_ChannelThe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_Wavespecifies the wave type to enable or disable. This parameter can be one of the following values:
  • DAC_Wave_Noise: noise wave generation
  • DAC_Wave_Triangle: triangle wave generation
NewStatenew state of the selected DAC channel wave generation. This parameter can be: ENABLE or DISABLE.
Return values
None
Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_WaveSpecifies the wave type to enable or disable. This parameter can be one of the following values:
  • DAC_Wave_Noise: noise wave generation
  • DAC_Wave_Triangle: triangle wave generation
NewStatenew state of the selected DAC channel wave generation. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 349 of file stm32f4xx_dac.c.

void DAC_WaveGenerationCmd ( DAC_TypeDef DACx,
uint32_t  DAC_Channel,
uint32_t  DAC_Wave,
FunctionalState  NewState 
)

Enables or disables the selected DAC channel wave generation.

Parameters
DACxwhere x can be 1 to select the DAC1 peripheral.
Note
Wave generation is not available in DAC2.
Parameters
DAC_Channelthe selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
  • DAC_Channel_2: DAC Channel2 selected
DAC_WaveSpecifies the wave type to enable or disable. This parameter can be one of the following values:
  • DAC_Wave_Noise: noise wave generation
  • DAC_Wave_Triangle: triangle wave generation
NewStatenew state of the selected DAC channel wave generation. This parameter can be: ENABLE or DISABLE.
Note
Return values
None

Definition at line 366 of file stm32f30x_dac.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Thu Oct 24 2019 03:17:22