Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
Macros | |
#define | DT_INST_PORT_BY_ID(inst, pid) |
Get a port node from its id. | |
#define | DT_INST_ENDPOINT_BY_ID(inst, pid, eid) |
Get an endpoint node from its id and its parent port id. | |
#define | DT_NODE_BY_ENDPOINT(ep) |
Get the device node from its endpoint node. | |
#define | DT_NODE_REMOTE_DEVICE(ep) |
Get the remote device node from a local endpoint node. | |
#define DT_INST_ENDPOINT_BY_ID | ( | inst, | |
pid, | |||
eid ) |
#include <zephyr/devicetree/port-endpoint.h>
Get an endpoint node from its id and its parent port id.
Given a device instance number, a port ID and an endpoint ID, return the endpoint node. It handles various ways of how a port and an endpoint could be defined as described in DT_INST_PORT_BY_ID and below.
Example usage with DT_INST_ENDPOINT_BY_ID() to get the endpoint
or endpoint@0
node:
Example devicetree fragment:
inst | instance number |
pid | port ID |
eid | endpoint ID |
eid
and pid
#define DT_INST_PORT_BY_ID | ( | inst, | |
pid ) |
#include <zephyr/devicetree/port-endpoint.h>
Get a port node from its id.
Given a device instance number, return a port node specified by its ID. It handles various ways of how a port could be defined.
Example usage with DT_INST_PORT_BY_ID() to get the port@0
or port
node:
Example devicetree fragment:
inst | instance number |
pid | port ID |
pid
#define DT_NODE_BY_ENDPOINT | ( | ep | ) |
#include <zephyr/devicetree/port-endpoint.h>
Get the device node from its endpoint node.
Given an endpoint node id, return its device node id. This handles various ways of how a port and an endpoint could be defined as described in DT_NODE_BY_ENDPOINT.
Example usage with DT_NODE_BY_ENDPOINT() to get the &device
node from its ep0
node:
Example devicetree fragment:
ep | endpoint node |
ep
#define DT_NODE_REMOTE_DEVICE | ( | ep | ) |
#include <zephyr/devicetree/port-endpoint.h>
Get the remote device node from a local endpoint node.
Given an endpoint node id, return the remote device node that connects to this device via this local endpoint. This handles various ways of how a port and an endpoint could be defined as described in DT_INST_PORT_BY_ID and DT_INST_ENDPOINT_BY_ID.
Example usage with DT_NODE_REMOTE_DEVICE() to get the remote device node &device1
from the local endpoint endpoint@0
node of the device &device0
node:
Example devicetree fragment:
ep | endpoint node |
ep