STM32L443xx HAL User Manual
|
Defines | |
#define | __LL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) |
Helper macro to get ADC channel number in decimal format from literals LL_ADC_CHANNEL_x. | |
#define | __LL_ADC_DECIMAL_NB_TO_CHANNEL(__DECIMAL_NB__) |
Helper macro to get ADC channel in literal format LL_ADC_CHANNEL_x from number in decimal format. | |
#define | __LL_ADC_IS_CHANNEL_INTERNAL(__CHANNEL__) (((__CHANNEL__) & ADC_CHANNEL_ID_INTERNAL_CH_MASK) != 0UL) |
Helper macro to determine whether the selected channel corresponds to literal definitions of driver. | |
#define | __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(__CHANNEL__) ((__CHANNEL__) & ~ADC_CHANNEL_ID_INTERNAL_CH_MASK) |
Helper macro to convert a channel defined from parameter definition of a ADC internal channel (LL_ADC_CHANNEL_VREFINT, LL_ADC_CHANNEL_TEMPSENSOR, ...), to its equivalent parameter definition of a ADC external channel (LL_ADC_CHANNEL_1, LL_ADC_CHANNEL_2, ...). | |
#define | __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE(__ADC_INSTANCE__, __CHANNEL__) |
Helper macro to determine whether the internal channel selected is available on the ADC instance selected. | |
#define | __LL_ADC_ANALOGWD_CHANNEL_GROUP(__CHANNEL__, __GROUP__) |
Helper macro to define ADC analog watchdog parameter: define a single channel to monitor with analog watchdog from sequencer channel and groups definition. | |
#define | __LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTION(__ADC_RESOLUTION__, __AWD_THRESHOLD__) ((__AWD_THRESHOLD__) << ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U ))) |
Helper macro to set the value of ADC analog watchdog threshold high or low in function of ADC resolution, when ADC resolution is different of 12 bits. | |
#define | __LL_ADC_ANALOGWD_GET_THRESHOLD_RESOLUTION(__ADC_RESOLUTION__, __AWD_THRESHOLD_12_BITS__) ((__AWD_THRESHOLD_12_BITS__) >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U ))) |
Helper macro to get the value of ADC analog watchdog threshold high or low in function of ADC resolution, when ADC resolution is different of 12 bits. | |
#define | __LL_ADC_ANALOGWD_THRESHOLDS_HIGH_LOW(__AWD_THRESHOLD_TYPE__, __AWD_THRESHOLDS__) (((__AWD_THRESHOLDS__) >> (((__AWD_THRESHOLD_TYPE__) & ADC_AWD_TRX_BIT_HIGH_MASK) >> ADC_AWD_TRX_BIT_HIGH_SHIFT4)) & LL_ADC_AWD_THRESHOLD_LOW) |
Helper macro to get the ADC analog watchdog threshold high or low from raw value containing both thresholds concatenated. | |
#define | __LL_ADC_CALIB_FACTOR_SINGLE_DIFF(__CALIB_FACTOR_SINGLE_ENDED__, __CALIB_FACTOR_DIFFERENTIAL__) (((__CALIB_FACTOR_DIFFERENTIAL__) << ADC_CALFACT_CALFACT_D_Pos) | (__CALIB_FACTOR_SINGLE_ENDED__)) |
Helper macro to set the ADC calibration value with both single ended and differential modes calibration factors concatenated. | |
#define | __LL_ADC_COMMON_INSTANCE(__ADCx__) (ADC1_COMMON) |
Helper macro to select the ADC common instance to which is belonging the selected ADC instance. | |
#define | __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE(__ADCXY_COMMON__) (LL_ADC_IsEnabled(ADC1)) |
Helper macro to check if all ADC instances sharing the same ADC common instance are disabled. | |
#define | __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) (0xFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) |
Helper macro to define the ADC conversion data full-scale digital value corresponding to the selected ADC resolution. | |
#define | __LL_ADC_CONVERT_DATA_RESOLUTION(__DATA__, __ADC_RESOLUTION_CURRENT__, __ADC_RESOLUTION_TARGET__) |
Helper macro to convert the ADC conversion data from a resolution to another resolution. | |
#define | __LL_ADC_CALC_DATA_TO_VOLTAGE(__VREFANALOG_VOLTAGE__, __ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate the voltage (unit: mVolt) corresponding to a ADC conversion data (unit: digital value). | |
#define | __LL_ADC_CALC_DATA_VOLTAGE() __LL_ADC_CALC_DATA_TO_VOLTAGE() |
#define | __LL_ADC_CALC_VREFANALOG_VOLTAGE(__VREFINT_ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate analog reference voltage (Vref+) (unit: mVolt) from ADC conversion data of internal voltage reference VrefInt. | |
#define | __LL_ADC_CALC_TEMPERATURE(__VREFANALOG_VOLTAGE__, __TEMPSENSOR_ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor. | |
#define | __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS(__TEMPSENSOR_TYP_AVGSLOPE__, __TEMPSENSOR_TYP_CALX_V__, __TEMPSENSOR_CALX_TEMP__, __VREFANALOG_VOLTAGE__, __TEMPSENSOR_ADC_DATA__, __ADC_RESOLUTION__) |
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor. |
#define __LL_ADC_ANALOGWD_CHANNEL_GROUP | ( | __CHANNEL__, | |
__GROUP__ | |||
) |
(((__GROUP__) == LL_ADC_GROUP_REGULAR) \ ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \ : \ ((__GROUP__) == LL_ADC_GROUP_INJECTED) \ ? (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1SGL) \ : \ (((__CHANNEL__) & ADC_CHANNEL_ID_MASK) | ADC_CFGR_JAWD1EN | ADC_CFGR_AWD1EN | ADC_CFGR_AWD1SGL) \ )
Helper macro to define ADC analog watchdog parameter: define a single channel to monitor with analog watchdog from sequencer channel and groups definition.
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). (1, 2, 3, 4) For ADC channel read back from ADC register, comparison with internal channel parameter to be done using helper macro __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(). |
__GROUP__ | This parameter can be one of the following values: |
Definition at line 1917 of file stm32l4xx_ll_adc.h.
Referenced by HAL_ADC_AnalogWDGConfig().
#define __LL_ADC_ANALOGWD_GET_THRESHOLD_RESOLUTION | ( | __ADC_RESOLUTION__, | |
__AWD_THRESHOLD_12_BITS__ | |||
) | ((__AWD_THRESHOLD_12_BITS__) >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U ))) |
Helper macro to get the value of ADC analog watchdog threshold high or low in function of ADC resolution, when ADC resolution is different of 12 bits.
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
__AWD_THRESHOLD_12_BITS__ | Value between Min_Data=0x000 and Max_Data=0xFFF |
Value | between Min_Data=0x000 and Max_Data=0xFFF |
Definition at line 1969 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_ANALOGWD_SET_THRESHOLD_RESOLUTION | ( | __ADC_RESOLUTION__, | |
__AWD_THRESHOLD__ | |||
) | ((__AWD_THRESHOLD__) << ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1U ))) |
Helper macro to set the value of ADC analog watchdog threshold high or low in function of ADC resolution, when ADC resolution is different of 12 bits.
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
__AWD_THRESHOLD__ | Value between Min_Data=0x000 and Max_Data=0xFFF |
Value | between Min_Data=0x000 and Max_Data=0xFFF |
Definition at line 1947 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_ANALOGWD_THRESHOLDS_HIGH_LOW | ( | __AWD_THRESHOLD_TYPE__, | |
__AWD_THRESHOLDS__ | |||
) | (((__AWD_THRESHOLDS__) >> (((__AWD_THRESHOLD_TYPE__) & ADC_AWD_TRX_BIT_HIGH_MASK) >> ADC_AWD_TRX_BIT_HIGH_SHIFT4)) & LL_ADC_AWD_THRESHOLD_LOW) |
Helper macro to get the ADC analog watchdog threshold high or low from raw value containing both thresholds concatenated.
__AWD_THRESHOLD_TYPE__ | This parameter can be one of the following values: |
__AWD_THRESHOLDS__ | Value between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF |
Value | between Min_Data=0x000 and Max_Data=0xFFF |
Definition at line 1984 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CALC_DATA_TO_VOLTAGE | ( | __VREFANALOG_VOLTAGE__, | |
__ADC_DATA__, | |||
__ADC_RESOLUTION__ | |||
) |
((__ADC_DATA__) * (__VREFANALOG_VOLTAGE__) \ / __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__) \ )
Helper macro to calculate the voltage (unit: mVolt) corresponding to a ADC conversion data (unit: digital value).
__VREFANALOG_VOLTAGE__ | Analog reference voltage (unit: mV) |
__ADC_DATA__ | ADC conversion data (resolution 12 bits) (unit: digital value). |
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
ADC | conversion data equivalent voltage value (unit: mVolt) |
Definition at line 2157 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CALC_DATA_VOLTAGE | ( | ) | __LL_ADC_CALC_DATA_TO_VOLTAGE() |
Definition at line 2165 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CALC_TEMPERATURE | ( | __VREFANALOG_VOLTAGE__, | |
__TEMPSENSOR_ADC_DATA__, | |||
__ADC_RESOLUTION__ | |||
) |
(((( ((int32_t)((__LL_ADC_CONVERT_DATA_RESOLUTION((__TEMPSENSOR_ADC_DATA__), \ (__ADC_RESOLUTION__), \ LL_ADC_RESOLUTION_12B) \ * (__VREFANALOG_VOLTAGE__)) \ / TEMPSENSOR_CAL_VREFANALOG) \ - (int32_t) *TEMPSENSOR_CAL1_ADDR) \ ) * (int32_t)(TEMPSENSOR_CAL2_TEMP - TEMPSENSOR_CAL1_TEMP) \ ) / (int32_t)((int32_t)*TEMPSENSOR_CAL2_ADDR - (int32_t)*TEMPSENSOR_CAL1_ADDR) \ ) + TEMPSENSOR_CAL1_TEMP \ )
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor.
__VREFANALOG_VOLTAGE__ | Analog reference voltage (unit: mV) |
__TEMPSENSOR_ADC_DATA__ | ADC conversion data of internal temperature sensor (unit: digital value). |
__ADC_RESOLUTION__ | ADC resolution at which internal temperature sensor voltage has been measured. This parameter can be one of the following values: |
Temperature | (unit: degree Celsius) |
Definition at line 2245 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CALC_TEMPERATURE_TYP_PARAMS | ( | __TEMPSENSOR_TYP_AVGSLOPE__, | |
__TEMPSENSOR_TYP_CALX_V__, | |||
__TEMPSENSOR_CALX_TEMP__, | |||
__VREFANALOG_VOLTAGE__, | |||
__TEMPSENSOR_ADC_DATA__, | |||
__ADC_RESOLUTION__ | |||
) |
(((((int32_t)((((__TEMPSENSOR_ADC_DATA__) * (__VREFANALOG_VOLTAGE__)) \ / __LL_ADC_DIGITAL_SCALE(__ADC_RESOLUTION__)) \ * 1000UL) \ - \ (int32_t)(((__TEMPSENSOR_TYP_CALX_V__)) \ * 1000UL) \ ) \ ) / (int32_t)(__TEMPSENSOR_TYP_AVGSLOPE__) \ ) + (int32_t)(__TEMPSENSOR_CALX_TEMP__) \ )
Helper macro to calculate the temperature (unit: degree Celsius) from ADC conversion data of internal temperature sensor.
__TEMPSENSOR_TYP_AVGSLOPE__ | Device datasheet data: Temperature sensor slope typical value (unit: uV/DegCelsius). On STM32L4, refer to device datasheet parameter "Avg_Slope". |
__TEMPSENSOR_TYP_CALX_V__ | Device datasheet data: Temperature sensor voltage typical value (at temperature and Vref+ defined in parameters below) (unit: mV). On STM32L4, refer to device datasheet parameter "V30" (corresponding to TS_CAL1). |
__TEMPSENSOR_CALX_TEMP__ | Device datasheet data: Temperature at which temperature sensor voltage (see parameter above) is corresponding (unit: mV) |
__VREFANALOG_VOLTAGE__ | Analog voltage reference (Vref+) voltage (unit: mV) |
__TEMPSENSOR_ADC_DATA__ | ADC conversion data of internal temperature sensor (unit: digital value). |
__ADC_RESOLUTION__ | ADC resolution at which internal temperature sensor voltage has been measured. This parameter can be one of the following values: |
Temperature | (unit: degree Celsius) |
Definition at line 2303 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CALC_VREFANALOG_VOLTAGE | ( | __VREFINT_ADC_DATA__, | |
__ADC_RESOLUTION__ | |||
) |
(((uint32_t)(*VREFINT_CAL_ADDR) * VREFINT_CAL_VREF) \ / __LL_ADC_CONVERT_DATA_RESOLUTION((__VREFINT_ADC_DATA__), \ (__ADC_RESOLUTION__), \ LL_ADC_RESOLUTION_12B) \ )
Helper macro to calculate analog reference voltage (Vref+) (unit: mVolt) from ADC conversion data of internal voltage reference VrefInt.
__VREFINT_ADC_DATA__ | ADC conversion data (resolution 12 bits) of internal voltage reference VrefInt (unit: digital value). |
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
Analog | reference voltage (unit: mV) |
Definition at line 2192 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CALIB_FACTOR_SINGLE_DIFF | ( | __CALIB_FACTOR_SINGLE_ENDED__, | |
__CALIB_FACTOR_DIFFERENTIAL__ | |||
) | (((__CALIB_FACTOR_DIFFERENTIAL__) << ADC_CALFACT_CALFACT_D_Pos) | (__CALIB_FACTOR_SINGLE_ENDED__)) |
Helper macro to set the ADC calibration value with both single ended and differential modes calibration factors concatenated.
__CALIB_FACTOR_SINGLE_ENDED__ | Value between Min_Data=0x00 and Max_Data=0x7F |
__CALIB_FACTOR_DIFFERENTIAL__ | Value between Min_Data=0x00 and Max_Data=0x7F |
Value | between Min_Data=0x00000000 and Max_Data=0xFFFFFFFF |
Definition at line 2000 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL | ( | __CHANNEL__ | ) | ((__CHANNEL__) & ~ADC_CHANNEL_ID_INTERNAL_CH_MASK) |
Helper macro to convert a channel defined from parameter definition of a ADC internal channel (LL_ADC_CHANNEL_VREFINT, LL_ADC_CHANNEL_TEMPSENSOR, ...), to its equivalent parameter definition of a ADC external channel (LL_ADC_CHANNEL_1, LL_ADC_CHANNEL_2, ...).
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). |
Definition at line 1672 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_CHANNEL_TO_DECIMAL_NB | ( | __CHANNEL__ | ) |
((((__CHANNEL__) & ADC_CHANNEL_ID_BITFIELD_MASK) == 0UL) ? \ ( \ ((__CHANNEL__) & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS \ ) \ : \ ( \ (uint32_t)POSITION_VAL((__CHANNEL__)) \ ) \ )
Helper macro to get ADC channel number in decimal format from literals LL_ADC_CHANNEL_x.
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). |
Value | between Min_Data=0 and Max_Data=18 |
Definition at line 1464 of file stm32l4xx_ll_adc.h.
Referenced by HAL_ADC_AnalogWDGConfig(), HAL_ADC_ConfigChannel(), HAL_ADCEx_InjectedConfigChannel(), and LL_ADC_GetAnalogWDMonitChannels().
#define __LL_ADC_COMMON_INSTANCE | ( | __ADCx__ | ) | (ADC1_COMMON) |
Helper macro to select the ADC common instance to which is belonging the selected ADC instance.
__ADCx__ | ADC instance |
ADC | common register instance |
Definition at line 2064 of file stm32l4xx_ll_adc.h.
Referenced by HAL_ADC_ConfigChannel(), HAL_ADC_DeInit(), HAL_ADC_Init(), HAL_ADC_IRQHandler(), HAL_ADC_PollForConversion(), HAL_ADC_Start(), HAL_ADC_Start_DMA(), HAL_ADC_Start_IT(), HAL_ADCEx_InjectedConfigChannel(), HAL_ADCEx_InjectedPollForConversion(), HAL_ADCEx_InjectedStart(), and HAL_ADCEx_InjectedStart_IT().
#define __LL_ADC_CONVERT_DATA_RESOLUTION | ( | __DATA__, | |
__ADC_RESOLUTION_CURRENT__, | |||
__ADC_RESOLUTION_TARGET__ | |||
) |
(((__DATA__) \ << ((__ADC_RESOLUTION_CURRENT__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) \ >> ((__ADC_RESOLUTION_TARGET__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL)) \ )
Helper macro to convert the ADC conversion data from a resolution to another resolution.
__DATA__ | ADC conversion data to be converted |
__ADC_RESOLUTION_CURRENT__ | Resolution of the data to be converted This parameter can be one of the following values: |
__ADC_RESOLUTION_TARGET__ | Resolution of the data after conversion This parameter can be one of the following values: |
ADC | conversion data to the requested resolution |
Definition at line 2133 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_DECIMAL_NB_TO_CHANNEL | ( | __DECIMAL_NB__ | ) |
(((__DECIMAL_NB__) <= 9UL) ? \ ( \ ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \ (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \ (ADC_SMPR1_REGOFFSET | (((3UL * (__DECIMAL_NB__))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \ ) \ : \ ( \ ((__DECIMAL_NB__) << ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS) | \ (ADC_AWD2CR_AWD2CH_0 << (__DECIMAL_NB__)) | \ (ADC_SMPR2_REGOFFSET | (((3UL * ((__DECIMAL_NB__) - 10UL))) << ADC_CHANNEL_SMPx_BITOFFSET_POS)) \ ) \ )
Helper macro to get ADC channel in literal format LL_ADC_CHANNEL_x from number in decimal format.
__DECIMAL_NB__ | Value between Min_Data=0 and Max_Data=18 |
Returned | value can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). (1, 2, 3, 4) For ADC channel read back from ADC register, comparison with internal channel parameter to be done using helper macro __LL_ADC_CHANNEL_INTERNAL_TO_EXTERNAL(). |
Definition at line 1524 of file stm32l4xx_ll_adc.h.
Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().
#define __LL_ADC_DIGITAL_SCALE | ( | __ADC_RESOLUTION__ | ) | (0xFFFUL >> ((__ADC_RESOLUTION__) >> (ADC_CFGR_RES_BITOFFSET_POS - 1UL))) |
Helper macro to define the ADC conversion data full-scale digital value corresponding to the selected ADC resolution.
__ADC_RESOLUTION__ | This parameter can be one of the following values: |
ADC | conversion data full-scale digital value (unit: digital value of ADC conversion data) |
Definition at line 2112 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_IS_CHANNEL_INTERNAL | ( | __CHANNEL__ | ) | (((__CHANNEL__) & ADC_CHANNEL_ID_INTERNAL_CH_MASK) != 0UL) |
Helper macro to determine whether the selected channel corresponds to literal definitions of driver.
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. (7) On STM32L4, fast channel (0.188 us for 12-bit resolution (ADC conversion rate up to 5.33 Ms/s)). Other channels are slow channels (0.238 us for 12-bit resolution (ADC conversion rate up to 4.21 Ms/s)). |
Value | "0" if the channel corresponds to a parameter definition of a ADC external channel (channel connected to a GPIO pin). Value "1" if the channel corresponds to a parameter definition of a ADC internal channel. |
Definition at line 1597 of file stm32l4xx_ll_adc.h.
Referenced by HAL_ADC_ConfigChannel(), and HAL_ADCEx_InjectedConfigChannel().
#define __LL_ADC_IS_CHANNEL_INTERNAL_AVAILABLE | ( | __ADC_INSTANCE__, | |
__CHANNEL__ | |||
) |
( \ ((__CHANNEL__) == LL_ADC_CHANNEL_VREFINT) || \ ((__CHANNEL__) == LL_ADC_CHANNEL_TEMPSENSOR) || \ ((__CHANNEL__) == LL_ADC_CHANNEL_VBAT) || \ ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH1) || \ ((__CHANNEL__) == LL_ADC_CHANNEL_DAC1CH2) \ )
Helper macro to determine whether the internal channel selected is available on the ADC instance selected.
__ADC_INSTANCE__ | ADC instance |
__CHANNEL__ | This parameter can be one of the following values:
(2) On STM32L4, parameter available only on ADC instance: ADC2. (3) On STM32L4, parameter available only on ADC instance: ADC3. (4) On STM32L4, parameter available only on ADC instances: ADC1, ADC3. (5) On STM32L4, parameter available on devices with only 1 ADC instance. (6) On STM32L4, parameter available on devices with several ADC instances. |
Value | "0" if the internal channel selected is not available on the ADC instance selected. Value "1" if the internal channel selected is available on the ADC instance selected. |
Definition at line 1755 of file stm32l4xx_ll_adc.h.
#define __LL_ADC_IS_ENABLED_ALL_COMMON_INSTANCE | ( | __ADCXY_COMMON__ | ) | (LL_ADC_IsEnabled(ADC1)) |
Helper macro to check if all ADC instances sharing the same ADC common instance are disabled.
__ADCXY_COMMON__ | ADC common instance (can be set directly from CMSIS definition or by using helper macro __LL_ADC_COMMON_INSTANCE() ) |
Value | "0" if all ADC instances sharing the same ADC common instance are disabled. Value "1" if at least one ADC instance sharing the same ADC common instance is enabled. |
Definition at line 2095 of file stm32l4xx_ll_adc.h.
Referenced by HAL_ADC_DeInit(), HAL_ADC_Init(), and LL_ADC_CommonInit().