Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Devicetree WUC Controller API

Macros

#define DT_WUC_BY_IDX(node_id, idx)
 Get the node identifier for the controller phandle from a "wakeup-ctrls" phandle-array property at an index.
#define DT_WUC(node_id)
 Equivalent to DT_WUC_BY_IDX(node_id, 0).
#define DT_WUC_CELL_BY_IDX(node_id, idx, cell)
 Get a wakeup controller specifier's cell value at an index.
#define DT_WUC_CELL(node_id, cell)
 Equivalent to DT_WUC_CELL_BY_IDX(node_id, 0, cell).
#define DT_INST_WUC_BY_IDX(inst, idx)
 Get the node identifier for the controller phandle from a "wakeup-ctrls" phandle-array property at an index.
#define DT_INST_WUC(inst)
 Equivalent to DT_INST_WUC_BY_IDX(inst, 0).
#define DT_INST_WUC_CELL_BY_IDX(inst, idx, cell)
 Get a DT_DRV_COMPAT instance's wakeup controller specifier's cell value at an index.
#define DT_INST_WUC_CELL(inst, cell)
 Equivalent to DT_INST_WUC_CELL_BY_IDX(inst, 0, cell).
#define DT_WUC_ID_BY_IDX(node_id, idx)
 Get a Wakeup Controller specifier's id cell at an index.
#define DT_WUC_ID(node_id)
 Equivalent to DT_WUC_ID_BY_IDX(node_id, 0).
#define DT_INST_WUC_ID_BY_IDX(inst, idx)
 Get a DT_DRV_COMPAT instance's Wakeup Controller specifier's id cell value at an index.
#define DT_INST_WUC_ID(inst)
 Equivalent to DT_INST_WUC_ID_BY_IDX(inst, 0).

Detailed Description

Macro Definition Documentation

◆ DT_INST_WUC

#define DT_INST_WUC ( inst)

#include <zephyr/devicetree/wuc.h>

Value:
#define DT_INST_WUC_BY_IDX(inst, idx)
Get the node identifier for the controller phandle from a "wakeup-ctrls" phandle-array property at an...
Definition wuc.h:112

Equivalent to DT_INST_WUC_BY_IDX(inst, 0).

Parameters
instinstance number
Returns
a node identifier for the wakeup controller at index 0 in "wakeup-ctrls"
See also
DT_WUC_BY_IDX()

◆ DT_INST_WUC_BY_IDX

#define DT_INST_WUC_BY_IDX ( inst,
idx )

#include <zephyr/devicetree/wuc.h>

Value:
#define DT_DRV_INST(inst)
Node identifier for an instance of a DT_DRV_COMPAT compatible.
Definition devicetree.h:4085
#define DT_WUC_BY_IDX(node_id, idx)
Get the node identifier for the controller phandle from a "wakeup-ctrls" phandle-array property at an...
Definition wuc.h:51

Get the node identifier for the controller phandle from a "wakeup-ctrls" phandle-array property at an index.

Parameters
instinstance number
idxlogical index into "wakeup-ctrls"
Returns
the node identifier for the wakeup controller referenced at index "idx"
See also
DT_WUC_BY_IDX()

◆ DT_INST_WUC_CELL

#define DT_INST_WUC_CELL ( inst,
cell )

#include <zephyr/devicetree/wuc.h>

Value:
#define DT_INST_WUC_CELL_BY_IDX(inst, idx, cell)
Get a DT_DRV_COMPAT instance's wakeup controller specifier's cell value at an index.
Definition wuc.h:132

Equivalent to DT_INST_WUC_CELL_BY_IDX(inst, 0, cell).

Parameters
instDT_DRV_COMPAT instance number
celllowercase-and-underscores cell name
Returns
the value of the cell inside the specifier at index 0

◆ DT_INST_WUC_CELL_BY_IDX

#define DT_INST_WUC_CELL_BY_IDX ( inst,
idx,
cell )

#include <zephyr/devicetree/wuc.h>

Value:
#define DT_WUC_CELL_BY_IDX(node_id, idx, cell)
Get a wakeup controller specifier's cell value at an index.
Definition wuc.h:91

Get a DT_DRV_COMPAT instance's wakeup controller specifier's cell value at an index.

Parameters
instDT_DRV_COMPAT instance number
idxlogical index into wakeup-ctrls property
celllowercase-and-underscores cell name
Returns
the cell value at index "idx"
See also
DT_WUC_CELL_BY_IDX()

◆ DT_INST_WUC_ID

#define DT_INST_WUC_ID ( inst)

#include <zephyr/devicetree/wuc.h>

Value:
#define DT_INST_WUC_ID_BY_IDX(inst, idx)
Get a DT_DRV_COMPAT instance's Wakeup Controller specifier's id cell value at an index.
Definition wuc.h:191

Equivalent to DT_INST_WUC_ID_BY_IDX(inst, 0).

Parameters
instDT_DRV_COMPAT instance number
Returns
the id cell value at index 0
See also
DT_INST_WUC_ID_BY_IDX()

◆ DT_INST_WUC_ID_BY_IDX

#define DT_INST_WUC_ID_BY_IDX ( inst,
idx )

#include <zephyr/devicetree/wuc.h>

