STM32L443xx HAL User Manual
|
Defines | |
#define | ADC_GET_RESOLUTION(__HANDLE__) (LL_ADC_GetResolution((__HANDLE__)->Instance)) |
Return resolution bits in CFGR register RES[1:0] field. | |
#define | ADC_CLEAR_ERRORCODE(__HANDLE__) ((__HANDLE__)->ErrorCode = HAL_ADC_ERROR_NONE) |
Clear ADC error code (set it to no error code "HAL_ADC_ERROR_NONE"). | |
#define | ADC_IS_ENABLE(__HANDLE__) |
Verification of ADC state: enabled or disabled. | |
#define | ADC_IS_CONVERSION_ONGOING_REGULAR(__HANDLE__) (LL_ADC_REG_IsConversionOngoing((__HANDLE__)->Instance)) |
Check if conversion is on going on regular group. | |
#define | ADC_STATE_CLR_SET MODIFY_REG |
Simultaneously clear and set specific bits of the handle State. | |
#define | IS_ADC_RANGE(__RESOLUTION__, __ADC_VALUE__) ((__ADC_VALUE__) <= __LL_ADC_DIGITAL_SCALE(__RESOLUTION__)) |
Verify that a given value is aligned with the ADC resolution range. | |
#define | IS_ADC_REGULAR_NB_CONV(__LENGTH__) (((__LENGTH__) >= (1UL)) && ((__LENGTH__) <= (16UL))) |
Verify the length of the scheduled regular conversions group. | |
#define | IS_ADC_REGULAR_DISCONT_NUMBER(NUMBER) (((NUMBER) >= (1UL)) && ((NUMBER) <= (8UL))) |
Verify the number of scheduled regular conversions in discontinuous mode. | |
#define | IS_ADC_CLOCKPRESCALER(__ADC_CLOCK__) |
Verify the ADC clock setting. | |
#define | IS_ADC_RESOLUTION(__RESOLUTION__) |
Verify the ADC resolution setting. | |
#define | IS_ADC_RESOLUTION_8_6_BITS(__RESOLUTION__) |
Verify the ADC resolution setting when limited to 6 or 8 bits. | |
#define | IS_ADC_DATA_ALIGN(__ALIGN__) |
Verify the ADC converted data alignment. | |
#define | IS_ADC_SCAN_MODE(__SCAN_MODE__) |
Verify the ADC scan mode. | |
#define | IS_ADC_EXTTRIG_EDGE(__EDGE__) |
Verify the ADC edge trigger setting for regular group. | |
#define | IS_ADC_EXTTRIG(__HANDLE__, __REGTRIG__) |
Verify the ADC regular conversions external trigger. | |
#define | IS_ADC_EOC_SELECTION(__EOC_SELECTION__) |
Verify the ADC regular conversions check for converted data availability. | |
#define | IS_ADC_OVERRUN(__OVR__) |
Verify the ADC regular conversions overrun handling. | |
#define | IS_ADC_SAMPLE_TIME(__TIME__) |
Verify the ADC conversions sampling time. | |
#define | IS_ADC_REGULAR_RANK(__CHANNEL__) |
Verify the ADC regular channel setting. |
#define ADC_CLEAR_ERRORCODE | ( | __HANDLE__ | ) | ((__HANDLE__)->ErrorCode = HAL_ADC_ERROR_NONE) |
Clear ADC error code (set it to no error code "HAL_ADC_ERROR_NONE").
__HANDLE__ | ADC handle |
None |
Definition at line 791 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_DeInit(), HAL_ADC_Init(), HAL_ADC_Start(), HAL_ADC_Start_DMA(), HAL_ADC_Start_IT(), HAL_ADCEx_InjectedStart(), and HAL_ADCEx_InjectedStart_IT().
#define ADC_GET_RESOLUTION | ( | __HANDLE__ | ) | (LL_ADC_GetResolution((__HANDLE__)->Instance)) |
Return resolution bits in CFGR register RES[1:0] field.
__HANDLE__ | ADC handle |
Value | of bitfield RES in CFGR register. |
Definition at line 783 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_AnalogWDGConfig(), HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().
#define ADC_IS_CONVERSION_ONGOING_REGULAR | ( | __HANDLE__ | ) | (LL_ADC_REG_IsConversionOngoing((__HANDLE__)->Instance)) |
Check if conversion is on going on regular group.
__HANDLE__ | ADC handle |
Value | "0" (no conversion is on going) or value "1" (conversion is on going) |
Definition at line 808 of file stm32l4xx_hal_adc.h.
#define ADC_IS_ENABLE | ( | __HANDLE__ | ) |
((((((__HANDLE__)->Instance->CR) & (ADC_CR_ADEN | ADC_CR_ADDIS)) == ADC_CR_ADEN) && \ ((((__HANDLE__)->Instance->ISR) & ADC_FLAG_RDY) == ADC_FLAG_RDY) \ ) ? SET : RESET)
Verification of ADC state: enabled or disabled.
__HANDLE__ | ADC handle |
SET | (ADC enabled) or RESET (ADC disabled) |
Definition at line 798 of file stm32l4xx_hal_adc.h.
#define ADC_STATE_CLR_SET MODIFY_REG |
Simultaneously clear and set specific bits of the handle State.
None |
Definition at line 818 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init(), HAL_ADC_Start(), HAL_ADC_Start_DMA(), HAL_ADC_Start_IT(), HAL_ADC_Stop(), HAL_ADC_Stop_DMA(), HAL_ADC_Stop_IT(), HAL_ADCEx_Calibration_Start(), HAL_ADCEx_InjectedStart(), HAL_ADCEx_InjectedStart_IT(), HAL_ADCEx_InjectedStop(), HAL_ADCEx_InjectedStop_IT(), HAL_ADCEx_RegularStop(), HAL_ADCEx_RegularStop_DMA(), and HAL_ADCEx_RegularStop_IT().
#define IS_ADC_CLOCKPRESCALER | ( | __ADC_CLOCK__ | ) |
(((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV1) || \ ((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV2) || \ ((__ADC_CLOCK__) == ADC_CLOCK_SYNC_PCLK_DIV4) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV1) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV2) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV4) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV6) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV8) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV10) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV12) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV16) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV32) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV64) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV128) || \ ((__ADC_CLOCK__) == ADC_CLOCK_ASYNC_DIV256) )
Verify the ADC clock setting.
__ADC_CLOCK__ | programmed ADC clock. |
SET | (__ADC_CLOCK__ is a valid value) or RESET (__ADC_CLOCK__ is invalid) |
Definition at line 850 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_DATA_ALIGN | ( | __ALIGN__ | ) |
(((__ALIGN__) == ADC_DATAALIGN_RIGHT) || \ ((__ALIGN__) == ADC_DATAALIGN_LEFT) )
Verify the ADC converted data alignment.
__ALIGN__ | programmed ADC converted data alignment. |
SET | (__ALIGN__ is a valid value) or RESET (__ALIGN__ is invalid) |
Definition at line 889 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_EOC_SELECTION | ( | __EOC_SELECTION__ | ) |
(((__EOC_SELECTION__) == ADC_EOC_SINGLE_CONV) || \ ((__EOC_SELECTION__) == ADC_EOC_SEQ_CONV) )
Verify the ADC regular conversions check for converted data availability.
__EOC_SELECTION__ | converted data availability check. |
SET | (__EOC_SELECTION__ is a valid value) or RESET (__EOC_SELECTION__ is invalid) |
Definition at line 939 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init(), and HAL_ADC_IRQHandler().
#define IS_ADC_EXTTRIG | ( | __HANDLE__, | |
__REGTRIG__ | |||
) |
(((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC1) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC2) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_CC3) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T2_CC2) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T3_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T4_CC4) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_EXT_IT11) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T8_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T8_TRGO2) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T1_TRGO2) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T2_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T4_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T6_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T15_TRGO) || \ ((__REGTRIG__) == ADC_EXTERNALTRIG_T3_CC4) || \ ((__REGTRIG__) == ADC_SOFTWARE_START) )
Verify the ADC regular conversions external trigger.
__HANDLE__ | ADC handle |
__REGTRIG__ | programmed ADC regular conversions external trigger. |
SET | (__REGTRIG__ is a valid value) or RESET (__REGTRIG__ is invalid) |
Definition at line 916 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_EXTTRIG_EDGE | ( | __EDGE__ | ) |
(((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_NONE) || \ ((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_RISING) || \ ((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_FALLING) || \ ((__EDGE__) == ADC_EXTERNALTRIGCONVEDGE_RISINGFALLING) )
Verify the ADC edge trigger setting for regular group.
__EDGE__ | programmed ADC edge trigger setting. |
SET | (__EDGE__ is a valid value) or RESET (__EDGE__ is invalid) |
Definition at line 905 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_OVERRUN | ( | __OVR__ | ) |
(((__OVR__) == ADC_OVR_DATA_PRESERVED) || \ ((__OVR__) == ADC_OVR_DATA_OVERWRITTEN) )
Verify the ADC regular conversions overrun handling.
__OVR__ | ADC regular conversions overrun handling. |
SET | (__OVR__ is a valid value) or RESET (__OVR__ is invalid) |
Definition at line 947 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_RANGE | ( | __RESOLUTION__, | |
__ADC_VALUE__ | |||
) | ((__ADC_VALUE__) <= __LL_ADC_DIGITAL_SCALE(__RESOLUTION__)) |
Verify that a given value is aligned with the ADC resolution range.
__RESOLUTION__ | ADC resolution (12, 10, 8 or 6 bits). |
__ADC_VALUE__ | value checked against the resolution. |
SET | (__ADC_VALUE__ in line with __RESOLUTION__) or RESET (__ADC_VALUE__ not in line with __RESOLUTION__) |
Definition at line 826 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_AnalogWDGConfig(), HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().
#define IS_ADC_REGULAR_DISCONT_NUMBER | ( | NUMBER | ) | (((NUMBER) >= (1UL)) && ((NUMBER) <= (8UL))) |
Verify the number of scheduled regular conversions in discontinuous mode.
NUMBER | number of scheduled regular conversions in discontinuous mode. |
SET | (NUMBER is within the maximum number of regular conversions in discontinuous mode) or RESET (NUMBER is null or too large) |
Definition at line 842 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_REGULAR_NB_CONV | ( | __LENGTH__ | ) | (((__LENGTH__) >= (1UL)) && ((__LENGTH__) <= (16UL))) |
Verify the length of the scheduled regular conversions group.
__LENGTH__ | number of programmed conversions. |
SET | (__LENGTH__ is within the maximum number of possible programmable regular conversions) or RESET (__LENGTH__ is null or too large) |
Definition at line 834 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_REGULAR_RANK | ( | __CHANNEL__ | ) |
(((__CHANNEL__) == ADC_REGULAR_RANK_1 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_2 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_3 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_4 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_5 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_6 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_7 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_8 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_9 ) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_10) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_11) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_12) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_13) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_14) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_15) || \ ((__CHANNEL__) == ADC_REGULAR_RANK_16) )
Verify the ADC regular channel setting.
__CHANNEL__ | programmed ADC regular channel. |
SET | (__CHANNEL__ is valid) or RESET (__CHANNEL__ is invalid) |
Definition at line 981 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_ConfigChannel().
#define IS_ADC_RESOLUTION | ( | __RESOLUTION__ | ) |
(((__RESOLUTION__) == ADC_RESOLUTION_12B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_10B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_8B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_6B) )
Verify the ADC resolution setting.
__RESOLUTION__ | programmed ADC resolution. |
SET | (__RESOLUTION__ is a valid value) or RESET (__RESOLUTION__ is invalid) |
Definition at line 871 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().
#define IS_ADC_RESOLUTION_8_6_BITS | ( | __RESOLUTION__ | ) |
(((__RESOLUTION__) == ADC_RESOLUTION_8B) || \ ((__RESOLUTION__) == ADC_RESOLUTION_6B) )
Verify the ADC resolution setting when limited to 6 or 8 bits.
__RESOLUTION__ | programmed ADC resolution when limited to 6 or 8 bits. |
SET | (__RESOLUTION__ is a valid value) or RESET (__RESOLUTION__ is invalid) |
Definition at line 881 of file stm32l4xx_hal_adc.h.
#define IS_ADC_SAMPLE_TIME | ( | __TIME__ | ) |
(((__TIME__) == ADC_SAMPLETIME_2CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_6CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_12CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_24CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_47CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_92CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_247CYCLES_5) || \ ((__TIME__) == ADC_SAMPLETIME_640CYCLES_5) )
Verify the ADC conversions sampling time.
__TIME__ | ADC conversions sampling time. |
SET | (__TIME__ is a valid value) or RESET (__TIME__ is invalid) |
Definition at line 966 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().
#define IS_ADC_SCAN_MODE | ( | __SCAN_MODE__ | ) |
(((__SCAN_MODE__) == ADC_SCAN_DISABLE) || \ ((__SCAN_MODE__) == ADC_SCAN_ENABLE) )
Verify the ADC scan mode.
__SCAN_MODE__ | programmed ADC scan mode. |
SET | (__SCAN_MODE__ is valid) or RESET (__SCAN_MODE__ is invalid) |
Definition at line 897 of file stm32l4xx_hal_adc.h.
Referenced by HAL_ADC_Init().