Skip to content

Commit 7d6f106

Browse files
djiatsaf-stkartben
authored andcommitted
samples: drivers: adc: adc_dt: update adc_dt sample
nucleo_C071rb overlay file contains all ADC node configurations to be able to run the sample. Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent 5c1b7d0 commit 7d6f106

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2025 STMicroelectronics
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
/* adjust channel number according to pinmux in board.dts */
10+
io-channels = <&adc1 0>, <&adc1 1>, <&adc1 4>;
11+
};
12+
};
13+
14+
&adc1 {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
18+
channel@0 {
19+
reg = <0>;
20+
zephyr,gain = "ADC_GAIN_1";
21+
zephyr,reference = "ADC_REF_INTERNAL";
22+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
23+
zephyr,resolution = <12>;
24+
};
25+
26+
channel@1 {
27+
reg = <1>;
28+
zephyr,gain = "ADC_GAIN_1";
29+
zephyr,reference = "ADC_REF_INTERNAL";
30+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
31+
zephyr,resolution = <12>;
32+
};
33+
34+
channel@4 {
35+
reg = <4>;
36+
zephyr,gain = "ADC_GAIN_1";
37+
zephyr,reference = "ADC_REF_INTERNAL";
38+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
39+
zephyr,resolution = <12>;
40+
};
41+
};

0 commit comments

Comments
 (0)