STM32F439xx HAL User Manual
Defines
ADC Exported Macros
ADC | ADCEx

Defines

#define __HAL_ADC_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_ADC_STATE_RESET)
 Reset ADC handle state.
#define __HAL_ADC_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR2 |= ADC_CR2_ADON)
 Enable the ADC peripheral.
#define __HAL_ADC_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR2 &= ~ADC_CR2_ADON)
 Disable the ADC peripheral.
#define __HAL_ADC_ENABLE_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->CR1) |= (__INTERRUPT__))
 Enable the ADC end of conversion interrupt.
#define __HAL_ADC_DISABLE_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->CR1) &= ~(__INTERRUPT__))
 Disable the ADC end of conversion interrupt.
#define __HAL_ADC_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__))
 Check if the specified ADC interrupt source is enabled or disabled.
#define __HAL_ADC_CLEAR_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->SR) = ~(__FLAG__))
 Clear the ADC's pending flags.
#define __HAL_ADC_GET_FLAG(__HANDLE__, __FLAG__)   ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))
 Get the selected ADC's flag status.
#define __HAL_ADC_PATH_INTERNAL_VBAT_DISABLE()   (ADC->CCR &= ~(ADC_CCR_VBATE))
 Disable internal path of ADC channel Vbat.

Define Documentation

#define __HAL_ADC_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)    (((__HANDLE__)->Instance->SR) = ~(__FLAG__))
#define __HAL_ADC_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR2 &= ~ADC_CR2_ADON)

Disable the ADC peripheral.

Parameters:
__HANDLE__ADC handle
Return values:
None

Definition at line 473 of file stm32f4xx_hal_adc.h.

Referenced by HAL_ADC_DeInit(), HAL_ADC_Stop(), HAL_ADC_Stop_DMA(), HAL_ADC_Stop_IT(), HAL_ADCEx_InjectedStop(), HAL_ADCEx_InjectedStop_IT(), and HAL_ADCEx_MultiModeStop_DMA().

#define __HAL_ADC_DISABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    (((__HANDLE__)->Instance->CR1) &= ~(__INTERRUPT__))

Disable the ADC end of conversion interrupt.

Parameters:
__HANDLE__specifies the ADC Handle.
__INTERRUPT__ADC interrupt.
Return values:
None

Definition at line 489 of file stm32f4xx_hal_adc.h.

Referenced by ADC_DMAConvCplt(), ADC_MultiModeDMAConvCplt(), HAL_ADC_AnalogWDGConfig(), HAL_ADC_IRQHandler(), HAL_ADC_Stop_DMA(), HAL_ADC_Stop_IT(), HAL_ADCEx_InjectedStop_IT(), and HAL_ADCEx_MultiModeStop_DMA().

#define __HAL_ADC_ENABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR2 |= ADC_CR2_ADON)

Enable the ADC peripheral.

Parameters:
__HANDLE__ADC handle
Return values:
None

Definition at line 466 of file stm32f4xx_hal_adc.h.

Referenced by HAL_ADC_Start(), HAL_ADC_Start_DMA(), HAL_ADC_Start_IT(), HAL_ADCEx_InjectedStart(), HAL_ADCEx_InjectedStart_IT(), and HAL_ADCEx_MultiModeStart_DMA().

#define __HAL_ADC_ENABLE_IT (   __HANDLE__,
  __INTERRUPT__ 
)    (((__HANDLE__)->Instance->CR1) |= (__INTERRUPT__))

Enable the ADC end of conversion interrupt.

Parameters:
__HANDLE__specifies the ADC Handle.
__INTERRUPT__ADC Interrupt.
Return values:
None

Definition at line 481 of file stm32f4xx_hal_adc.h.

Referenced by HAL_ADC_AnalogWDGConfig(), HAL_ADC_Start_DMA(), HAL_ADC_Start_IT(), HAL_ADCEx_InjectedStart_IT(), and HAL_ADCEx_MultiModeStart_DMA().

#define __HAL_ADC_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    ((((__HANDLE__)->Instance->SR) & (__FLAG__)) == (__FLAG__))

Get the selected ADC's flag status.

Parameters:
__HANDLE__specifies the ADC Handle.
__FLAG__ADC flag.
Return values:
None

Definition at line 512 of file stm32f4xx_hal_adc.h.

Referenced by HAL_ADC_IRQHandler(), HAL_ADC_PollForConversion(), HAL_ADC_PollForEvent(), and HAL_ADCEx_InjectedPollForConversion().

#define __HAL_ADC_GET_IT_SOURCE (   __HANDLE__,
  __INTERRUPT__ 
)    (((__HANDLE__)->Instance->CR1 & (__INTERRUPT__)) == (__INTERRUPT__))

Check if the specified ADC interrupt source is enabled or disabled.

Parameters:
__HANDLE__specifies the ADC Handle.
__INTERRUPT__specifies the ADC interrupt source to check.
Return values:
Thenew state of __IT__ (TRUE or FALSE).

Definition at line 496 of file stm32f4xx_hal_adc.h.

Referenced by HAL_ADC_IRQHandler().

#define __HAL_ADC_PATH_INTERNAL_VBAT_DISABLE ( )    (ADC->CCR &= ~(ADC_CCR_VBATE))

Disable internal path of ADC channel Vbat.

Note:
Use case of this macro: On devices STM32F42x and STM32F43x, ADC internal channels Vbat and VrefInt share the same internal path, only one of them can be enabled.This macro is to be used when ADC channels Vbat and VrefInt are selected, and must be called before starting conversion of ADC channel VrefInt in order to disable ADC channel Vbat.
Return values:
None

Definition at line 272 of file stm32f4xx_hal_adc_ex.h.

#define __HAL_ADC_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_ADC_STATE_RESET)

Reset ADC handle state.

Parameters:
__HANDLE__ADC handle
Return values:
None

Definition at line 459 of file stm32f4xx_hal_adc.h.