STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
DAC Exported Macros
Collaboration diagram for DAC Exported Macros:

Macros

#define __HAL_DAC_RESET_HANDLE_STATE(__HANDLE__)
 Reset DAC handle state.
 
#define __HAL_DAC_ENABLE(__HANDLE__, __DAC_Channel__)
 Enable the DAC channel.
 
#define __HAL_DAC_DISABLE(__HANDLE__, __DAC_Channel__)
 Disable the DAC channel.
 
#define DAC_DHR12R1_ALIGNMENT(__ALIGNMENT__)
 Set DHR12R1 alignment.
 
#define DAC_DHR12RD_ALIGNMENT(__ALIGNMENT__)
 Set DHR12RD alignment.
 
#define __HAL_DAC_ENABLE_IT(__HANDLE__, __INTERRUPT__)
 Enable the DAC interrupt.
 
#define __HAL_DAC_DISABLE_IT(__HANDLE__, __INTERRUPT__)
 Disable the DAC interrupt.
 
#define __HAL_DAC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)
 Check whether the specified DAC interrupt source is enabled or not.
 
#define __HAL_DAC_GET_FLAG(__HANDLE__, __FLAG__)
 Get the selected DAC's flag status.
 
#define __HAL_DAC_CLEAR_FLAG(__HANDLE__, __FLAG__)
 Clear the DAC's flag.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_DAC_RESET_HANDLE_STATE

#define __HAL_DAC_RESET_HANDLE_STATE ( __HANDLE__)

#include <stm32f4xx_hal_dac.h>

Value:
((__HANDLE__)->State = HAL_DAC_STATE_RESET)
@ HAL_DAC_STATE_RESET

Reset DAC handle state.

Parameters
__HANDLE__specifies the DAC handle.
Return values
None

Definition at line 260 of file stm32f4xx_hal_dac.h.

◆ __HAL_DAC_ENABLE

#define __HAL_DAC_ENABLE ( __HANDLE__,
__DAC_Channel__ )

#include <stm32f4xx_hal_dac.h>

Value:
((__HANDLE__)->Instance->CR |= (DAC_CR_EN1 << ((__DAC_Channel__) & 0x10UL)))

Enable the DAC channel.

Parameters
__HANDLE__specifies the DAC handle.
__DAC_Channel__specifies the DAC channel
Return values
None

Definition at line 268 of file stm32f4xx_hal_dac.h.

Referenced by HAL_DAC_Start(), and HAL_DAC_Start_DMA().

◆ __HAL_DAC_DISABLE

#define __HAL_DAC_DISABLE ( __HANDLE__,
__DAC_Channel__ )

#include <stm32f4xx_hal_dac.h>

Value:
((__HANDLE__)->Instance->CR &= ~(DAC_CR_EN1 << ((__DAC_Channel__) & 0x10UL)))

Disable the DAC channel.

Parameters
__HANDLE__specifies the DAC handle
__DAC_Channel__specifies the DAC channel.
Return values
None

Definition at line 276 of file stm32f4xx_hal_dac.h.

Referenced by HAL_DAC_Stop(), and HAL_DAC_Stop_DMA().

◆ DAC_DHR12R1_ALIGNMENT

#define DAC_DHR12R1_ALIGNMENT ( __ALIGNMENT__)

#include <stm32f4xx_hal_dac.h>

Value:
(0x00000008UL + (__ALIGNMENT__))

Set DHR12R1 alignment.

Parameters
__ALIGNMENT__specifies the DAC alignment
Return values
None

Definition at line 283 of file stm32f4xx_hal_dac.h.

Referenced by HAL_DAC_SetValue().

◆ DAC_DHR12RD_ALIGNMENT

#define DAC_DHR12RD_ALIGNMENT ( __ALIGNMENT__)

#include <stm32f4xx_hal_dac.h>

Value:
(0x00000020UL + (__ALIGNMENT__))

Set DHR12RD alignment.

Parameters
__ALIGNMENT__specifies the DAC alignment
Return values
None

Definition at line 297 of file stm32f4xx_hal_dac.h.

◆ __HAL_DAC_ENABLE_IT

#define __HAL_DAC_ENABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_dac.h>

Value:
(((__HANDLE__)->Instance->CR) |= (__INTERRUPT__))

Enable the DAC interrupt.

Parameters
__HANDLE__specifies the DAC handle
__INTERRUPT__specifies the DAC interrupt. This parameter can be any combination of the following values:
  • DAC_IT_DMAUDR1 DAC channel 1 DMA underrun interrupt
  • DAC_IT_DMAUDR2 DAC channel 2 DMA underrun interrupt
Return values
None

Definition at line 307 of file stm32f4xx_hal_dac.h.

Referenced by HAL_DAC_Start_DMA().

◆ __HAL_DAC_DISABLE_IT

#define __HAL_DAC_DISABLE_IT ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_dac.h>

Value:
(((__HANDLE__)->Instance->CR) &= ~(__INTERRUPT__))

Disable the DAC interrupt.

Parameters
__HANDLE__specifies the DAC handle
__INTERRUPT__specifies the DAC interrupt. This parameter can be any combination of the following values:
  • DAC_IT_DMAUDR1 DAC channel 1 DMA underrun interrupt
  • DAC_IT_DMAUDR2 DAC channel 2 DMA underrun interrupt
Return values
None

Definition at line 317 of file stm32f4xx_hal_dac.h.

Referenced by HAL_DAC_IRQHandler(), and HAL_DAC_Stop_DMA().

◆ __HAL_DAC_GET_IT_SOURCE

#define __HAL_DAC_GET_IT_SOURCE ( __HANDLE__,
__INTERRUPT__ )

#include <stm32f4xx_hal_dac.h>

Value:
(((__HANDLE__)->Instance->CR\
& (__INTERRUPT__)) == (__INTERRUPT__))

Check whether the specified DAC interrupt source is enabled or not.

Parameters
__HANDLE__DAC handle
__INTERRUPT__DAC interrupt source to check This parameter can be any combination of the following values:
  • DAC_IT_DMAUDR1 DAC channel 1 DMA underrun interrupt
  • DAC_IT_DMAUDR2 DAC channel 2 DMA underrun interrupt
Return values
Stateof interruption (SET or RESET)

Definition at line 327 of file stm32f4xx_hal_dac.h.

◆ __HAL_DAC_GET_FLAG

#define __HAL_DAC_GET_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_dac.h>

Value:
((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Get the selected DAC's flag status.

Parameters
__HANDLE__specifies the DAC handle.
__FLAG__specifies the DAC flag to get. This parameter can be any combination of the following values:
  • DAC_FLAG_DMAUDR1 DAC channel 1 DMA underrun flag
  • DAC_FLAG_DMAUDR2 DAC channel 2 DMA underrun flag
Return values
None

Definition at line 338 of file stm32f4xx_hal_dac.h.

◆ __HAL_DAC_CLEAR_FLAG

#define __HAL_DAC_CLEAR_FLAG ( __HANDLE__,
__FLAG__ )

#include <stm32f4xx_hal_dac.h>

Value:
(((__HANDLE__)->Instance->SR) = (__FLAG__))

Clear the DAC's flag.

Parameters
__HANDLE__specifies the DAC handle.
__FLAG__specifies the DAC flag to clear. This parameter can be any combination of the following values:
  • DAC_FLAG_DMAUDR1 DAC channel 1 DMA underrun flag
  • DAC_FLAG_DMAUDR2 DAC channel 2 DMA underrun flag
Return values
None

Definition at line 348 of file stm32f4xx_hal_dac.h.

Referenced by HAL_DAC_IRQHandler().