Value:
#define DT_WUC_ID_BY_IDX(node_id, idx)
Get a Wakeup Controller specifier's id cell at an index.
Definition wuc.h:173

Get a DT_DRV_COMPAT instance's Wakeup Controller specifier's id cell value at an index.

Parameters
instDT_DRV_COMPAT instance number
idxlogical index into "wakeup-ctrls"
Returns
the id cell value at index "idx"
See also
DT_WUC_ID_BY_IDX()

◆ DT_WUC

#define DT_WUC ( node_id)

#include <zephyr/devicetree/wuc.h>

Value:
DT_WUC_BY_IDX(node_id, 0)

Equivalent to DT_WUC_BY_IDX(node_id, 0).

Parameters
node_idnode identifier
Returns
a node identifier for the wakeup controller at index 0 in "wakeup-ctrls"
See also
DT_WUC_BY_IDX()

◆ DT_WUC_BY_IDX

#define DT_WUC_BY_IDX ( node_id,
idx )

#include <zephyr/devicetree/wuc.h>

Value:
DT_PHANDLE_BY_IDX(node_id, wakeup_ctrls, idx)
#define DT_PHANDLE_BY_IDX(node_id, prop, idx)
Get a node identifier for a phandle in a property.
Definition devicetree.h:1833

Get the node identifier for the controller phandle from a "wakeup-ctrls" phandle-array property at an index.

Example devicetree fragment:

wuc1: wakeup-controller@... { ... };

wuc2: wakeup-controller@... { ... };

n: node {
        wakeup-ctrls = <&wuc1 10>, <&wuc2 20>;
};

Example usage:

DT_WUC_BY_IDX(DT_NODELABEL(n), 0) // DT_NODELABEL(wuc1)
DT_WUC_BY_IDX(DT_NODELABEL(n), 1) // DT_NODELABEL(wuc2)
Parameters
node_idnode identifier
idxlogical index into "wakeup-ctrls"
Returns
the node identifier for the wakeup controller referenced at index "idx"
See also
DT_PHANDLE_BY_IDX()

◆ DT_WUC_CELL

#define DT_WUC_CELL ( node_id,
cell )

#include <zephyr/devicetree/wuc.h>

Value:
DT_WUC_CELL_BY_IDX(node_id, 0, cell)

Equivalent to DT_WUC_CELL_BY_IDX(node_id, 0, cell).

Parameters
node_idnode identifier for a node with a wakeup-ctrls property
celllowercase-and-underscores cell name
Returns
the cell value at index 0
See also
DT_WUC_CELL_BY_IDX()

◆ DT_WUC_CELL_BY_IDX

#define DT_WUC_CELL_BY_IDX ( node_id,
idx,
cell )

#include <zephyr/devicetree/wuc.h>

Value:
DT_PHA_BY_IDX(node_id, wakeup_ctrls, idx, cell)
#define DT_PHA_BY_IDX(node_id, pha, idx, cell)
Get a phandle-array specifier cell value at an index.
Definition devicetree.h:1612

Get a wakeup controller specifier's cell value at an index.

Example devicetree fragment:

wuc: wakeup-controller@... {
        compatible = "vnd,wuc";
        #wakeup-ctrl-cells = <1>;
};

n: node {
        wakeup-ctrls = <&wuc 10>;
};

Bindings fragment for the vnd,wuc compatible:

wakeup-ctrl-cells:
  - id

Example usage:

DT_WUC_CELL_BY_IDX(DT_NODELABEL(n), 0, id) // 10
Parameters
node_idnode identifier for a node with a wakeup-ctrls property
idxlogical index into wakeup-ctrls property
celllowercase-and-underscores cell name
Returns
the cell value at index "idx"
See also
DT_PHA_BY_IDX()

◆ DT_WUC_ID

#define DT_WUC_ID ( node_id)

#include <zephyr/devicetree/wuc.h>

Value:
DT_WUC_ID_BY_IDX(node_id, 0)

Equivalent to DT_WUC_ID_BY_IDX(node_id, 0).

Parameters
node_idnode identifier
Returns
the id cell value at index 0
See also
DT_WUC_ID_BY_IDX()

◆ DT_WUC_ID_BY_IDX

#define DT_WUC_ID_BY_IDX ( node_id,
idx )

#include <zephyr/devicetree/wuc.h>

Value:
DT_PHA_BY_IDX(node_id, wakeup_ctrls, idx, id)

Get a Wakeup Controller specifier's id cell at an index.

This macro only works for Wakeup Controller specifiers with cells named "id". Refer to the node's binding to check if necessary.

Example devicetree fragment:

wuc: wakeup-controller@... {
        compatible = "vnd,wuc";
        #wakeup-ctrl-cells = <1>;
};

n: node {
        wakeup-ctrls = <&wuc 10>;
};

Bindings fragment for the vnd,wuc compatible:

wakeup-ctrl-cells:
  - id

Example usage:

DT_WUC_ID_BY_IDX(DT_NODELABEL(n), 0) // 10
Parameters
node_idnode identifier
idxlogical index into "wakeup-ctrls"
Returns
the id cell value at index "idx"
See also
DT_PHA_BY_IDX()