STM32L443xx HAL User Manual
Functions
Initialization and de-initialization functions
DAC Exported Functions

Initialization and Configuration functions. More...

Functions

HAL_StatusTypeDef HAL_DAC_Init (DAC_HandleTypeDef *hdac)
 Initialize the DAC peripheral according to the specified parameters in the DAC_InitStruct and initialize the associated handle.
HAL_StatusTypeDef HAL_DAC_DeInit (DAC_HandleTypeDef *hdac)
 Deinitialize the DAC peripheral registers to their default reset values.
__weak void HAL_DAC_MspInit (DAC_HandleTypeDef *hdac)
 Initialize the DAC MSP.
__weak void HAL_DAC_MspDeInit (DAC_HandleTypeDef *hdac)
 DeInitialize the DAC MSP.
HAL_StatusTypeDef HAL_DAC_RegisterCallback (DAC_HandleTypeDef *hdac, HAL_DAC_CallbackIDTypeDef CallbackID, pDAC_CallbackTypeDef pCallback)
 Register a User DAC Callback To be used instead of the weak (surcharged) predefined callback.
HAL_StatusTypeDef HAL_DAC_UnRegisterCallback (DAC_HandleTypeDef *hdac, HAL_DAC_CallbackIDTypeDef CallbackID)
 Unregister a User DAC Callback DAC Callback is redirected to the weak (surcharged) predefined callback.

Detailed Description

Initialization and Configuration functions.

  ==============================================================================
              ##### Initialization and de-initialization functions #####
  ==============================================================================
    [..]  This section provides functions allowing to:
      (+) Initialize and configure the DAC.
      (+) De-initialize the DAC.


Function Documentation

HAL_StatusTypeDef HAL_DAC_DeInit ( DAC_HandleTypeDef hdac)

Deinitialize the DAC peripheral registers to their default reset values.

Parameters:
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Return values:
HALstatus

Definition at line 446 of file stm32l4xx_hal_dac.c.

References assert_param, __DAC_HandleTypeDef::ErrorCode, HAL_DAC_ERROR_NONE, HAL_DAC_MspDeInit(), HAL_DAC_STATE_BUSY, HAL_DAC_STATE_RESET, __DAC_HandleTypeDef::Instance, __DAC_HandleTypeDef::MspDeInitCallback, and __DAC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DAC_Init ( DAC_HandleTypeDef hdac)

DeInitialize the DAC MSP.

Parameters:
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Return values:
None

Definition at line 507 of file stm32l4xx_hal_dac.c.

Referenced by HAL_DAC_DeInit(), and HAL_DAC_UnRegisterCallback().

Initialize the DAC MSP.

Parameters:
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Return values:
None

Definition at line 491 of file stm32l4xx_hal_dac.c.

Referenced by HAL_DAC_Init(), and HAL_DAC_UnRegisterCallback().

HAL_StatusTypeDef HAL_DAC_RegisterCallback ( DAC_HandleTypeDef hdac,
HAL_DAC_CallbackIDTypeDef  CallbackID,
pDAC_CallbackTypeDef  pCallback 
)

Register a User DAC Callback To be used instead of the weak (surcharged) predefined callback.

Parameters:
hdacDAC handle
CallbackIDID of the callback to be registered This parameter can be one of the following values:
pCallbackpointer to the Callback function
Return values:
status

Definition at line 1459 of file stm32l4xx_hal_dac.c.

References __DAC_HandleTypeDef::ConvCpltCallbackCh1, __DAC_HandleTypeDef::ConvCpltCallbackCh2, __DAC_HandleTypeDef::ConvHalfCpltCallbackCh1, __DAC_HandleTypeDef::ConvHalfCpltCallbackCh2, __DAC_HandleTypeDef::DMAUnderrunCallbackCh1, __DAC_HandleTypeDef::DMAUnderrunCallbackCh2, __DAC_HandleTypeDef::ErrorCallbackCh1, __DAC_HandleTypeDef::ErrorCallbackCh2, __DAC_HandleTypeDef::ErrorCode, HAL_DAC_CH1_COMPLETE_CB_ID, HAL_DAC_CH1_ERROR_ID, HAL_DAC_CH1_HALF_COMPLETE_CB_ID, HAL_DAC_CH1_UNDERRUN_CB_ID, HAL_DAC_CH2_COMPLETE_CB_ID, HAL_DAC_CH2_ERROR_ID, HAL_DAC_CH2_HALF_COMPLETE_CB_ID, HAL_DAC_CH2_UNDERRUN_CB_ID, HAL_DAC_ERROR_INVALID_CALLBACK, HAL_DAC_MSPDEINIT_CB_ID, HAL_DAC_MSPINIT_CB_ID, HAL_DAC_STATE_READY, HAL_DAC_STATE_RESET, __DAC_HandleTypeDef::MspDeInitCallback, __DAC_HandleTypeDef::MspInitCallback, and __DAC_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DAC_UnRegisterCallback ( DAC_HandleTypeDef hdac,
HAL_DAC_CallbackIDTypeDef  CallbackID 
)

Unregister a User DAC Callback DAC Callback is redirected to the weak (surcharged) predefined callback.

Parameters:
hdacDAC handle
CallbackIDID of the callback to be unregistered This parameter can be one of the following values:
Return values:
status

Definition at line 1566 of file stm32l4xx_hal_dac.c.

References __DAC_HandleTypeDef::ConvCpltCallbackCh1, __DAC_HandleTypeDef::ConvCpltCallbackCh2, __DAC_HandleTypeDef::ConvHalfCpltCallbackCh1, __DAC_HandleTypeDef::ConvHalfCpltCallbackCh2, __DAC_HandleTypeDef::DMAUnderrunCallbackCh1, __DAC_HandleTypeDef::DMAUnderrunCallbackCh2, __DAC_HandleTypeDef::ErrorCallbackCh1, __DAC_HandleTypeDef::ErrorCallbackCh2, __DAC_HandleTypeDef::ErrorCode, HAL_DAC_ALL_CB_ID, HAL_DAC_CH1_COMPLETE_CB_ID, HAL_DAC_CH1_ERROR_ID, HAL_DAC_CH1_HALF_COMPLETE_CB_ID, HAL_DAC_CH1_UNDERRUN_CB_ID, HAL_DAC_CH2_COMPLETE_CB_ID, HAL_DAC_CH2_ERROR_ID, HAL_DAC_CH2_HALF_COMPLETE_CB_ID, HAL_DAC_CH2_UNDERRUN_CB_ID, HAL_DAC_ConvCpltCallbackCh1(), HAL_DAC_ConvHalfCpltCallbackCh1(), HAL_DAC_DMAUnderrunCallbackCh1(), HAL_DAC_ERROR_INVALID_CALLBACK, HAL_DAC_ErrorCallbackCh1(), HAL_DAC_MspDeInit(), HAL_DAC_MSPDEINIT_CB_ID, HAL_DAC_MspInit(), HAL_DAC_MSPINIT_CB_ID, HAL_DAC_STATE_READY, HAL_DAC_STATE_RESET, HAL_DACEx_ConvCpltCallbackCh2(), HAL_DACEx_ConvHalfCpltCallbackCh2(), HAL_DACEx_DMAUnderrunCallbackCh2(), HAL_DACEx_ErrorCallbackCh2(), __DAC_HandleTypeDef::MspDeInitCallback, __DAC_HandleTypeDef::MspInitCallback, and __DAC_HandleTypeDef::State.