__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.
#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).