samples/drivers/adc: Rework to use channel configurations from DT
Allow specifying configuration of channels through child nodes of ADC controllers. This way analog inputs can be specified for channels in SoCs that require this and it is also possible, for example, to use different gain or reference selections for particular channels. This commit also removes a few former limitations of the sample: now it is possible to use more than 2 channels and each channel can use a different ADC controller. Also the ADC resolution to be used can be specified through devicetree. Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
parent
3e0679f01c
commit
f5ffd05e6b
3 changed files with 143 additions and 97 deletions
|
@ -9,6 +9,7 @@ tests:
|
|||
harness: console
|
||||
timeout: 10
|
||||
harness_config:
|
||||
type: one_line
|
||||
type: multi_line
|
||||
regex:
|
||||
- "ADC reading: (.*)"
|
||||
- "ADC reading:"
|
||||
- " - .+, channel \\d+: \\d+"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue