Commit 0769170
committed
[nrf fromtree] drivers: adc: nrfx: enable negative values for single-ended ADC readings
The ADC driver API already supports ADC readings which can return signed
values, these are differential readings. In Nordic's datasheet, we have
a mode called "single ended", but its just a name. "Single ended" is a
differential reading, with the negative channel tied to GND. This is not
compatible with zephyrs definition of a single ended reading.
To support Nordic's "single ended" mode, the user must configure
a differential reading, with the negative input tied to ground, which
the saadc driver can then use to configure the reading as Nordic SAADC
"single ended", and return negative values as expected.
(cherry picked from commit 138f977)
Signed-off-by: Jakub Zymelka <[email protected]>1 parent b5bbe12 commit 0769170
File tree
2 files changed
+57
-13
lines changed- drivers/adc
- include/zephyr/dt-bindings/adc
2 files changed
+57
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
194 | | - | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
208 | | - | |
209 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
| |||
356 | 359 | | |
357 | 360 | | |
358 | 361 | | |
359 | | - | |
360 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
361 | 370 | | |
362 | 371 | | |
363 | 372 | | |
| 373 | + | |
364 | 374 | | |
365 | 375 | | |
366 | 376 | | |
| |||
539 | 549 | | |
540 | 550 | | |
541 | 551 | | |
| 552 | + | |
| 553 | + | |
542 | 554 | | |
543 | 555 | | |
544 | | - | |
545 | | - | |
546 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
547 | 565 | | |
548 | 566 | | |
549 | 567 | | |
550 | | - | |
551 | 568 | | |
552 | 569 | | |
553 | 570 | | |
554 | 571 | | |
555 | | - | |
556 | | - | |
557 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
558 | 578 | | |
559 | 579 | | |
560 | 580 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
10 | 34 | | |
11 | 35 | | |
12 | 36 | | |
| |||
0 commit comments