 |
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
13#ifndef ZEPHYR_INCLUDE_DEVICETREE_PORT_ENDPOINT_H_
14#define ZEPHYR_INCLUDE_DEVICETREE_PORT_ENDPOINT_H_
36#define _DT_INST_PORT_BY_ID(inst, pid) \
37 COND_CODE_1(DT_NODE_EXISTS(DT_INST_CHILD(inst, ports)), \
38 (DT_CHILD(DT_INST_CHILD(inst, ports), port_##pid)), (DT_INST_CHILD(inst, port_##pid)))
87#define DT_INST_PORT_BY_ID(inst, pid) \
88 COND_CODE_1(DT_NODE_EXISTS(_DT_INST_PORT_BY_ID(inst, pid)), \
89 (_DT_INST_PORT_BY_ID(inst, pid)), (DT_INST_CHILD(inst, port)))
102#define _DT_INST_ENDPOINT_BY_ID(inst, pid, eid) \
103 DT_CHILD(DT_INST_PORT_BY_ID(inst, pid), endpoint_##eid)
163#define DT_INST_ENDPOINT_BY_ID(inst, pid, eid) \
164 COND_CODE_1(DT_NODE_EXISTS(_DT_INST_ENDPOINT_BY_ID(inst, pid, eid)), \
165 (_DT_INST_ENDPOINT_BY_ID(inst, pid, eid)), \
166 (DT_CHILD(DT_INST_PORT_BY_ID(inst, pid), endpoint)))
215#define DT_NODE_BY_ENDPOINT(ep) \
216 COND_CODE_1(DT_NODE_EXISTS(DT_CHILD(DT_PARENT(DT_GPARENT(ep)), ports)), \
217 (DT_PARENT(DT_GPARENT(ep))), (DT_GPARENT(ep)))
264#define DT_NODE_REMOTE_DEVICE(ep) \
265 DT_NODE_BY_ENDPOINT(DT_NODELABEL(DT_STRING_TOKEN(ep, remote_endpoint_label)))