STM32F4xx_HAL_Driver  1.8.3
IO operation functions

IO operation functions. More...

+ Collaboration diagram for IO operation functions:

Functions

HAL_StatusTypeDef HAL_DAC_Start (DAC_HandleTypeDef *hdac, uint32_t Channel)
 Enables DAC and starts conversion of channel. More...
 
HAL_StatusTypeDef HAL_DAC_Stop (DAC_HandleTypeDef *hdac, uint32_t Channel)
 Disables DAC and stop conversion of channel. More...
 
HAL_StatusTypeDef HAL_DAC_Start_DMA (DAC_HandleTypeDef *hdac, uint32_t Channel, const uint32_t *pData, uint32_t Length, uint32_t Alignment)
 Enables DAC and starts conversion of channel. More...
 
HAL_StatusTypeDef HAL_DAC_Stop_DMA (DAC_HandleTypeDef *hdac, uint32_t Channel)
 Disables DAC and stop conversion of channel. More...
 
void HAL_DAC_IRQHandler (DAC_HandleTypeDef *hdac)
 Handles DAC interrupt request This function uses the interruption of DMA underrun. More...
 
HAL_StatusTypeDef HAL_DAC_SetValue (DAC_HandleTypeDef *hdac, uint32_t Channel, uint32_t Alignment, uint32_t Data)
 Set the specified data holding register value for DAC channel. More...
 
void HAL_DAC_ConvCpltCallbackCh1 (DAC_HandleTypeDef *hdac)
 Conversion complete callback in non-blocking mode for Channel1. More...
 
void HAL_DAC_ConvHalfCpltCallbackCh1 (DAC_HandleTypeDef *hdac)
 Conversion half DMA transfer callback in non-blocking mode for Channel1. More...
 
void HAL_DAC_ErrorCallbackCh1 (DAC_HandleTypeDef *hdac)
 Error DAC callback for Channel1. More...
 
void HAL_DAC_DMAUnderrunCallbackCh1 (DAC_HandleTypeDef *hdac)
 DMA underrun DAC callback for channel1. More...
 
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 (overridden) predefined callback. More...
 
HAL_StatusTypeDef HAL_DAC_UnRegisterCallback (DAC_HandleTypeDef *hdac, HAL_DAC_CallbackIDTypeDef CallbackID)
 Unregister a User DAC Callback DAC Callback is redirected to the weak (overridden) predefined callback. More...
 

Detailed Description

IO operation functions.

  ==============================================================================
             ##### IO operation functions #####
  ==============================================================================
    [..]  This section provides functions allowing to:
      (+) Start conversion.
      (+) Stop conversion.
      (+) Start conversion and enable DMA transfer.
      (+) Stop conversion and disable DMA transfer.
      (+) Get result of conversion.

Function Documentation

◆ HAL_DAC_ConvCpltCallbackCh1()

__weak void HAL_DAC_ConvCpltCallbackCh1 ( DAC_HandleTypeDef hdac)

Conversion complete callback in non-blocking mode for Channel1.

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

Definition at line 836 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_ConvHalfCpltCallbackCh1()

__weak void HAL_DAC_ConvHalfCpltCallbackCh1 ( DAC_HandleTypeDef hdac)

Conversion half DMA transfer callback in non-blocking mode for Channel1.

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

Definition at line 852 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_DMAUnderrunCallbackCh1()

__weak void HAL_DAC_DMAUnderrunCallbackCh1 ( DAC_HandleTypeDef hdac)

DMA underrun DAC callback for channel1.

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

Definition at line 884 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_ErrorCallbackCh1()

__weak void HAL_DAC_ErrorCallbackCh1 ( DAC_HandleTypeDef hdac)

Error DAC callback for Channel1.

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

Definition at line 868 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_IRQHandler()

void HAL_DAC_IRQHandler ( DAC_HandleTypeDef hdac)

Handles DAC interrupt request This function uses the interruption of DMA underrun.

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

Definition at line 720 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_RegisterCallback()

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 (overridden) predefined callback.

Note
The HAL_DAC_RegisterCallback() may be called before HAL_DAC_Init() in HAL_DAC_STATE_RESET to register callbacks for HAL_DAC_MSPINIT_CB_ID and HAL_DAC_MSPDEINIT_CB_ID
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 1091 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_SetValue()

HAL_StatusTypeDef HAL_DAC_SetValue ( DAC_HandleTypeDef hdac,
uint32_t  Channel,
uint32_t  Alignment,
uint32_t  Data 
)

Set the specified data holding register value for DAC channel.

Parameters
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified 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
AlignmentSpecifies the data alignment. 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
HALstatus

Definition at line 796 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_Start()

HAL_StatusTypeDef HAL_DAC_Start ( DAC_HandleTypeDef hdac,
uint32_t  Channel 
)

Enables DAC and starts conversion of channel.

Parameters
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified 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
HALstatus

Definition at line 435 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_Start_DMA()

HAL_StatusTypeDef HAL_DAC_Start_DMA ( DAC_HandleTypeDef hdac,
uint32_t  Channel,
const uint32_t *  pData,
uint32_t  Length,
uint32_t  Alignment 
)

Enables DAC and starts conversion of channel.

Parameters
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified 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
pDataThe source Buffer address.
LengthThe length of data to be transferred from memory to DAC peripheral
AlignmentSpecifies the data alignment for DAC channel. 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
Return values
HALstatus

Definition at line 534 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_Stop()

HAL_StatusTypeDef HAL_DAC_Stop ( DAC_HandleTypeDef hdac,
uint32_t  Channel 
)

Disables DAC and stop conversion of channel.

Parameters
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified 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
HALstatus

Definition at line 496 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_Stop_DMA()

HAL_StatusTypeDef HAL_DAC_Stop_DMA ( DAC_HandleTypeDef hdac,
uint32_t  Channel 
)

Disables DAC and stop conversion of channel.

Parameters
hdacpointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified 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
HALstatus

Definition at line 666 of file stm32f4xx_hal_dac.c.

◆ HAL_DAC_UnRegisterCallback()

HAL_StatusTypeDef HAL_DAC_UnRegisterCallback ( DAC_HandleTypeDef hdac,
HAL_DAC_CallbackIDTypeDef  CallbackID 
)

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

Note
The HAL_DAC_UnRegisterCallback() may be called before HAL_DAC_Init() in HAL_DAC_STATE_RESET to un-register callbacks for HAL_DAC_MSPINIT_CB_ID and HAL_DAC_MSPDEINIT_CB_ID
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 1203 of file stm32f4xx_hal_dac.c.