Skip to content

Commit 881c64d

Browse files
soburikartben
authored andcommitted
samples: drivers: adc: Update overlay for arduino_uno_r4
Use the `arduino,uno-adc` mapping to change the settings to make it easier to understand. Add available A4 and A5 pins. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent 84eadd2 commit 881c64d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

samples/drivers/adc/adc_dt/boards/arduino_uno_r4.overlay

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
/ {
88
zephyr,user {
9-
io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 9>;
9+
io-channels = <&arduino_adc 0>, <&arduino_adc 1>, <&arduino_adc 2>,
10+
<&arduino_adc 3>, <&arduino_adc 4>, <&arduino_adc 5>;
1011
};
1112
};
1213

@@ -50,4 +51,22 @@
5051
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
5152
zephyr,vref-mv = <5000>;
5253
};
54+
55+
channel@21 {
56+
reg = <21>;
57+
zephyr,gain = "ADC_GAIN_1";
58+
zephyr,reference = "ADC_REF_VDD_1";
59+
zephyr,resolution = <12>;
60+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
61+
zephyr,vref-mv = <5000>;
62+
};
63+
64+
channel@22 {
65+
reg = <22>;
66+
zephyr,gain = "ADC_GAIN_1";
67+
zephyr,reference = "ADC_REF_VDD_1";
68+
zephyr,resolution = <12>;
69+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
70+
zephyr,vref-mv = <5000>;
71+
};
5372
};

0 commit comments

Comments
 (0)