Skip to content

Commit c353bca

Browse files
smalaeasmellby
authored andcommitted
drivers: adc: siwx91x: Return raw ADC value
Instead of returning a converted ADC reading, return the raw ADC sample. Conversion is left to the user based on the selected ADC mode (single-ended or differential). Signed-off-by: Sai Santhosh Malae <[email protected]> (cherry picked from commit 78f47a3) Upstream-status: available
1 parent 2b94d6f commit c353bca

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/adc/adc_silabs_siwx91x.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,6 @@ int16_t adc_siwx91x_read_data(const struct device *dev)
333333
adc_temp = 0;
334334
}
335335

336-
if (adc_temp >= 2048) {
337-
adc_temp = adc_temp - 2048;
338-
} else {
339-
adc_temp = adc_temp + 2048;
340-
}
341-
342336
return adc_temp;
343337
}
344338

0 commit comments

Comments
 (0)