Initialize some features of DAC channel.
- Note:
- LL_DAC_Init() aims to ease basic configuration of a DAC channel. Leaving it ready to be enabled and output: a level by calling one of LL_DAC_ConvertData12RightAligned LL_DAC_ConvertData12LeftAligned LL_DAC_ConvertData8RightAligned or one of the supported autogenerated wave.
-
This function allows configuration of:
- Output mode
- Trigger
- Wave generation
-
The setting of these parameters by function LL_DAC_Init() is conditioned to DAC state: DAC channel must be disabled.
- Parameters:
-
DACx | DAC instance |
DAC_Channel | This parameter can be one of the following values:
|
DAC_InitStruct | Pointer to a LL_DAC_InitTypeDef structure |
- Return values:
-
An | ErrorStatus enumeration value:
- SUCCESS: DAC registers are initialized
- ERROR: DAC registers are not initialized
|
Definition at line 234 of file stm32h7xx_ll_dac.c.
References assert_param, DAC_CR_CHX_BITOFFSET_MASK, IS_LL_DAC_CHANNEL, IS_LL_DAC_OUTPUT_BUFFER, IS_LL_DAC_OUTPUT_CONNECTION, IS_LL_DAC_OUTPUT_MODE, IS_LL_DAC_TRIGGER_SOURCE, IS_LL_DAC_WAVE_AUTO_GENER_CONFIG, IS_LL_DAC_WAVE_AUTO_GENER_MODE, LL_DAC_IsEnabled(), LL_DAC_WAVE_AUTO_GENERATION_NONE, LL_DAC_InitTypeDef::OutputBuffer, LL_DAC_InitTypeDef::OutputConnection, LL_DAC_InitTypeDef::OutputMode, LL_DAC_InitTypeDef::TriggerSource, LL_DAC_InitTypeDef::WaveAutoGeneration, and LL_DAC_InitTypeDef::WaveAutoGenerationConfig.