Skip to content
Commit 71e7a77e authored by Lukasz Madej's avatar Lukasz Madej Committed by Alberto Escolar
Browse files

drivers: adc: adc_ad559x: improve adc read



Use information encoded in conversion result value to validate it.
Check if MSB bit is set to zero.
Check if channel number included in the result matches channel
number selected for conversion.
Use bitmask to extract converted value instead of math calculations.

Signed-off-by: default avatarLukasz Madej <l.madej@grinn-global.com>
parent f565f4ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment