Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
Macros | |
#define | DT_MBOX_CTLR_BY_NAME(node_id, name) DT_PHANDLE_BY_NAME(node_id, mboxes, name) |
Get the node identifier for the MBOX controller from a mboxes property by name. | |
#define | DT_MBOX_CHANNEL_BY_NAME(node_id, name) DT_PHA_BY_NAME_OR(node_id, mboxes, name, channel, 0) |
Get a MBOX channel value by name. | |
#define DT_MBOX_CHANNEL_BY_NAME | ( | node_id, | |
name | |||
) | DT_PHA_BY_NAME_OR(node_id, mboxes, name, channel, 0) |
#include <include/zephyr/devicetree/mbox.h>
Get a MBOX channel value by name.
Example devicetree fragment:
mbox1: mbox@... { #mbox-cells = <1>; }; n: node { mboxes = <&mbox1 1>, <&mbox1 6>; mbox-names = "tx", "rx"; };
Bindings fragment for the mbox compatible:
mbox-cells: - channel
Example usage:
DT_MBOX_CHANNEL_BY_NAME(DT_NODELABEL(n), tx) // 1 DT_MBOX_CHANNEL_BY_NAME(DT_NODELABEL(n), rx) // 6
node_id | node identifier for a node with a mboxes property |
name | lowercase-and-underscores name of a mboxes element as defined by the node's mbox-names property |
#define DT_MBOX_CTLR_BY_NAME | ( | node_id, | |
name | |||
) | DT_PHANDLE_BY_NAME(node_id, mboxes, name) |
#include <include/zephyr/devicetree/mbox.h>
Get the node identifier for the MBOX controller from a mboxes property by name.
Example devicetree fragment:
mbox1: mbox-controller@... { ... }; n: node { mboxes = <&mbox1 8>, <&mbox1 9>; mbox-names = "tx", "rx"; };
Example usage:
DT_MBOX_CTLR_BY_NAME(DT_NODELABEL(n), tx) // DT_NODELABEL(mbox1) DT_MBOX_CTLR_BY_NAME(DT_NODELABEL(n), rx) // DT_NODELABEL(mbox1)
node_id | node identifier for a node with a mboxes property |
name | lowercase-and-underscores name of a mboxes element as defined by the node's mbox-names property |