File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 149149 (NRF_DT_GPIOS_TO_PSEL(node_id, prop)), \
150150 (default_value))
151151
152+ /**
153+ * @brief Convert a devicetree GPIO phandle+specifier to GPIOTE node.
154+ */
155+ #define NRF_DT_GPIOTE_NODE_BY_IDX (node_id , prop , idx ) \
156+ DT_PHANDLE(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx), gpiote_instance)
157+
158+ /**
159+ * @brief Equivalent to NRF_DT_GPIOTE_NODE_BY_IDX(node_id, prop, 0)
160+ */
161+ #define NRF_DT_GPIOTE_NODE (node_id , prop ) \
162+ NRF_DT_GPIOTE_NODE_BY_IDX(node_id, prop, 0)
163+
152164/**
153165 * @brief Convert a devicetree GPIO phandle+specifier to GPIOTE instance number.
154166 *
185197 * NRF_DT_GPIOTE_INST_BY_IDX(DT_NODELABEL(foo), rx_gpios, 1) // = 20
186198 */
187199#define NRF_DT_GPIOTE_INST_BY_IDX (node_id , prop , idx ) \
188- DT_PROP(DT_PHANDLE(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx), \
189- gpiote_instance), \
190- instance)
200+ DT_PROP(NRF_DT_GPIOTE_NODE_BY_IDX(node_id, prop, idx), instance)
191201
192202/**
193203 * @brief Equivalent to NRF_DT_GPIOTE_INST_BY_IDX(node_id, prop, 0)
You can’t perform that action at this time.
0 commit comments