STM32F103xB HAL User Manual
Modules | Defines
ADCEx Private Macro
ADCEx

Modules

 ADCEx injected nb conv verification

Defines

#define ADC_CFGR_EXTSEL(__HANDLE__, __EXT_TRIG_CONV__)   (__EXT_TRIG_CONV__)
 For devices with 3 ADCs: Defines the external trigger source for regular group according to ADC into common group ADC1&ADC2 or ADC3 (some triggers with same source have different value to be programmed into ADC EXTSEL bits of CR2 register).
#define ADC_CFGR_JEXTSEL(__HANDLE__, __EXT_TRIG_INJECTCONV__)   (__EXT_TRIG_INJECTCONV__)
 For devices with 3 ADCs: Defines the external trigger source for injected group according to ADC into common group ADC1&ADC2 or ADC3 (some triggers with same source have different value to be programmed into ADC JEXTSEL bits of CR2 register).
#define ADC_MULTIMODE_IS_ENABLE(__HANDLE__)
 Verification if multimode is enabled for the selected ADC (multimode ADC master or ADC slave) (applicable for devices with several ADCs)
#define ADC_NONMULTIMODE_OR_MULTIMODEMASTER(__HANDLE__)
 Verification of condition for ADC start conversion: ADC must be in non-multimode, or multimode with handle of ADC master (applicable for devices with several ADCs)
#define ADC_MULTIMODE_AUTO_INJECTED(__HANDLE__)
 Check ADC multimode setting: In case of multimode, check whether ADC master of the selected ADC has feature auto-injection enabled (applicable for devices with several ADCs)
#define ADC_COMMON_ADC_OTHER(__HANDLE__, __HANDLE_OTHER_ADC__)   ((__HANDLE_OTHER_ADC__)->Instance = ADC2)
 Set handle of the other ADC sharing the common multimode settings.
#define ADC_MULTI_SLAVE(__HANDLE_MASTER__, __HANDLE_SLAVE__)   ((__HANDLE_SLAVE__)->Instance = ADC2)
 Set handle of the ADC slave associated to the ADC master On STM32F1 devices, ADC slave is always ADC2 (this can be different on other STM32 devices)
#define IS_ADC_INJECTED_RANK(CHANNEL)
#define IS_ADC_EXTTRIGINJEC_EDGE(EDGE)
#define IS_ADC_EXTTRIG(REGTRIG)
#define IS_ADC_EXTTRIGINJEC(REGTRIG)
#define IS_ADC_MODE(MODE)

Define Documentation

#define ADC_CFGR_EXTSEL (   __HANDLE__,
  __EXT_TRIG_CONV__ 
)    (__EXT_TRIG_CONV__)

For devices with 3 ADCs: Defines the external trigger source for regular group according to ADC into common group ADC1&ADC2 or ADC3 (some triggers with same source have different value to be programmed into ADC EXTSEL bits of CR2 register).

For devices with 2 ADCs or less: this macro makes no change.

Parameters:
__HANDLE__,:ADC handle
__EXT_TRIG_CONV__,:External trigger selected for regular group.
Return values:
Externaltrigger to be programmed into EXTSEL bits of CR2 register

Definition at line 395 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADC_Init().

#define ADC_CFGR_JEXTSEL (   __HANDLE__,
  __EXT_TRIG_INJECTCONV__ 
)    (__EXT_TRIG_INJECTCONV__)

For devices with 3 ADCs: Defines the external trigger source for injected group according to ADC into common group ADC1&ADC2 or ADC3 (some triggers with same source have different value to be programmed into ADC JEXTSEL bits of CR2 register).

For devices with 2 ADCs or less: this macro makes no change.

Parameters:
__HANDLE__,:ADC handle
__EXT_TRIG_INJECTCONV__,:External trigger selected for injected group.
Return values:
Externaltrigger to be programmed into JEXTSEL bits of CR2 register

Definition at line 423 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

#define ADC_COMMON_ADC_OTHER (   __HANDLE__,
  __HANDLE_OTHER_ADC__ 
)    ((__HANDLE_OTHER_ADC__)->Instance = ADC2)

Set handle of the other ADC sharing the common multimode settings.

Parameters:
__HANDLE__,:ADC handle
__HANDLE_OTHER_ADC__,:other ADC handle
Return values:
None

