File tree Expand file tree Collapse file tree 3 files changed +31
-42
lines changed
include/zephyr/dt-bindings/comparator Expand file tree Collapse file tree 3 files changed +31
-42
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ description: |
25
25
&comp {
26
26
status = "okay";
27
27
main-mode = "SE";
28
- psel = "AIN0" ;
28
+ psel = <NRF_COMP_AIN0> ;
29
29
refsel = "INT_1V2";
30
30
sp-mode = "NORMAL";
31
31
th-up = <36>;
@@ -39,7 +39,7 @@ description: |
39
39
&comp {
40
40
...
41
41
refsel = "AREF";
42
- extrefsel = "AIN1" ;
42
+ extrefsel = <NRF_COMP_AIN1> ;
43
43
...
44
44
};
45
45
@@ -49,8 +49,8 @@ description: |
49
49
&comp {
50
50
status = "okay";
51
51
main-mode = "DIFF";
52
- psel = "AIN0" ;
53
- extrefsel = "AIN1" ;
52
+ psel = <NRF_COMP_AIN0> ;
53
+ extrefsel = <NRF_COMP_AIN1> ;
54
54
sp-mode = "NORMAL";
55
55
enable-hyst;
56
56
isource = "DISABLED";
@@ -68,30 +68,10 @@ properties:
68
68
- " DIFF"
69
69
70
70
psel :
71
- type : string
72
- enum :
73
- - " AIN0"
74
- - " AIN1"
75
- - " AIN2"
76
- - " AIN3"
77
- - " AIN4"
78
- - " AIN5"
79
- - " AIN6"
80
- - " AIN7"
81
- - " VDD_DIV2"
82
- - " VDDH_DIV5"
71
+ type : int
83
72
84
73
extrefsel :
85
- type : string
86
- enum :
87
- - " AIN0"
88
- - " AIN1"
89
- - " AIN2"
90
- - " AIN3"
91
- - " AIN4"
92
- - " AIN5"
93
- - " AIN6"
94
- - " AIN7"
74
+ type : int
95
75
96
76
refsel :
97
77
type : string
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ description: |
21
21
22
22
&comp {
23
23
status = "okay";
24
- psel = "AIN0" ;
24
+ psel = <NRF_COMP_AIN0> ;
25
25
refsel = "VDD_4_8";
26
26
enable-hyst;
27
27
};
@@ -32,7 +32,7 @@ description: |
32
32
&comp {
33
33
...
34
34
refsel = "AREF";
35
- extrefsel = "AIN1" ;
35
+ extrefsel = <NRF_COMP_AIN1> ;
36
36
...
37
37
};
38
38
@@ -42,22 +42,10 @@ include: base.yaml
42
42
43
43
properties :
44
44
psel :
45
- type : string
46
- enum :
47
- - " AIN0"
48
- - " AIN1"
49
- - " AIN2"
50
- - " AIN3"
51
- - " AIN4"
52
- - " AIN5"
53
- - " AIN6"
54
- - " AIN7"
45
+ type : int
55
46
56
47
extrefsel :
57
- type : string
58
- enum :
59
- - " AIN0"
60
- - " AIN1"
48
+ type : int
61
49
62
50
refsel :
63
51
type : string
Original file line number Diff line number Diff line change
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * Copyright (c) 2025 Nordic Semiconductor ASA
5
+ */
6
+
7
+ #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_COMP_H_
8
+ #define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_COMP_H_
9
+
10
+ #define NRF_COMP_AIN0 0 /** AIN0 external input */
11
+ #define NRF_COMP_AIN1 1 /** AIN1 external input */
12
+ #define NRF_COMP_AIN2 2 /** AIN2 external input */
13
+ #define NRF_COMP_AIN3 3 /** AIN3 external input */
14
+ #define NRF_COMP_AIN4 4 /** AIN4 external input */
15
+ #define NRF_COMP_AIN5 5 /** AIN5 external input */
16
+ #define NRF_COMP_AIN6 6 /** AIN6 external input */
17
+ #define NRF_COMP_AIN7 7 /** AIN7 external input */
18
+ #define NRF_COMP_AIN_VDD_DIV2 8 /** VDD / 2 */
19
+ #define NRF_COMP_AIN_VDDH_DIV5 9 /** VDDH / 5 */
20
+
21
+ #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_COMP_H_ */
You can’t perform that action at this time.
0 commit comments