Browse Source

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 <fabrice.djiatsa-ext@st.com>
pull/85291/head
Fabrice DJIATSA 6 months ago committed by Benjamin Cabé
parent
commit
7d6f1067e2
  1. 41
      samples/drivers/adc/adc_dt/boards/nucleo_c071rb.overlay

41
samples/drivers/adc/adc_dt/boards/nucleo_c071rb.overlay

@ -0,0 +1,41 @@ @@ -0,0 +1,41 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2025 STMicroelectronics
*/
/ {
zephyr,user {
/* adjust channel number according to pinmux in board.dts */
io-channels = <&adc1 0>, <&adc1 1>, <&adc1 4>;
};
};
&adc1 {
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
channel@4 {
reg = <4>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};
Loading…
Cancel
Save