Skip to content

Commit 137fbfa

Browse files
committed
tests: adc: Adding Infineon AutAnalog ADC driver tests
Adding files to allow running the following tests for the Infineon AutAnalog SAR ADC driver on the PSOC Edge family of MCUs: * tests/drivers/adc/adc_api * tests/drivers/adc/adc_error_cases Signed-off-by: John Batch <[email protected]>
1 parent a0fe7ac commit 137fbfa

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2025 Infineon Technologies AG,
3+
* or an affiliate of Infineon Technologies AG.
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <zephyr/dt-bindings/adc/adc.h>
9+
10+
/ {
11+
zephyr,user {
12+
io-channels = <&adc0 0>, <&adc0 1>;
13+
};
14+
};
15+
16+
&adc0 {
17+
status = "okay";
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
channel@0 {
22+
reg = <0>;
23+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
24+
zephyr,gain = "ADC_GAIN_1";
25+
zephyr,reference = "ADC_REF_INTERNAL";
26+
zephyr,resolution = <12>;
27+
zephyr,input-positive = <0>; /* P10.0 */
28+
};
29+
30+
channel@1 {
31+
reg = <1>;
32+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
33+
zephyr,gain = "ADC_GAIN_1";
34+
zephyr,reference = "ADC_REF_INTERNAL";
35+
zephyr,resolution = <12>;
36+
zephyr,input-positive = <1>; /* P10.1 */
37+
};
38+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Infineon Technologies AG,
3+
* or an affiliate of Infineon Technologies AG.
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <zephyr/dt-bindings/adc/adc.h>
9+
10+
/ {
11+
aliases {
12+
adc = &adc0;
13+
};
14+
};
15+
16+
&adc0 {
17+
status = "okay";
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
channel@0 {
22+
reg = <0>;
23+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
24+
zephyr,gain = "ADC_GAIN_1";
25+
zephyr,reference = "ADC_REF_INTERNAL";
26+
zephyr,resolution = <12>;
27+
zephyr,input-positive = <1>; /* Analog Input 1 */
28+
};
29+
};

0 commit comments

Comments
 (0)