Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Macros | |
#define | DT_RESET_CTLR_BY_IDX(node_id, idx) DT_PHANDLE_BY_IDX(node_id, resets, idx) |
Get the node identifier for the controller phandle from a "resets" phandle-array property at an index. | |
#define | DT_RESET_CTLR(node_id) DT_RESET_CTLR_BY_IDX(node_id, 0) |
Equivalent to DT_RESET_CTLR_BY_IDX(node_id, 0) | |
#define | DT_RESET_CTLR_BY_NAME(node_id, name) DT_PHANDLE_BY_NAME(node_id, resets, name) |
Get the node identifier for the controller phandle from a resets phandle-array property by name. | |
#define | DT_RESET_CELL_BY_IDX(node_id, idx, cell) DT_PHA_BY_IDX(node_id, resets, idx, cell) |
Get a reset specifier's cell value at an index. | |
#define | DT_RESET_CELL_BY_NAME(node_id, name, cell) DT_PHA_BY_NAME(node_id, resets, name, cell) |
Get a reset specifier's cell value by name. | |
#define | DT_RESET_CELL(node_id, cell) DT_RESET_CELL_BY_IDX(node_id, 0, cell) |
Equivalent to DT_RESET_CELL_BY_IDX(node_id, 0, cell) | |
#define | DT_INST_RESET_CTLR_BY_IDX(inst, idx) DT_RESET_CTLR_BY_IDX(DT_DRV_INST(inst), idx) |
Get the node identifier for the controller phandle from a "resets" phandle-array property at an index. | |
#define | DT_INST_RESET_CTLR(inst) DT_INST_RESET_CTLR_BY_IDX(inst, 0) |
Equivalent to DT_INST_RESET_CTLR_BY_IDX(inst, 0) | |
#define | DT_INST_RESET_CTLR_BY_NAME(inst, name) DT_RESET_CTLR_BY_NAME(DT_DRV_INST(inst), name) |
Get the node identifier for the controller phandle from a resets phandle-array property by name. | |
#define | DT_INST_RESET_CELL_BY_IDX(inst, idx, cell) DT_RESET_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell) |
Get a DT_DRV_COMPAT instance's reset specifier's cell value at an index. | |
#define | DT_INST_RESET_CELL_BY_NAME(inst, name, cell) DT_RESET_CELL_BY_NAME(DT_DRV_INST(inst), name, cell) |
Get a DT_DRV_COMPAT instance's reset specifier's cell value by name. | |
#define | DT_INST_RESET_CELL(inst, cell) DT_INST_RESET_CELL_BY_IDX(inst, 0, cell) |
Equivalent to DT_INST_RESET_CELL_BY_IDX(inst, 0, cell) | |
#define | DT_RESET_ID_BY_IDX(node_id, idx) DT_PHA_BY_IDX(node_id, resets, idx, id) |
Get a Reset Controller specifier's id cell at an index. | |
#define | DT_RESET_ID(node_id) DT_RESET_ID_BY_IDX(node_id, 0) |
Equivalent to DT_RESET_ID_BY_IDX(node_id, 0) | |
#define | DT_INST_RESET_ID_BY_IDX(inst, idx) DT_RESET_ID_BY_IDX(DT_DRV_INST(inst), idx) |
Get a DT_DRV_COMPAT instance's Reset Controller specifier's id cell value at an index. | |
#define | DT_INST_RESET_ID(inst) DT_INST_RESET_ID_BY_IDX(inst, 0) |
Equivalent to DT_INST_RESET_ID_BY_IDX(inst, 0) | |
#define DT_INST_RESET_CELL | ( | inst, | |
cell | |||
) | DT_INST_RESET_CELL_BY_IDX(inst, 0, cell) |
#include <zephyr/devicetree/reset.h>
Equivalent to DT_INST_RESET_CELL_BY_IDX(inst, 0, cell)
inst | DT_DRV_COMPAT instance number |
cell | lowercase-and-underscores cell name |
#define DT_INST_RESET_CELL_BY_IDX | ( | inst, | |
idx, | |||
cell | |||
) | DT_RESET_CELL_BY_IDX(DT_DRV_INST(inst), idx, cell) |
#include <zephyr/devicetree/reset.h>
Get a DT_DRV_COMPAT instance's reset specifier's cell value at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into resets property |
cell | lowercase-and-underscores cell name |
#define DT_INST_RESET_CELL_BY_NAME | ( | inst, | |
name, | |||
cell | |||
) | DT_RESET_CELL_BY_NAME(DT_DRV_INST(inst), name, cell) |
#include <zephyr/devicetree/reset.h>
Get a DT_DRV_COMPAT instance's reset specifier's cell value by name.
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of a resets element as defined by the node's reset-names property |
cell | lowercase-and-underscores cell name |
#define DT_INST_RESET_CTLR | ( | inst | ) | DT_INST_RESET_CTLR_BY_IDX(inst, 0) |
#include <zephyr/devicetree/reset.h>
Equivalent to DT_INST_RESET_CTLR_BY_IDX(inst, 0)
inst | instance number |
#define DT_INST_RESET_CTLR_BY_IDX | ( | inst, | |
idx | |||
) | DT_RESET_CTLR_BY_IDX(DT_DRV_INST(inst), idx) |
#include <zephyr/devicetree/reset.h>
Get the node identifier for the controller phandle from a "resets" phandle-array property at an index.
inst | instance number |
idx | logical index into "resets" |
#define DT_INST_RESET_CTLR_BY_NAME | ( | inst, | |
name | |||
) | DT_RESET_CTLR_BY_NAME(DT_DRV_INST(inst), name) |
#include <zephyr/devicetree/reset.h>
Get the node identifier for the controller phandle from a resets phandle-array property by name.
inst | instance number |
name | lowercase-and-underscores name of a resets element as defined by the node's reset-names property |
#define DT_INST_RESET_ID | ( | inst | ) | DT_INST_RESET_ID_BY_IDX(inst, 0) |
#include <zephyr/devicetree/reset.h>
Equivalent to DT_INST_RESET_ID_BY_IDX(inst, 0)
inst | DT_DRV_COMPAT instance number |
#define DT_INST_RESET_ID_BY_IDX | ( | inst, | |
idx | |||
) | DT_RESET_ID_BY_IDX(DT_DRV_INST(inst), idx) |
#include <zephyr/devicetree/reset.h>
Get a DT_DRV_COMPAT instance's Reset Controller specifier's id cell value at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into "resets" |
#define DT_RESET_CELL | ( | node_id, | |
cell | |||
) | DT_RESET_CELL_BY_IDX(node_id, 0, cell) |
#include <zephyr/devicetree/reset.h>
Equivalent to DT_RESET_CELL_BY_IDX(node_id, 0, cell)
node_id | node identifier for a node with a resets property |
cell | lowercase-and-underscores cell name |
#define DT_RESET_CELL_BY_IDX | ( | node_id, | |
idx, | |||
cell | |||
) | DT_PHA_BY_IDX(node_id, resets, idx, cell) |
#include <zephyr/devicetree/reset.h>
Get a reset specifier's cell value at an index.
Example devicetree fragment:
reset: reset-controller@... { compatible = "vnd,reset"; #reset-cells = <1>; }; n: node { resets = <&reset 10>; };
Bindings fragment for the vnd,reset compatible:
reset-cells: - id
Example usage:
DT_RESET_CELL_BY_IDX(DT_NODELABEL(n), 0, id) // 10
node_id | node identifier for a node with a resets property |
idx | logical index into resets property |
cell | lowercase-and-underscores cell name |
#define DT_RESET_CELL_BY_NAME | ( | node_id, | |
name, | |||
cell | |||
) | DT_PHA_BY_NAME(node_id, resets, name, cell) |
#include <zephyr/devicetree/reset.h>
Get a reset specifier's cell value by name.
Example devicetree fragment:
reset: reset-controller@... { compatible = "vnd,reset"; #reset-cells = <1>; }; n: node { resets = <&reset 10>; reset-names = "alpha"; };
Bindings fragment for the vnd,reset compatible:
reset-cells: - id
Example usage:
DT_RESET_CELL_BY_NAME(DT_NODELABEL(n), alpha, id) // 10
node_id | node identifier for a node with a resets property |
name | lowercase-and-underscores name of a resets element as defined by the node's reset-names property |
cell | lowercase-and-underscores cell name |
#define DT_RESET_CTLR | ( | node_id | ) | DT_RESET_CTLR_BY_IDX(node_id, 0) |
#include <zephyr/devicetree/reset.h>
Equivalent to DT_RESET_CTLR_BY_IDX(node_id, 0)
node_id | node identifier |
#define DT_RESET_CTLR_BY_IDX | ( | node_id, | |
idx | |||
) | DT_PHANDLE_BY_IDX(node_id, resets, idx) |
#include <zephyr/devicetree/reset.h>
Get the node identifier for the controller phandle from a "resets" phandle-array property at an index.
Example devicetree fragment:
reset1: reset-controller@... { ... }; reset2: reset-controller@... { ... }; n: node { resets = <&reset1 10>, <&reset2 20>; };
Example usage:
DT_RESET_CTLR_BY_IDX(DT_NODELABEL(n), 0)) // DT_NODELABEL(reset1) DT_RESET_CTLR_BY_IDX(DT_NODELABEL(n), 1)) // DT_NODELABEL(reset2)
node_id | node identifier |
idx | logical index into "resets" |
#define DT_RESET_CTLR_BY_NAME | ( | node_id, | |
name | |||
) | DT_PHANDLE_BY_NAME(node_id, resets, name) |
#include <zephyr/devicetree/reset.h>
Get the node identifier for the controller phandle from a resets phandle-array property by name.
Example devicetree fragment:
reset1: reset-controller@... { ... }; reset2: reset-controller@... { ... }; n: node { resets = <&reset1 10>, <&reset2 20>; reset-names = "alpha", "beta"; };
Example usage:
DT_RESET_CTLR_BY_NAME(DT_NODELABEL(n), alpha) // DT_NODELABEL(reset1) DT_RESET_CTLR_BY_NAME(DT_NODELABEL(n), beta) // DT_NODELABEL(reset2)
node_id | node identifier |
name | lowercase-and-underscores name of a resets element as defined by the node's reset-names property |
#define DT_RESET_ID | ( | node_id | ) | DT_RESET_ID_BY_IDX(node_id, 0) |
#include <zephyr/devicetree/reset.h>
Equivalent to DT_RESET_ID_BY_IDX(node_id, 0)
node_id | node identifier |
#define DT_RESET_ID_BY_IDX | ( | node_id, | |
idx | |||
) | DT_PHA_BY_IDX(node_id, resets, idx, id) |
#include <zephyr/devicetree/reset.h>
Get a Reset Controller specifier's id cell at an index.
This macro only works for Reset Controller specifiers with cells named "id". Refer to the node's binding to check if necessary.
Example devicetree fragment:
reset: reset-controller@... { compatible = "vnd,reset"; #reset-cells = <1>; }; n: node { resets = <&reset 10>; };
Bindings fragment for the vnd,reset compatible:
reset-cells: - id
Example usage:
DT_RESET_ID_BY_IDX(DT_NODELABEL(n), 0) // 10
node_id | node identifier |
idx | logical index into "resets" |