Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Macros | |
#define | DT_IO_CHANNELS_CTLR_BY_IDX(node_id, idx) |
Get the node identifier for the node referenced by an io-channels property at an index. | |
#define | DT_IO_CHANNELS_CTLR_BY_NAME(node_id, name) |
Get the node identifier for the node referenced by an io-channels property by name. | |
#define | DT_IO_CHANNELS_CTLR(node_id) |
Equivalent to DT_IO_CHANNELS_CTLR_BY_IDX(node_id, 0) | |
#define | DT_INST_IO_CHANNELS_CTLR_BY_IDX(inst, idx) |
Get the node identifier from a DT_DRV_COMPAT instance's io-channels property at an index. | |
#define | DT_INST_IO_CHANNELS_CTLR_BY_NAME(inst, name) |
Get the node identifier from a DT_DRV_COMPAT instance's io-channels property by name. | |
#define | DT_INST_IO_CHANNELS_CTLR(inst) |
Equivalent to DT_INST_IO_CHANNELS_CTLR_BY_IDX(inst, 0) | |
#define | DT_IO_CHANNELS_INPUT_BY_IDX(node_id, idx) |
Get an io-channels specifier input cell at an index. | |
#define | DT_IO_CHANNELS_INPUT_BY_NAME(node_id, name) |
Get an io-channels specifier input cell by name. | |
#define | DT_IO_CHANNELS_INPUT(node_id) |
Equivalent to DT_IO_CHANNELS_INPUT_BY_IDX(node_id, 0) | |
#define | DT_INST_IO_CHANNELS_INPUT_BY_IDX(inst, idx) |
Get an input cell from the "DT_DRV_INST(inst)" io-channels property at an index. | |
#define | DT_INST_IO_CHANNELS_INPUT_BY_NAME(inst, name) |
Get an input cell from the "DT_DRV_INST(inst)" io-channels property by name. | |
#define | DT_INST_IO_CHANNELS_INPUT(inst) |
Equivalent to DT_INST_IO_CHANNELS_INPUT_BY_IDX(inst, 0) | |
#define DT_INST_IO_CHANNELS_CTLR | ( | inst | ) |
#include <zephyr/devicetree/io-channels.h>
Equivalent to DT_INST_IO_CHANNELS_CTLR_BY_IDX(inst, 0)
inst | DT_DRV_COMPAT instance number |
#define DT_INST_IO_CHANNELS_CTLR_BY_IDX | ( | inst, | |
idx ) |
#include <zephyr/devicetree/io-channels.h>
Get the node identifier from a DT_DRV_COMPAT instance's io-channels property at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into io-channels property |
#define DT_INST_IO_CHANNELS_CTLR_BY_NAME | ( | inst, | |
name ) |
#include <zephyr/devicetree/io-channels.h>
Get the node identifier from a DT_DRV_COMPAT instance's io-channels property by name.
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of an io-channels element as defined by the node's io-channel-names property |
#define DT_INST_IO_CHANNELS_INPUT | ( | inst | ) |
#include <zephyr/devicetree/io-channels.h>
Equivalent to DT_INST_IO_CHANNELS_INPUT_BY_IDX(inst, 0)
inst | DT_DRV_COMPAT instance number |
#define DT_INST_IO_CHANNELS_INPUT_BY_IDX | ( | inst, | |
idx ) |
#include <zephyr/devicetree/io-channels.h>
Get an input cell from the "DT_DRV_INST(inst)" io-channels property at an index.
inst | DT_DRV_COMPAT instance number |
idx | logical index into io-channels property |
#define DT_INST_IO_CHANNELS_INPUT_BY_NAME | ( | inst, | |
name ) |
#include <zephyr/devicetree/io-channels.h>
Get an input cell from the "DT_DRV_INST(inst)" io-channels property by name.
inst | DT_DRV_COMPAT instance number |
name | lowercase-and-underscores name of an io-channels element as defined by the instance's io-channel-names property |
#define DT_IO_CHANNELS_CTLR | ( | node_id | ) |
#include <zephyr/devicetree/io-channels.h>
Equivalent to DT_IO_CHANNELS_CTLR_BY_IDX(node_id, 0)
node_id | node identifier for a node with an io-channels property |
#define DT_IO_CHANNELS_CTLR_BY_IDX | ( | node_id, | |
idx ) |
#include <zephyr/devicetree/io-channels.h>
Get the node identifier for the node referenced by an io-channels property at an index.
Example devicetree fragment:
adc1: adc@... { ... }; adc2: adc@... { ... }; n: node { io-channels = <&adc1 10>, <&adc2 20>; };
Example usage:
DT_IO_CHANNELS_CTLR_BY_IDX(DT_NODELABEL(n), 0) // DT_NODELABEL(adc1) DT_IO_CHANNELS_CTLR_BY_IDX(DT_NODELABEL(n), 1) // DT_NODELABEL(adc2)
node_id | node identifier for a node with an io-channels property |
idx | logical index into io-channels property |
#define DT_IO_CHANNELS_CTLR_BY_NAME | ( | node_id, | |
name ) |
#include <zephyr/devicetree/io-channels.h>
Get the node identifier for the node referenced by an io-channels property by name.
Example devicetree fragment:
adc1: adc@... { ... }; adc2: adc@... { ... }; n: node { io-channels = <&adc1 10>, <&adc2 20>; io-channel-names = "SENSOR", "BANDGAP"; };
Example usage:
DT_IO_CHANNELS_CTLR_BY_NAME(DT_NODELABEL(n), sensor) // DT_NODELABEL(adc1) DT_IO_CHANNELS_CTLR_BY_NAME(DT_NODELABEL(n), bandgap) // DT_NODELABEL(adc2)
node_id | node identifier for a node with an io-channels property |
name | lowercase-and-underscores name of an io-channels element as defined by the node's io-channel-names property |
#define DT_IO_CHANNELS_INPUT | ( | node_id | ) |
#include <zephyr/devicetree/io-channels.h>
Equivalent to DT_IO_CHANNELS_INPUT_BY_IDX(node_id, 0)
node_id | node identifier for a node with an io-channels property |
#define DT_IO_CHANNELS_INPUT_BY_IDX | ( | node_id, | |
idx ) |
#include <zephyr/devicetree/io-channels.h>
Get an io-channels specifier input cell at an index.
This macro only works for io-channels specifiers with cells named "input". Refer to the node's binding to check if necessary.
Example devicetree fragment:
adc1: adc@... { compatible = "vnd,adc"; #io-channel-cells = <1>; }; adc2: adc@... { compatible = "vnd,adc"; #io-channel-cells = <1>; }; n: node { io-channels = <&adc1 10>, <&adc2 20>; };
Bindings fragment for the vnd,adc compatible:
io-channel-cells:
Example usage:
DT_IO_CHANNELS_INPUT_BY_IDX(DT_NODELABEL(n), 0) // 10 DT_IO_CHANNELS_INPUT_BY_IDX(DT_NODELABEL(n), 1) // 20
node_id | node identifier for a node with an io-channels property |
idx | logical index into io-channels property |
#define DT_IO_CHANNELS_INPUT_BY_NAME | ( | node_id, | |
name ) |
#include <zephyr/devicetree/io-channels.h>
Get an io-channels specifier input cell by name.
This macro only works for io-channels specifiers with cells named "input". Refer to the node's binding to check if necessary.
Example devicetree fragment:
adc1: adc@... { compatible = "vnd,adc"; #io-channel-cells = <1>; }; adc2: adc@... { compatible = "vnd,adc"; #io-channel-cells = <1>; }; n: node { io-channels = <&adc1 10>, <&adc2 20>; io-channel-names = "SENSOR", "BANDGAP"; };
Bindings fragment for the vnd,adc compatible:
io-channel-cells:
Example usage:
DT_IO_CHANNELS_INPUT_BY_NAME(DT_NODELABEL(n), sensor) // 10 DT_IO_CHANNELS_INPUT_BY_NAME(DT_NODELABEL(n), bandgap) // 20
node_id | node identifier for a node with an io-channels property |
name | lowercase-and-underscores name of an io-channels element as defined by the node's io-channel-names property |