Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Macros | |
#define | DT_DMAS_LABEL_BY_IDX(node_id, idx) |
Get a label property from the node referenced by a dmas property at an index. More... | |
#define | DT_INST_DMAS_LABEL_BY_IDX(inst, idx) |
Get a label property from a DT_DRV_COMPAT instance's dmas property at an index. More... | |
#define | DT_DMAS_LABEL_BY_NAME(node_id, name) |
Get a label property from a dmas property by name. More... | |
#define | DT_DMAS_CTLR_BY_IDX(node_id, idx) DT_PHANDLE_BY_IDX(node_id, dmas, idx) |
Get the node identifier for the DMA controller from a dmas property at an index. More... | |
#define | DT_DMAS_CTLR_BY_NAME(node_id, name) DT_PHANDLE_BY_NAME(node_id, dmas, name) |
Get the node identifier for the DMA controller from a dmas property by name. More... | |
#define | DT_DMAS_CTLR(node_id) DT_DMAS_CTLR_BY_IDX(node_id, 0) |
Equivalent to DT_DMAS_CTLR_BY_IDX(node_id, 0) More... | |
#define | DT_INST_DMAS_LABEL_BY_NAME(inst, name) |
Get a label property from a DT_DRV_COMPAT instance's dmas property by name. More... | |
#define | DT_INST_DMAS_CTLR_BY_IDX(inst, idx) DT_DMAS_CTLR_BY_IDX(DT_DRV_INST(inst), idx) |
Get the node identifier for the DMA controller from a DT_DRV_COMPAT instance's dmas property at an index. More... | |
#define | DT_INST_DMAS_CTLR_BY_NAME(inst, name) DT_DMAS_CTLR_BY_NAME(DT_DRV_INST(inst), name) |
Get the node identifier for the DMA controller from a DT_DRV_COMPAT instance's dmas property by name. More... | |
#define | DT_INST_DMAS_CTLR(inst) DT_INST_DMAS_CTLR_BY_IDX(inst, 0) |
Equivalent to DT_INST_DMAS_CTLR_BY_IDX(inst, 0) More... | |
#define | DT_DMAS_CELL_BY_IDX(node_id, idx, cell) DT_PHA_BY_IDX(node_id, dmas, idx, cell) |
Get a DMA specifier's cell value at an index. More... | |
#define | DT_INST_DMAS_CELL_BY_IDX(inst, idx, cell) DT_PHA_BY_IDX(DT_DRV_INST(inst), dmas, idx, cell) |
Get a DT_DRV_COMPAT instance's DMA specifier's cell value at an index. More... | |
#define | DT_DMAS_CELL_BY_NAME(node_id, name, cell) DT_PHA_BY_NAME(node_id, dmas, name, cell) |
Get a DMA specifier's cell value by name. More... | |
#define | DT_INST_DMAS_CELL_BY_NAME(inst, name, cell) DT_DMAS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell) |
Get a DT_DRV_COMPAT instance's DMA specifier's cell value by name. More... | |
#define | DT_DMAS_HAS_IDX(node_id, idx) IS_ENABLED(DT_CAT(node_id, _P_dmas_IDX_##idx##_EXISTS)) |
Is index "idx" valid for a dmas property? More... | |
#define | DT_INST_DMAS_HAS_IDX(inst, idx) DT_DMAS_HAS_IDX(DT_DRV_INST(inst), idx) |
Is index "idx" valid for a DT_DRV_COMPAT instance's dmas property? More... | |
#define | DT_DMAS_HAS_NAME(node_id, name) IS_ENABLED(DT_CAT(node_id, _P_dmas_NAME_##name##_EXISTS)) |
Does a dmas property have a named element? More... | |
#define | DT_INST_DMAS_HAS_NAME(inst, name) DT_DMAS_HAS_NAME(DT_DRV_INST(inst), name) |
Does a DT_DRV_COMPAT instance's dmas property have a named element? More... | |
#define DT_DMAS_CELL_BY_IDX | ( | node_id, | |
idx, | |||
cell | |||
) | DT_PHA_BY_IDX(node_id, dmas, idx, cell) |
#include <include/devicetree/dma.h>
Get a DMA specifier's cell value at an index.
Example devicetree fragment:
dma1: dma@... { compatible = "vnd,dma"; #dma-cells = <2>; }; dma2: dma@... { compatible = "vnd,dma"; #dma-cells = <2>; }; n: node { dmas = <&dma1 1 0x400>, <&dma2 6 0x404>; };
Bindings fragment for the vnd,dma compatible:
dma-cells: - channel - config
Example usage:
DT_DMAS_CELL_BY_IDX(DT_NODELABEL(n), 0, channel) // 1 DT_DMAS_CELL_BY_IDX(DT_NODELABEL(n), 1, channel) // 6 DT_DMAS_CELL_BY_IDX(DT_NODELABEL(n), 0, config) // 0x400 DT_DMAS_CELL_BY_IDX(DT_NODELABEL(n), 1, config) // 0x404
node_id | node identifier for a node with a dmas property |
idx | logical index into dmas property |
cell | lowercase-and-underscores cell name |
#define DT_DMAS_CELL_BY_NAME | ( | node_id, | |
name, | |||
cell | |||
) | DT_PHA_BY_NAME(node_id, dmas, name, cell) |
#include <include/devicetree/dma.h>
Get a DMA specifier's cell value by name.
Example devicetree fragment:
dma1: dma@... { compatible = "vnd,dma"; #dma-cells = <2>; }; dma2: dma@... { compatible = "vnd,dma"; #dma-cells = <2>; }; n: node { dmas = <&dma1 1 0x400>, <&dma2 6 0x404>; dma-names = "tx", "rx"; };
Bindings fragment for the vnd,dma compatible:
dma-cells: - channel - config
Example usage:
DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), tx, channel) // 1 DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), rx, channel) // 6 DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), tx, config) // 0x400 DT_DMAS_CELL_BY_NAME(DT_NODELABEL(n), rx, config) // 0x404
node_id | node identifier for a node with a dmas property |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
cell | lowercase-and-underscores cell name |
#define DT_DMAS_CTLR | ( | node_id | ) | DT_DMAS_CTLR_BY_IDX(node_id, 0) |
#include <include/devicetree/dma.h>
Equivalent to DT_DMAS_CTLR_BY_IDX(node_id, 0)
node_id | node identifier for a node with a dmas property |
#define DT_DMAS_CTLR_BY_IDX | ( | node_id, | |
idx | |||
) | DT_PHANDLE_BY_IDX(node_id, dmas, idx) |
#include <include/devicetree/dma.h>
Get the node identifier for the DMA controller from a dmas property at an index.
Example devicetree fragment:
dma1: dma@... { ... }; dma2: dma@... { ... }; n: node { dmas = <&dma1 1 2 0x400 0x3>, <&dma2 6 3 0x404 0x5>; };
Example usage:
DT_DMAS_CTLR_BY_IDX(DT_NODELABEL(n), 0) // DT_NODELABEL(dma1) DT_DMAS_CTLR_BY_IDX(DT_NODELABEL(n), 1) // DT_NODELABEL(dma2)
node_id | node identifier for a node with a dmas property |
idx | logical index into dmas property |
#define DT_DMAS_CTLR_BY_NAME | ( | node_id, | |
name | |||
) | DT_PHANDLE_BY_NAME(node_id, dmas, name) |
#include <include/devicetree/dma.h>
Get the node identifier for the DMA controller from a dmas property by name.
Example devicetree fragment:
dma1: dma@... { ... }; dma2: dma@... { ... }; n: node { dmas = <&dma1 1 2 0x400 0x3>, <&dma2 6 3 0x404 0x5>; dma-names = "tx", "rx"; };
Example usage:
DT_DMAS_CTLR_BY_NAME(DT_NODELABEL(n), tx) // DT_NODELABEL(dma1) DT_DMAS_CTLR_BY_NAME(DT_NODELABEL(n), rx) // DT_NODELABEL(dma2)
node_id | node identifier for a node with a dmas property |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
#define DT_DMAS_HAS_IDX | ( | node_id, | |
idx | |||
) | IS_ENABLED(DT_CAT(node_id, _P_dmas_IDX_##idx##_EXISTS)) |
#include <include/devicetree/dma.h>
Is index "idx" valid for a dmas property?
node_id | node identifier for a node with a dmas property |
idx | logical index into dmas property |
#define DT_DMAS_HAS_NAME | ( | node_id, | |
name | |||
) | IS_ENABLED(DT_CAT(node_id, _P_dmas_NAME_##name##_EXISTS)) |
#include <include/devicetree/dma.h>
Does a dmas property have a named element?
node_id | node identifier for a node with a dmas property |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
#define DT_DMAS_LABEL_BY_IDX | ( | node_id, | |
idx | |||
) |
#include <include/devicetree/dma.h>
Get a label property from the node referenced by a dmas property at an index.
It's an error if the DMA controller node referenced by the phandle in node_id's dmas property at index "idx" has no label property.
Example devicetree fragment:
dma1: dma@... { label = "DMA_1"; }; dma2: dma@... { label = "DMA_2"; }; n: node { dmas = <&dma1 1 2 0x400 0x3>, <&dma2 6 3 0x404 0x5>; };
Example usage:
DT_DMAS_LABEL_BY_IDX(DT_NODELABEL(n), 1) // "DMA_2"
node_id | node identifier for a node with a dmas property |
idx | logical index into dmas property |
#define DT_DMAS_LABEL_BY_NAME | ( | node_id, | |
name | |||
) |
#include <include/devicetree/dma.h>
Get a label property from a dmas property by name.
It's an error if the DMA controller node referenced by the phandle in node_id's dmas property at the element named "name" has no label property.
Example devicetree fragment:
dma1: dma@... { label = "DMA_1"; }; dma2: dma@... { label = "DMA_2"; }; n: node { dmas = <&dma1 1 2 0x400 0x3>, <&dma2 6 3 0x404 0x5>; dma-names = "tx", "rx"; };
Example usage:
DT_DMAS_LABEL_BY_NAME(DT_NODELABEL(n), rx) // "DMA_2"
node_id | node identifier for a node with a dmas property |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
#define DT_INST_DMAS_CELL_BY_IDX | ( | inst, | |
idx, | |||
cell | |||
) | DT_PHA_BY_IDX(DT_DRV_INST(inst), dmas, idx, cell) |
#include <include/devicetree/dma.h>
Get a DT_DRV_COMPAT instance's DMA specifier's cell value at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into dmas property |
cell | lowercase-and-underscores cell name |
#define DT_INST_DMAS_CELL_BY_NAME | ( | inst, | |
name, | |||
cell | |||
) | DT_DMAS_CELL_BY_NAME(DT_DRV_INST(inst), name, cell) |
#include <include/devicetree/dma.h>
Get a DT_DRV_COMPAT instance's DMA specifier's cell value by name.
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
cell | lowercase-and-underscores cell name |
#define DT_INST_DMAS_CTLR | ( | inst | ) | DT_INST_DMAS_CTLR_BY_IDX(inst, 0) |
#include <include/devicetree/dma.h>
Equivalent to DT_INST_DMAS_CTLR_BY_IDX(inst, 0)
inst | DT_DRV_COMPAT instance number |
#define DT_INST_DMAS_CTLR_BY_IDX | ( | inst, | |
idx | |||
) | DT_DMAS_CTLR_BY_IDX(DT_DRV_INST(inst), idx) |
#include <include/devicetree/dma.h>
Get the node identifier for the DMA controller from a DT_DRV_COMPAT instance's dmas property at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into dmas property |
#define DT_INST_DMAS_CTLR_BY_NAME | ( | inst, | |
name | |||
) | DT_DMAS_CTLR_BY_NAME(DT_DRV_INST(inst), name) |
#include <include/devicetree/dma.h>
Get the node identifier for the DMA controller from a DT_DRV_COMPAT instance's dmas property by name.
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
#define DT_INST_DMAS_HAS_IDX | ( | inst, | |
idx | |||
) | DT_DMAS_HAS_IDX(DT_DRV_INST(inst), idx) |
#include <include/devicetree/dma.h>
Is index "idx" valid for a DT_DRV_COMPAT instance's dmas property?
inst | DT_DRV_COMPAT instance number |
idx | logical index into dmas property |
#define DT_INST_DMAS_HAS_NAME | ( | inst, | |
name | |||
) | DT_DMAS_HAS_NAME(DT_DRV_INST(inst), name) |
#include <include/devicetree/dma.h>
Does a DT_DRV_COMPAT instance's dmas property have a named element?
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |
#define DT_INST_DMAS_LABEL_BY_IDX | ( | inst, | |
idx | |||
) |
#include <include/devicetree/dma.h>
Get a label property from a DT_DRV_COMPAT instance's dmas property at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into dmas property |
#define DT_INST_DMAS_LABEL_BY_NAME | ( | inst, | |
name | |||
) |
#include <include/devicetree/dma.h>
Get a label property from a DT_DRV_COMPAT instance's dmas property by name.
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of a dmas element as defined by the node's dma-names property |