Skip to content
Commit 6a012301 authored by Erwan Gouriou's avatar Erwan Gouriou Committed by Anas Nashif
Browse files

drivers/adc: stm32: Use bitfield for multiple channels detection



For multiple channels detection, channels variable was compared with
the output of find_lsb_set which actually is a decimal number.
Since channel is a bitfield the comparison was not behaving as
expected (detecting several channels while only one channel was used).

Rework the code to use the already existing bitfield "index" for
the test.

Signed-off-by: default avatarErwan Gouriou <erwan.gouriou@linaro.org>
parent c07bb772
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment