Browse Source
A valid device tree configuration is provided for the ADCs of the 8 input channels and the sample adc_dt works out of the box. Obviously this is not the only possible configuration but it provides a good template for further customization without the need to lookup the ADC GPIOs and connections in the schematics. Signed-off-by: Federico Di Gregorio <fog@dndg.it>pull/81690/head
2 changed files with 130 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2021 STMicroelectronics |
||||||
|
* Copyright (c) 2024 DNDG srl |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
/ { |
||||||
|
zephyr,user { |
||||||
|
io-channels = |
||||||
|
<&adc1 0>, /* I1 */ |
||||||
|
<&adc3 0>, /* I2 */ |
||||||
|
<&adc1 6>, /* I3 */ |
||||||
|
<&adc2 9>, /* I4 */ |
||||||
|
<&adc3 6>, /* I5 */ |
||||||
|
<&adc3 7>, /* I6 */ |
||||||
|
<&adc3 8>, /* I7 */ |
||||||
|
<&adc3 9>; /* I8 */ |
||||||
|
}; |
||||||
|
}; |
||||||
|
|
||||||
|
&adc1 { |
||||||
|
status ="okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&adc2 { |
||||||
|
status ="okay"; |
||||||
|
}; |
||||||
|
|
||||||
|
&adc3 { |
||||||
|
status = "okay"; |
||||||
|
}; |
Loading…
Reference in new issue