We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1e0bac commit 50b267fCopy full SHA for 50b267f
soc/arm/nordic_nrf/soc_nrf_common.h
@@ -130,6 +130,18 @@
130
(DT_GPIO_PIN(node_id, prop) + \
131
(DT_PROP_BY_PHANDLE(node_id, prop, port) << 5))
132
133
+/**
134
+ * If the node has the property, expands to
135
+ * NRF_DT_GPIOS_TO_PSEL(node_id, prop). The default_value argument is
136
+ * not expanded in this case.
137
+ *
138
+ * Otherwise, expands to default_value.
139
+ */
140
+#define NRF_DT_GPIOS_TO_PSEL_OR(node_id, prop, default_value) \
141
+ COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
142
+ (NRF_DT_GPIOS_TO_PSEL(node_id, prop)), \
143
+ (default_value))
144
+
145
/**
146
* Error out the build if 'prop' is set on node 'node_id' and
147
* DT_GPIO_CTLR(node_id, prop) is not an SoC GPIO controller,
0 commit comments