Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Macros | |
#define | DT_DEP_ORD(node_id) DT_CAT(node_id, _ORD) |
Get a node's dependency ordinal. | |
#define | DT_DEP_ORD_STR_SORTABLE(node_id) DT_CAT(node_id, _ORD_STR_SORTABLE) |
Get a node's dependency ordinal in string sortable form. | |
#define | DT_REQUIRES_DEP_ORDS(node_id) DT_CAT(node_id, _REQUIRES_ORDS) |
Get a list of dependency ordinals of a node's direct dependencies. | |
#define | DT_SUPPORTS_DEP_ORDS(node_id) DT_CAT(node_id, _SUPPORTS_ORDS) |
Get a list of dependency ordinals of what depends directly on a node. | |
#define | DT_INST_DEP_ORD(inst) DT_DEP_ORD(DT_DRV_INST(inst)) |
Get a DT_DRV_COMPAT instance's dependency ordinal. | |
#define | DT_INST_REQUIRES_DEP_ORDS(inst) DT_REQUIRES_DEP_ORDS(DT_DRV_INST(inst)) |
Get a list of dependency ordinals of a DT_DRV_COMPAT instance's direct dependencies. | |
#define | DT_INST_SUPPORTS_DEP_ORDS(inst) DT_SUPPORTS_DEP_ORDS(DT_DRV_INST(inst)) |
Get a list of dependency ordinals of what depends directly on a DT_DRV_COMPAT instance. | |
#define DT_DEP_ORD | ( | node_id | ) | DT_CAT(node_id, _ORD) |
#include <include/zephyr/devicetree/ordinals.h>
Get a node's dependency ordinal.
node_id | Node identifier |
#define DT_DEP_ORD_STR_SORTABLE | ( | node_id | ) | DT_CAT(node_id, _ORD_STR_SORTABLE) |
#include <include/zephyr/devicetree/ordinals.h>
Get a node's dependency ordinal in string sortable form.
node_id | Node identifier |
#define DT_INST_DEP_ORD | ( | inst | ) | DT_DEP_ORD(DT_DRV_INST(inst)) |
#include <include/zephyr/devicetree/ordinals.h>
Get a DT_DRV_COMPAT instance's dependency ordinal.
Equivalent to DT_DEP_ORD(DT_DRV_INST(inst)).
inst | instance number |
#define DT_INST_REQUIRES_DEP_ORDS | ( | inst | ) | DT_REQUIRES_DEP_ORDS(DT_DRV_INST(inst)) |
#include <include/zephyr/devicetree/ordinals.h>
Get a list of dependency ordinals of a DT_DRV_COMPAT instance's direct dependencies.
Equivalent to DT_REQUIRES_DEP_ORDS(DT_DRV_INST(inst)).
inst | instance number |
#define DT_INST_SUPPORTS_DEP_ORDS | ( | inst | ) | DT_SUPPORTS_DEP_ORDS(DT_DRV_INST(inst)) |
#include <include/zephyr/devicetree/ordinals.h>
Get a list of dependency ordinals of what depends directly on a DT_DRV_COMPAT instance.
Equivalent to DT_SUPPORTS_DEP_ORDS(DT_DRV_INST(inst)).
inst | instance number |
#define DT_REQUIRES_DEP_ORDS | ( | node_id | ) | DT_CAT(node_id, _REQUIRES_ORDS) |
#include <include/zephyr/devicetree/ordinals.h>
Get a list of dependency ordinals of a node's direct dependencies.
There is a comma after each ordinal in the expansion, including the last one:
DT_REQUIRES_DEP_ORDS(my_node) // required_ord_1, ..., required_ord_n,
The one case DT_REQUIRES_DEP_ORDS() expands to nothing is when given the root node identifier DT_ROOT
as argument. The root has no direct dependencies; every other node at least depends on its parent.
node_id | Node identifier |
,
), or an empty expansion #define DT_SUPPORTS_DEP_ORDS | ( | node_id | ) | DT_CAT(node_id, _SUPPORTS_ORDS) |
#include <include/zephyr/devicetree/ordinals.h>
Get a list of dependency ordinals of what depends directly on a node.
There is a comma after each ordinal in the expansion, including the last one:
DT_SUPPORTS_DEP_ORDS(my_node) // supported_ord_1, ..., supported_ord_n,
DT_SUPPORTS_DEP_ORDS() may expand to nothing. This happens when node_id
refers to a leaf node that nothing else depends on.
node_id | Node identifier |
,
), or an empty expansion