TUKS MCU Introductory course / TUKS-COURSE-2-LED
Embed: (wiki syntax)

« Back to documentation index

IO operation functions

IO operation functions
[DAC Exported Functions]

IO operation functions. More...

Functions

HAL_StatusTypeDef HAL_DAC_Start (DAC_HandleTypeDef *hdac, uint32_t Channel)
 Enables DAC and starts conversion of channel.
HAL_StatusTypeDef HAL_DAC_Stop (DAC_HandleTypeDef *hdac, uint32_t Channel)
 Disables DAC and stop conversion of channel.
HAL_StatusTypeDef HAL_DAC_Start_DMA (DAC_HandleTypeDef *hdac, uint32_t Channel, uint32_t *pData, uint32_t Length, uint32_t Alignment)
 Enables DAC and starts conversion of channel.
HAL_StatusTypeDef HAL_DAC_Stop_DMA (DAC_HandleTypeDef *hdac, uint32_t Channel)
 Disables DAC and stop conversion of channel.
void HAL_DAC_IRQHandler (DAC_HandleTypeDef *hdac)
 Handles DAC interrupt request This function uses the interruption of DMA underrun.
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.
__weak void HAL_DAC_ConvCpltCallbackCh1 (DAC_HandleTypeDef *hdac)
 Conversion complete callback in non-blocking mode for Channel1.
__weak void HAL_DAC_ConvHalfCpltCallbackCh1 (DAC_HandleTypeDef *hdac)
 Conversion half DMA transfer callback in non-blocking mode for Channel1.
__weak void HAL_DAC_ErrorCallbackCh1 (DAC_HandleTypeDef *hdac)
 Error DAC callback for Channel1.
__weak void HAL_DAC_DMAUnderrunCallbackCh1 (DAC_HandleTypeDef *hdac)
 DMA underrun DAC callback for channel1.

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

__weak void HAL_DAC_ConvCpltCallbackCh1 ( DAC_HandleTypeDef *  hdac )

Conversion complete callback in non-blocking mode for Channel1.

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

Definition at line 814 of file stm32l4xx_hal_dac.c.

__weak void HAL_DAC_ConvHalfCpltCallbackCh1 ( DAC_HandleTypeDef *  hdac )

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

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

Definition at line 830 of file stm32l4xx_hal_dac.c.

__weak void HAL_DAC_DMAUnderrunCallbackCh1 ( DAC_HandleTypeDef *  hdac )

DMA underrun DAC callback for channel1.

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

Definition at line 862 of file stm32l4xx_hal_dac.c.

__weak void HAL_DAC_ErrorCallbackCh1 ( DAC_HandleTypeDef *  hdac )

Error DAC callback for Channel1.

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

Definition at line 846 of file stm32l4xx_hal_dac.c.

void HAL_DAC_IRQHandler ( DAC_HandleTypeDef *  hdac )

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

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

Definition at line 720 of file stm32l4xx_hal_dac.c.

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:
hdac,:pointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Channel,:The selected DAC channel. This parameter can be one of the following values:

  • DAC_CHANNEL_1: DAC Channel1 selected
  • DAC_CHANNEL_2: DAC Channel2 selected
Alignment,:Specifies 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
Data,:Data to be loaded in the selected data holding register.
Return values:
HALstatus

Definition at line 782 of file stm32l4xx_hal_dac.c.

HAL_StatusTypeDef HAL_DAC_Start ( DAC_HandleTypeDef *  hdac,
uint32_t  Channel 
)

Enables DAC and starts conversion of channel.

Parameters:
hdac,:pointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Channel,:The 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 458 of file stm32l4xx_hal_dac.c.

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

Enables DAC and starts conversion of channel.

Parameters:
hdac,:pointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Channel,:The selected DAC channel. This parameter can be one of the following values:

  • DAC_CHANNEL_1: DAC Channel1 selected
  • DAC_CHANNEL_2: DAC Channel2 selected
pData,:The destination peripheral Buffer address.
Length,:The length of data to be transferred from memory to DAC peripheral
Alignment,:Specifies 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 543 of file stm32l4xx_hal_dac.c.

HAL_StatusTypeDef HAL_DAC_Stop ( DAC_HandleTypeDef *  hdac,
uint32_t  Channel 
)

Disables DAC and stop conversion of channel.

Parameters:
hdac,:pointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Channel,:The 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 511 of file stm32l4xx_hal_dac.c.

HAL_StatusTypeDef HAL_DAC_Stop_DMA ( DAC_HandleTypeDef *  hdac,
uint32_t  Channel 
)

Disables DAC and stop conversion of channel.

Parameters:
hdac,:pointer to a DAC_HandleTypeDef structure that contains the configuration information for the specified DAC.
Channel,:The 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 662 of file stm32l4xx_hal_dac.c.