STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
DAC channels configuration

DAC channels configuration: trigger, output buffer, data format. More...

Functions

void DAC_DeInit (void)
 Deinitializes the DAC peripheral registers to their default reset values. 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_StructInit (DAC_InitTypeDef *DAC_InitStruct)
 Fills each DAC_InitStruct member with its default value. More...
 
void DAC_Cmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the specified DAC channel. More...
 
void DAC_SoftwareTriggerCmd (uint32_t DAC_Channel, FunctionalState NewState)
 Enables or disables the selected DAC channel software trigger. More...
 
void DAC_SetChannel1Data (uint32_t DAC_Align, uint16_t Data)
 Set the specified data holding register value for DAC channel1. More...
 
uint16_t DAC_GetDataOutputValue (uint32_t DAC_Channel)
 Returns the last data output value of the selected DAC channel. More...
 

Detailed Description

DAC channels configuration: trigger, output buffer, data format.

 ===============================================================================
  ##### DAC channels configuration: trigger, output buffer, data format #####
 ===============================================================================  

Function Documentation

void DAC_Cmd ( uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the specified DAC channel.

Parameters
DAC_Channel,:The selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
NewState,:new 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
void DAC_DeInit ( void  )

Deinitializes the DAC peripheral registers to their default reset values.

Parameters
None
Return values
None
uint16_t DAC_GetDataOutputValue ( uint32_t  DAC_Channel)

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

Parameters
DAC_Channel,:the selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
Return values
Theselected DAC channel data output value.
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_Channel,:the selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
DAC_InitStruct,:pointer to a DAC_InitTypeDef structure that contains the configuration information for the specified DAC channel.
Return values
None
void DAC_SetChannel1Data ( uint32_t  DAC_Align,
uint16_t  Data 
)

Set the specified data holding register value for DAC channel1.

Parameters
DAC_Align,:Specifies 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
void DAC_SoftwareTriggerCmd ( uint32_t  DAC_Channel,
FunctionalState  NewState 
)

Enables or disables the selected DAC channel software trigger.

Parameters
DAC_Channel,:the selected DAC channel. This parameter can be one of the following values:
  • DAC_Channel_1: DAC Channel1 selected
NewState,:new state of the selected DAC channel software trigger. This parameter can be: ENABLE or DISABLE.
Return values
None
void DAC_StructInit ( DAC_InitTypeDef DAC_InitStruct)

Fills each DAC_InitStruct member with its default value.

Parameters
DAC_InitStruct,:pointer to a DAC_InitTypeDef structure which will be initialized.
Return values
None