Commit e13fe8b
committed
samples: adc_sequence: differential mode handling in ADC conversion
This commit updates the ADC sequence sample to improve handling of
differential mode readings. It modifies the conversion logic to
correctly interpret 16-bit/32-bit signed values and adjusts the
resolution accordingly. This ensures accurate millivolt conversion
for both differential and single-ended configurations.
Signed-off-by: Martin Hoff <[email protected]>1 parent 2125d95 commit e13fe8b
1 file changed
+21
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
98 | 115 | | |
99 | 116 | | |
100 | 117 | | |
101 | | - | |
| 118 | + | |
102 | 119 | | |
103 | 120 | | |
104 | 121 | | |
| |||
0 commit comments