HAL
__LL_ADC_CHANNEL_TO_DECIMAL_NB is only used within HAL.
 
Symbols
loading...
Files
loading...
CodeScopeSTM32 Libraries and SamplesHAL__LL_ADC_CHANNEL_TO_DECIMAL_NB

__LL_ADC_CHANNEL_TO_DECIMAL_NB macro

Helper macro to get ADC channel number in decimal format from literals LL_ADC_CHANNEL_x. (1) On STM32F4, parameter available only on ADC instance: ADC1.\n (2) On devices STM32F42x and STM32F43x, limitation: this internal channel is shared between temperature sensor and Vbat, only 1 measurement path must be enabled.

Syntax

#define __LL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) \     (((__CHANNEL__) & ADC_CHANNEL_ID_NUMBER_MASK) >> ADC_CHANNEL_ID_NUMBER_BITOFFSET_POS)

Arguments

Return value

Value between Min_Data=0 and Max_Data=18

Notes

Example: __LL_ADC_CHANNEL_TO_DECIMAL_NB(LL_ADC_CHANNEL_4) will return decimal number "4". The input can be a value from functions where a channel number is returned, either defined with number or with bitfield (only one bit must be set).

References

LocationText
stm32f4xx_ll_adc.h:1153
#define __LL_ADC_CHANNEL_TO_DECIMAL_NB(__CHANNEL__) \