|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Macros | |
| #define | DT_COUNTER_CAPTURES_CTLR_BY_IDX(node_id, counter_capture_pha, idx) |
| Get the node identifier for the counter controller from a counter-captures property at an index. | |
| #define | DT_COUNTER_CAPTURES_CTLR_BY_NAME(node_id, counter_capture_pha, name) |
| Get the node identifier for the counter controller from a counter-captures property by name. | |
| #define | DT_COUNTER_CAPTURES_CTLR(node_id, counter_capture_pha) |
| Equivalent to DT_COUNTER_CAPTURES_CTLR_BY_IDX(node_id, counter_capture_pha, 0). | |
| #define | DT_COUNTER_CAPTURES_CELL_BY_IDX(node_id, counter_capture_pha, idx, cell) |
| Get counter capture specifier's cell value at an index. | |
| #define | DT_COUNTER_CAPTURES_CELL_BY_NAME(node_id, counter_capture_pha, name, cell) |
| Get a counter capture specifier's cell value by name. | |
| #define | DT_COUNTER_CAPTURES_CELL(node_id, counter_capture_pha, cell) |
| Equivalent to DT_COUNTER_CAPTURES_CELL_BY_IDX(node_id, counter_capture_pha, 0, cell). | |
| #define | DT_COUNTER_CAPTURES_CHANNEL_BY_IDX(node_id, counter_capture_pha, idx) |
| Get a counter capture specifier's channel cell value at an index. | |
| #define | DT_COUNTER_CAPTURES_CHANNEL_BY_NAME(node_id, counter_capture_pha, name) |
| Get a counter capture specifier's channel cell value by name. | |
| #define | DT_COUNTER_CAPTURES_CHANNEL(node_id, counter_capture_pha) |
| Equivalent to DT_COUNTER_CAPTURES_CHANNEL_BY_IDX(node_id, counter_capture_pha, 0). | |
| #define | DT_COUNTER_CAPTURES_FLAGS_BY_IDX(node_id, counter_capture_pha, idx) |
| Get a counter capture specifier's flags cell value at an index. | |
| #define | DT_COUNTER_CAPTURES_FLAGS_BY_NAME(node_id, counter_capture_pha, name) |
| Get a counter capture specifier's flags cell value by name. | |
| #define | DT_COUNTER_CAPTURES_FLAGS(node_id, counter_capture_pha) |
| Equivalent to DT_COUNTER_CAPTURES_FLAGS_BY_IDX(node_id, counter_capture_pha, 0). | |
| #define | DT_INST_COUNTER_CAPTURES_CTLR_BY_IDX(inst, counter_capture_pha, idx) |
| Get the node identifier for the counter controller from a DT_DRV_COMPAT instance's counter-captures property at an index. | |
| #define | DT_INST_COUNTER_CAPTURES_CTLR_BY_NAME(inst, counter_capture_pha, name) |
| Get the node identifier for the counter controller from a DT_DRV_COMPAT instance's counter-captures property by name. | |
| #define | DT_INST_COUNTER_CAPTURES_CTLR(inst, counter_capture_pha) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CTLR_BY_IDX(inst, counter_capture_pha, 0). | |
| #define | DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, idx, cell) |
| Get a DT_DRV_COMPAT instance's counter capture specifier's cell value at an index. | |
| #define | DT_INST_COUNTER_CAPTURES_CELL_BY_NAME(inst, counter_capture_pha, name, cell) |
| Get a DT_DRV_COMPAT instance's counter capture specifier's cell value by name. | |
| #define | DT_INST_COUNTER_CAPTURES_CELL(inst, counter_capture_pha, cell) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, 0, cell). | |
| #define | DT_INST_COUNTER_CAPTURES_CHANNEL_BY_IDX(inst, counter_capture_pha, idx) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, idx, channel). | |
| #define | DT_INST_COUNTER_CAPTURES_CHANNEL_BY_NAME(inst, counter_capture_pha, name) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_NAME(inst, counter_capture_pha, name, channel). | |
| #define | DT_INST_COUNTER_CAPTURES_CHANNEL(inst, counter_capture_pha) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CHANNEL_BY_IDX(inst, counter_capture_pha, 0). | |
| #define | DT_INST_COUNTER_CAPTURES_FLAGS_BY_IDX(inst, counter_capture_pha, idx) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, idx, flags). | |
| #define | DT_INST_COUNTER_CAPTURES_FLAGS_BY_NAME(inst, counter_capture_pha, name) |
| Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_NAME(inst, counter_capture_pha, name, flags). | |
| #define | DT_INST_COUNTER_CAPTURES_FLAGS(inst, counter_capture_pha) |
| Equivalent to DT_INST_COUNTER_CAPTURES_FLAGS_BY_IDX(inst, counter_capture_pha, 0). | |
| #define DT_COUNTER_CAPTURES_CELL | ( | node_id, | |
| counter_capture_pha, | |||
| cell ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_COUNTER_CAPTURES_CELL_BY_IDX(node_id, counter_capture_pha, 0, cell).
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| cell | lowercase-and-underscores cell name |
| #define DT_COUNTER_CAPTURES_CELL_BY_IDX | ( | node_id, | |
| counter_capture_pha, | |||
| idx, | |||
| cell ) |
#include <zephyr/devicetree/counter-capture.h>
Get counter capture specifier's cell value at an index.
Example devicetree fragment:
counter1: counter-controller@... {
compatible = "vnd,counter-capture";
#counter-capture-cells = <2>;
};
counter2: counter-controller@... {
compatible = "vnd,counter-capture";
#counter-capture-cells = <2>;
};
n: node {
counter-captures = <&counter1 1 COUNTER_CAPTURE_RISING_EDGE>,
<&counter2 3 COUNTER_CAPTURE_BOTH_EDGES>;
};
Bindings fragment for the "vnd,counter-capture" compatible:
counter-capture-cells: - channel - flags
Example usage:
DT_COUNTER_CAPTURES_CELL_BY_IDX(DT_NODELABEL(n), counter_captures, 0, channel) // 1
DT_COUNTER_CAPTURES_CELL_BY_IDX(DT_NODELABEL(n), counter_captures, 1, channel) // 3
DT_COUNTER_CAPTURES_CELL_BY_IDX(DT_NODELABEL(n), counter_captures, 0, flags)
// COUNTER_CAPTURE_RISING_EDGE
DT_COUNTER_CAPTURES_CELL_BY_IDX(DT_NODELABEL(n), counter_captures, 1, flags)
// COUNTER_CAPTURE_BOTH_EDGES
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| idx | logical index into counter_capture_pha |
| cell | lowercase-and-underscores cell name |
idx | #define DT_COUNTER_CAPTURES_CELL_BY_NAME | ( | node_id, | |
| counter_capture_pha, | |||
| name, | |||
| cell ) |
#include <zephyr/devicetree/counter-capture.h>
Get a counter capture specifier's cell value by name.
Example devicetree fragment:
counter1: counter-controller@... {
compatible = "vnd,counter-capture";
#counter-capture-cells = <2>;
};
counter2: counter-controller@... {
compatible = "vnd,counter-capture";
#counter-capture-cells = <2>;
};
n: node {
counter-captures = <&counter1 1 COUNTER_CAPTURE_RISING_EDGE>,
<&counter2 3 COUNTER_CAPTURE_BOTH_EDGES>;
counter-capture-names = "alpha", "beta";
};
Bindings fragment for the "vnd,counter-capture" compatible:
counter-capture-cells: - channel - flags
Example usage:
DT_COUNTER_CAPTURES_CELL_BY_NAME(DT_NODELABEL(n), counter_captures, alpha, channel) // 1
DT_COUNTER_CAPTURES_CELL_BY_NAME(DT_NODELABEL(n), counter_captures, beta, channel) // 3
DT_COUNTER_CAPTURES_CELL_BY_NAME(DT_NODELABEL(n), counter_captures, alpha, flags)
// COUNTER_CAPTURE_RISING_EDGE
DT_COUNTER_CAPTURES_CELL_BY_NAME(DT_NODELABEL(n), counter_captures, beta, flags)
// COUNTER_CAPTURE_BOTH_EDGES
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| cell | lowercase-and-underscores cell name |
| #define DT_COUNTER_CAPTURES_CHANNEL | ( | node_id, | |
| counter_capture_pha ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_COUNTER_CAPTURES_CHANNEL_BY_IDX(node_id, counter_capture_pha, 0).
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| #define DT_COUNTER_CAPTURES_CHANNEL_BY_IDX | ( | node_id, | |
| counter_capture_pha, | |||
| idx ) |
#include <zephyr/devicetree/counter-capture.h>
Get a counter capture specifier's channel cell value at an index.
This macro only works for counter capture specifiers with cells named "channel". Refer to the node's binding to check if necessary.
This is equivalent to:
DT_COUNTER_CAPTURES_CELL_BY_IDX(node_id, counter_capture_pha, idx, channel)
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| idx | logical index into counter_capture_pha |
idx | #define DT_COUNTER_CAPTURES_CHANNEL_BY_NAME | ( | node_id, | |
| counter_capture_pha, | |||
| name ) |
#include <zephyr/devicetree/counter-capture.h>
Get a counter capture specifier's channel cell value by name.
This macro only works for counter capture specifiers with cells named "channel". Refer to the node's binding to check if necessary.
This is equivalent to:
DT_COUNTER_CAPTURES_CELL_BY_NAME(node_id, counter_capture_pha, name, channel)
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| #define DT_COUNTER_CAPTURES_CTLR | ( | node_id, | |
| counter_capture_pha ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_COUNTER_CAPTURES_CTLR_BY_IDX(node_id, counter_capture_pha, 0).
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
counter_capture_pha | #define DT_COUNTER_CAPTURES_CTLR_BY_IDX | ( | node_id, | |
| counter_capture_pha, | |||
| idx ) |
#include <zephyr/devicetree/counter-capture.h>
Get the node identifier for the counter controller from a counter-captures property at an index.
Example devicetree fragment:
counter1: counter-controller@... { ... };
counter2: counter-controller@... { ... };
n: node {
counter-captures = <&counter1 1 COUNTER_CAPTURE_RISING_EDGE>,
<&counter2 3 COUNTER_CAPTURE_BOTH_EDGES>;
};
Example usage:
DT_COUNTER_CAPTURES_CTLR_BY_IDX(DT_NODELABEL(n), counter_captures, 0)
// DT_NODELABEL(counter1)
DT_COUNTER_CAPTURES_CTLR_BY_IDX(DT_NODELABEL(n), counter_captures, 1)
// DT_NODELABEL(counter2)
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| idx | logical index into counter_capture_pha |
idx | #define DT_COUNTER_CAPTURES_CTLR_BY_NAME | ( | node_id, | |
| counter_capture_pha, | |||
| name ) |
#include <zephyr/devicetree/counter-capture.h>
Get the node identifier for the counter controller from a counter-captures property by name.
Example devicetree fragment:
counter1: counter-controller@... { ... };
counter2: counter-controller@... { ... };
n: node {
counter-captures = <&counter1 1 COUNTER_CAPTURE_RISING_EDGE>,
<&counter2 3 COUNTER_CAPTURE_BOTH_EDGES>;
counter-capture-names = "alpha", "beta";
};
Example usage:
DT_COUNTER_CAPTURES_CTLR_BY_NAME(DT_NODELABEL(n), counter_captures, alpha)
// DT_NODELABEL(counter1)
DT_COUNTER_CAPTURES_CTLR_BY_NAME(DT_NODELABEL(n), counter_captures, beta)
// DT_NODELABEL(counter2)
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| #define DT_COUNTER_CAPTURES_FLAGS | ( | node_id, | |
| counter_capture_pha ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_COUNTER_CAPTURES_FLAGS_BY_IDX(node_id, counter_capture_pha, 0).
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| #define DT_COUNTER_CAPTURES_FLAGS_BY_IDX | ( | node_id, | |
| counter_capture_pha, | |||
| idx ) |
#include <zephyr/devicetree/counter-capture.h>
Get a counter capture specifier's flags cell value at an index.
This macro expects counter capture specifiers with cells named "flags". If there is no "flags" cell in the specifier, zero is returned. Refer to the node's binding to check specifier cell names if necessary.
This is equivalent to:
DT_COUNTER_CAPTURES_CELL_BY_IDX(node_id, counter_capture_pha, idx, flags)
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| idx | logical index into counter_capture_pha |
idx, or zero if there is none | #define DT_COUNTER_CAPTURES_FLAGS_BY_NAME | ( | node_id, | |
| counter_capture_pha, | |||
| name ) |
#include <zephyr/devicetree/counter-capture.h>
Get a counter capture specifier's flags cell value by name.
This macro expects counter capture specifiers with cells named "flags". If there is no "flags" cell in the specifier, zero is returned. Refer to the node's binding to check specifier cell names if necessary.
This is equivalent to:
DT_COUNTER_CAPTURES_CELL_BY_NAME(node_id, counter_capture_pha, name, flags)
if there is a flags cell, but expands to zero if there is none.
| node_id | node identifier |
| counter_capture_pha | lowercase-and-underscores counter capture property with type "phandle-array" |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| #define DT_INST_COUNTER_CAPTURES_CELL | ( | inst, | |
| counter_capture_pha, | |||
| cell ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, 0, cell).
| inst | DT_DRV_COMPAT instance number |
| cell | lowercase-and-underscores cell name |
| #define DT_INST_COUNTER_CAPTURES_CELL_BY_IDX | ( | inst, | |
| counter_capture_pha, | |||
| idx, | |||
| cell ) |
#include <zephyr/devicetree/counter-capture.h>
Get a DT_DRV_COMPAT instance's counter capture specifier's cell value at an index.
| inst | DT_DRV_COMPAT instance number |
| idx | logical index into counter-captures property |
| cell | lowercase-and-underscores cell name |
idx | #define DT_INST_COUNTER_CAPTURES_CELL_BY_NAME | ( | inst, | |
| counter_capture_pha, | |||
| name, | |||
| cell ) |
#include <zephyr/devicetree/counter-capture.h>
Get a DT_DRV_COMPAT instance's counter capture specifier's cell value by name.
| inst | DT_DRV_COMPAT instance number |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| cell | lowercase-and-underscores cell name |
| #define DT_INST_COUNTER_CAPTURES_CHANNEL | ( | inst, | |
| counter_capture_pha ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CHANNEL_BY_IDX(inst, counter_capture_pha, 0).
| inst | DT_DRV_COMPAT instance number |
| #define DT_INST_COUNTER_CAPTURES_CHANNEL_BY_IDX | ( | inst, | |
| counter_capture_pha, | |||
| idx ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, idx, channel).
| inst | DT_DRV_COMPAT instance number |
| idx | logical index into counter-captures property |
idx | #define DT_INST_COUNTER_CAPTURES_CHANNEL_BY_NAME | ( | inst, | |
| counter_capture_pha, | |||
| name ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_NAME(inst, counter_capture_pha, name, channel).
| inst | DT_DRV_COMPAT instance number |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| #define DT_INST_COUNTER_CAPTURES_CTLR | ( | inst, | |
| counter_capture_pha ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CTLR_BY_IDX(inst, counter_capture_pha, 0).
| inst | DT_DRV_COMPAT instance number |
| #define DT_INST_COUNTER_CAPTURES_CTLR_BY_IDX | ( | inst, | |
| counter_capture_pha, | |||
| idx ) |
#include <zephyr/devicetree/counter-capture.h>
Get the node identifier for the counter controller from a DT_DRV_COMPAT instance's counter-captures property at an index.
| inst | DT_DRV_COMPAT instance number |
| idx | logical index into counter-captures property |
idx | #define DT_INST_COUNTER_CAPTURES_CTLR_BY_NAME | ( | inst, | |
| counter_capture_pha, | |||
| name ) |
#include <zephyr/devicetree/counter-capture.h>
Get the node identifier for the counter controller from a DT_DRV_COMPAT instance's counter-captures property by name.
| inst | DT_DRV_COMPAT instance number |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |
| #define DT_INST_COUNTER_CAPTURES_FLAGS | ( | inst, | |
| counter_capture_pha ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_FLAGS_BY_IDX(inst, counter_capture_pha, 0).
| inst | DT_DRV_COMPAT instance number |
| #define DT_INST_COUNTER_CAPTURES_FLAGS_BY_IDX | ( | inst, | |
| counter_capture_pha, | |||
| idx ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_IDX(inst, counter_capture_pha, idx, flags).
| inst | DT_DRV_COMPAT instance number |
| idx | logical index into counter-captures property |
idx, or zero if there is none | #define DT_INST_COUNTER_CAPTURES_FLAGS_BY_NAME | ( | inst, | |
| counter_capture_pha, | |||
| name ) |
#include <zephyr/devicetree/counter-capture.h>
Equivalent to DT_INST_COUNTER_CAPTURES_CELL_BY_NAME(inst, counter_capture_pha, name, flags).
| inst | DT_DRV_COMPAT instance number |
| name | lowercase-and-underscores name of a counter-captures element as defined by the node's counter-capture-names property |