samples: drivers: adc: add ADC example
This sample shows how to use the ADC API. Depending on the support of sequential reads in the driver, 1 or 2 channels are read and printed. A devicetree overlay is necessary to specify the used ADC channel(s). Signed-off-by: Martin Jäger <martin@libre.solar>
This commit is contained in:
parent
3c7b2771b1
commit
0520ec814b
6 changed files with 216 additions and 0 deletions
12
samples/drivers/adc/sample.yaml
Normal file
12
samples/drivers/adc/sample.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
sample:
|
||||
name: ADC driver sample
|
||||
tests:
|
||||
sample.drivers.adc:
|
||||
tags: ADC
|
||||
depends_on: adc
|
||||
platform_allow: nucleo_l073rz
|
||||
harness: console
|
||||
harness_config:
|
||||
type: single_line
|
||||
regex:
|
||||
- "ADC reading(s): (.*)"
|
Loading…
Add table
Add a link
Reference in a new issue