Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: adc: sam0: Adjust resolution with the oversampling factor
The old SAM0 adc drivers forces you to put 12 bits when using oversampling. The adc_raw_to_millivolts_dt function is not working properly because if we uses an oversampling of 8, we get 16 bits of resolution. The function uses directly the resolution in the DT, so the voltage will not be correct. To counter this, i forced the user to put the right resolution for his oversampling factor. Fixes: #74607 Signed-off-by: Robin Carrupt <[email protected]>
- Loading branch information