Definition at line 489 of file stm32f1xx_hal_adc_ex.h.

#define ADC_MULTI_SLAVE (   __HANDLE_MASTER__,
  __HANDLE_SLAVE__ 
)    ((__HANDLE_SLAVE__)->Instance = ADC2)

Set handle of the ADC slave associated to the ADC master On STM32F1 devices, ADC slave is always ADC2 (this can be different on other STM32 devices)

Parameters:
__HANDLE_MASTER__,:ADC master handle
__HANDLE_SLAVE__,:ADC slave handle
Return values:
None

Definition at line 500 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_MultiModeConfigChannel(), HAL_ADCEx_MultiModeStart_DMA(), and HAL_ADCEx_MultiModeStop_DMA().

#define ADC_MULTIMODE_AUTO_INJECTED (   __HANDLE__)
Value:
(( (((__HANDLE__)->Instance) == ADC1) || (((__HANDLE__)->Instance) == ADC2)  \
   )?                                                                          \
    (ADC1->CR1 & ADC_CR1_JAUTO)                                                \
    :                                                                          \
    (RESET)                                                                    \
  )

Check ADC multimode setting: In case of multimode, check whether ADC master of the selected ADC has feature auto-injection enabled (applicable for devices with several ADCs)

Parameters:
__HANDLE__,:ADC handle
Return values:
None

Definition at line 470 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADC_Start(), HAL_ADC_Start_DMA(), and HAL_ADC_Start_IT().

#define ADC_MULTIMODE_IS_ENABLE (   __HANDLE__)
Value:
(( (((__HANDLE__)->Instance) == ADC1) || (((__HANDLE__)->Instance) == ADC2)   \
  )?                                                                           \
   (ADC1->CR1 & ADC_CR1_DUALMOD)                                               \
   :                                                                           \
   (RESET)                                                                     \
 )

Verification if multimode is enabled for the selected ADC (multimode ADC master or ADC slave) (applicable for devices with several ADCs)

Parameters:
__HANDLE__,:ADC handle
Return values:
Multimodestate: RESET if multimode is disabled, other value if multimode is enabled

Definition at line 434 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADC_Start_DMA().

#define ADC_NONMULTIMODE_OR_MULTIMODEMASTER (   __HANDLE__)
Value:
(( (((__HANDLE__)->Instance) == ADC2)                                        \
   )?                                                                          \
    ((ADC1->CR1 & ADC_CR1_DUALMOD) == RESET)                                   \
    :                                                                          \
    (!RESET)                                                                   \
  )

Verification of condition for ADC start conversion: ADC must be in non-multimode, or multimode with handle of ADC master (applicable for devices with several ADCs)

Parameters:
__HANDLE__,:ADC handle
Return values:
None

Definition at line 452 of file stm32f1xx_hal_adc_ex.h.

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

#define IS_ADC_EXTTRIG (   REGTRIG)
Value:
(((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC1)    || \
                                 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T1_CC2)    || \
                                 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T2_CC2)    || \
                                 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T3_TRGO)   || \
                                 ((REGTRIG) == ADC_EXTERNALTRIGCONV_T4_CC4)    || \
                                 ((REGTRIG) == ADC_EXTERNALTRIGCONV_EXT_IT11)  || \
                                 ((REGTRIG) == ADC_SOFTWARE_START))

Definition at line 522 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADC_Init().

#define IS_ADC_EXTTRIGINJEC (   REGTRIG)
Value:

Definition at line 567 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel().

#define IS_ADC_EXTTRIGINJEC_EDGE (   EDGE)
Value:

Definition at line 510 of file stm32f1xx_hal_adc_ex.h.

#define IS_ADC_INJECTED_RANK (   CHANNEL)
Value:
(((CHANNEL) == ADC_INJECTED_RANK_1) || \
                                       ((CHANNEL) == ADC_INJECTED_RANK_2) || \
                                       ((CHANNEL) == ADC_INJECTED_RANK_3) || \
                                       ((CHANNEL) == ADC_INJECTED_RANK_4))

Definition at line 505 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_InjectedConfigChannel(), and HAL_ADCEx_InjectedGetValue().

#define IS_ADC_MODE (   MODE)
Value:

Definition at line 615 of file stm32f1xx_hal_adc_ex.h.

Referenced by HAL_ADCEx_MultiModeConfigChannel().