Zephyr API Documentation 4.4.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Map helpers

Macros

#define DT_NODE_HAS_MAP(node_id, prop)   DT_NODE_HAS_PROP(node_id, prop)
 Returns the existence of map property.
 
#define DT_MAP_LEN(node_id, prop)   DT_PROP_LEN(node_id, prop)
 Returns the number of maps for the given property.
 
#define DT_MAP_HAS_ENTRY_BY_IDX(node_id, prop, entry_idx)    IS_ENABLED(DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _EXISTS))
 Is index idx valid for an array type property?
 
#define DT_MAP_HAS_ENTRY(node_id, prop)   DT_MAP_HAS_ENTRY_BY_IDX(node_id, prop, 0)
 Checks if the map property has any entries.
 
#define DT_MAP_ENTRY_CHILD_ADDRESS_LEN(node_id, prop, entry_idx)    DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_ADDRESS_LEN)
 Get the number of child addresses.
 
#define DT_MAP_ENTRY_HAS_CHILD_ADDRESS_BY_IDX(node_id, prop, entry_idx, param_idx)
 Checks if the child address has the specified index.
 
#define DT_MAP_ENTRY_HAS_CHILD_ADDRESS(node_id, prop, entry_idx)    DT_MAP_ENTRY_HAS_CHILD_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)
 Checks if the mapping entry has any child addresses.
 
#define DT_MAP_ENTRY_CHILD_ADDRESS_BY_IDX(node_id, prop, entry_idx, param_idx)    DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_ADDRESS_IDX_, param_idx)
 Get the child address element from a mapping entry, by index.
 
#define DT_MAP_ENTRY_CHILD_ADDRESS(node_id, prop, entry_idx)    DT_MAP_ENTRY_CHILD_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)
 Get the first child address element from a mapping entry.
 
#define DT_MAP_ENTRY_CHILD_SPECIFIER_LEN(node_id, prop, entry_idx)    DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_SPECIFIER_LEN)
 Get the number of child specifiers.
 
#define DT_MAP_ENTRY_HAS_CHILD_SPECIFIER_BY_IDX(node_id, prop, entry_idx, param_idx)
 Checks if the child specifier has the specified index.
 
#define DT_MAP_ENTRY_HAS_CHILD_SPECIFIER(node_id, prop, entry_idx)    DT_MAP_ENTRY_HAS_CHILD_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)
 Checks if the mapping entry has any child specifiers.
 
#define DT_MAP_ENTRY_CHILD_SPECIFIER_BY_IDX(node_id, prop, entry_idx, param_idx)    DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_SPECIFIER_IDX_, param_idx)
 Get the child specifier element from a mapping entry, by index.
 
#define DT_MAP_ENTRY_CHILD_SPECIFIER(node_id, prop, entry_idx)    DT_MAP_ENTRY_CHILD_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)
 Get the first child specifier element from a mapping entry.
 
#define DT_MAP_ENTRY_PARENT_BY_IDX(node_id, prop, entry_idx)    DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT)
 Extracts the parent node from a mapping entry.
 
#define DT_MAP_ENTRY_PARENT(node_id, prop)    DT_MAP_ENTRY_PARENT_BY_IDX(node_id, prop, 0)
 Extracts the parent node from the first mapping entry.
 
#define DT_MAP_ENTRY_PARENT_ADDRESS_LEN(node_id, prop, entry_idx)    DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_ADDRESS_LEN)
 Get the number of parent addresses.
 
#define DT_MAP_ENTRY_HAS_PARENT_ADDRESS_BY_IDX(node_id, prop, entry_idx, param_idx)
 Checks if the parent address has the specified index.
 
#define DT_MAP_ENTRY_HAS_PARENT_ADDRESS(node_id, prop, entry_idx)    DT_MAP_ENTRY_HAS_PARENT_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)
 Checks if the mapping entry has any parent addresses.
 
#define DT_MAP_ENTRY_PARENT_ADDRESS_BY_IDX(node_id, prop, entry_idx, param_idx)    DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_ADDRESS_IDX_, param_idx)
 Get the parent address element from a mapping entry, by index.
 
#define DT_MAP_ENTRY_PARENT_ADDRESS(node_id, prop, entry_idx)    DT_MAP_ENTRY_PARENT_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)
 Get the first parent address element from a mapping entry.
 
#define DT_MAP_ENTRY_PARENT_SPECIFIER_LEN(node_id, prop, entry_idx)    DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_SPECIFIER_LEN)
 Get the number of parent specifiers.
 
#define DT_MAP_ENTRY_HAS_PARENT_SPECIFIER_BY_IDX(node_id, prop, entry_idx, param_idx)
 Checks if the parent specifier has the specified index.
 
#define DT_MAP_ENTRY_HAS_PARENT_SPECIFIER(node_id, prop, entry_idx)    DT_MAP_ENTRY_HAS_PARENT_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)
 Checks if the mapping entry has any parent specifiers.
 
#define DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX(node_id, prop, entry_idx, param_idx)    DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_SPECIFIER_IDX_, param_idx)
 Get the parent specifier element from a mapping entry, by index.
 
#define DT_MAP_ENTRY_PARENT_SPECIFIER(node_id, prop, entry_idx)    DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)
 Get the first parent specifier element from a mapping entry.
 
#define DT_FOREACH_MAP_ENTRY(node_id, prop, fn)   DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY)(fn)
 Invokes fn for each map entry in the map.
 
#define DT_FOREACH_MAP_ENTRY_SEP(node_id, prop, fn, sep)    DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY_SEP)(fn, sep)
 Invokes fn for each map entry in the map with separator.
 
#define DT_FOREACH_MAP_ENTRY_VARGS(node_id, prop, fn, ...)    DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY_VARGS)(fn, __VA_ARGS__)
 Invokes fn for each map entry in the map with separator.
 
#define DT_FOREACH_MAP_ENTRY_SEP_VARGS(node_id, prop, fn, sep, ...)    DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY_SEP_VARGS)(fn, sep, __VA_ARGS__)
 Invokes fn for each map entry in the map with separator.
 

Detailed Description

Macro Definition Documentation

◆ DT_FOREACH_MAP_ENTRY

#define DT_FOREACH_MAP_ENTRY (   node_id,
  prop,
  fn 
)    DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY)(fn)

#include <zephyr/devicetree/map.h>

Invokes fn for each map entry in the map.

Parameters
node_idnode identifier
propThe map property name. i.e. "gpio_map"
fnmacro to invoke
See also
DT_FOREACH_PROP_ELEM

◆ DT_FOREACH_MAP_ENTRY_SEP

#define DT_FOREACH_MAP_ENTRY_SEP (   node_id,
  prop,
  fn,
  sep 
)     DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY_SEP)(fn, sep)

#include <zephyr/devicetree/map.h>

Invokes fn for each map entry in the map with separator.

Parameters
node_idnode identifier
propThe map property name. i.e. "gpio_map"
fnmacro to invoke
sepSeparator (e.g. comma or semicolon). Must be in parentheses; this is required to enable providing a comma as separator.
See also
DT_FOREACH_PROP_ELEM_SEP

◆ DT_FOREACH_MAP_ENTRY_SEP_VARGS

#define DT_FOREACH_MAP_ENTRY_SEP_VARGS (   node_id,
  prop,
  fn,
  sep,
  ... 
)     DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY_SEP_VARGS)(fn, sep, __VA_ARGS__)

#include <zephyr/devicetree/map.h>

Invokes fn for each map entry in the map with separator.

Parameters
node_idnode identifier
propThe map property name. i.e. "gpio_map"
fnmacro to invoke
sepSeparator (e.g. comma or semicolon). Must be in parentheses; this is required to enable providing a comma as separator.
...variable number of arguments to pass to fn
See also
DT_FOREACH_PROP_ELEM_SEP_VARGS

◆ DT_FOREACH_MAP_ENTRY_VARGS

#define DT_FOREACH_MAP_ENTRY_VARGS (   node_id,
  prop,
  fn,
  ... 
)     DT_CAT4(node_id, _P_, prop, _FOREACH_MAP_ENTRY_VARGS)(fn, __VA_ARGS__)

#include <zephyr/devicetree/map.h>

Invokes fn for each map entry in the map with separator.

Parameters
node_idnode identifier
propThe map property name. i.e. "gpio_map"
fnmacro to invoke
...variable number of arguments to pass to fn
See also
DT_FOREACH_PROP_ELEM_VARGS

◆ DT_MAP_ENTRY_CHILD_ADDRESS

#define DT_MAP_ENTRY_CHILD_ADDRESS (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_CHILD_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Get the first child address element from a mapping entry.

Equivalent to calling DT_MAP_ENTRY_CHILD_ADDRESS_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Returns
The element of the specified position of the child addresses.

◆ DT_MAP_ENTRY_CHILD_ADDRESS_BY_IDX

#define DT_MAP_ENTRY_CHILD_ADDRESS_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)     DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_ADDRESS_IDX_, param_idx)

#include <zephyr/devicetree/map.h>

Get the child address element from a mapping entry, by index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the child addresses.
Returns
The element of the specified position of the child addresses.

◆ DT_MAP_ENTRY_CHILD_ADDRESS_LEN

#define DT_MAP_ENTRY_CHILD_ADDRESS_LEN (   node_id,
  prop,
  entry_idx 
)     DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_ADDRESS_LEN)

#include <zephyr/devicetree/map.h>

Get the number of child addresses.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Returns
The number of child addresses.

◆ DT_MAP_ENTRY_CHILD_SPECIFIER

#define DT_MAP_ENTRY_CHILD_SPECIFIER (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_CHILD_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Get the first child specifier element from a mapping entry.

Equivalent to calling DT_MAP_ENTRY_CHILD_SPECIFIER_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Returns
The element of the specified position of the child specifiers.

◆ DT_MAP_ENTRY_CHILD_SPECIFIER_BY_IDX

#define DT_MAP_ENTRY_CHILD_SPECIFIER_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)     DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_SPECIFIER_IDX_, param_idx)

#include <zephyr/devicetree/map.h>

Get the child specifier element from a mapping entry, by index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the child specifiers.
Returns
The element of the specified position of the child specifiers.

◆ DT_MAP_ENTRY_CHILD_SPECIFIER_LEN

#define DT_MAP_ENTRY_CHILD_SPECIFIER_LEN (   node_id,
  prop,
  entry_idx 
)     DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_SPECIFIER_LEN)

#include <zephyr/devicetree/map.h>

Get the number of child specifiers.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Returns
The number of child specifiers.

◆ DT_MAP_ENTRY_HAS_CHILD_ADDRESS

#define DT_MAP_ENTRY_HAS_CHILD_ADDRESS (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_HAS_CHILD_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Checks if the mapping entry has any child addresses.

Equivalent to calling DT_MAP_ENTRY_HAS_CHILD_ADDRESS_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Trueif the child address has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_CHILD_ADDRESS_BY_IDX

#define DT_MAP_ENTRY_HAS_CHILD_ADDRESS_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)

#include <zephyr/devicetree/map.h>

Value:
IS_ENABLED(DT_CAT8(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_ADDRESS_IDX_, \
param_idx, _EXISTS))
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:154

Checks if the child address has the specified index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the child addresses.
Return values
Trueif the child address has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_CHILD_SPECIFIER

#define DT_MAP_ENTRY_HAS_CHILD_SPECIFIER (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_HAS_CHILD_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Checks if the mapping entry has any child specifiers.

Equivalent to calling DT_MAP_ENTRY_HAS_CHILD_SPECIFIER_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Trueif the child specifier has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_CHILD_SPECIFIER_BY_IDX

#define DT_MAP_ENTRY_HAS_CHILD_SPECIFIER_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)

#include <zephyr/devicetree/map.h>

Value:
IS_ENABLED(DT_CAT8(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _CHILD_SPECIFIER_IDX_, \
param_idx, _EXISTS))

Checks if the child specifier has the specified index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the child specifiers.
Return values
Trueif the child specifier has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_PARENT_ADDRESS

#define DT_MAP_ENTRY_HAS_PARENT_ADDRESS (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_HAS_PARENT_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Checks if the mapping entry has any parent addresses.

Equivalent to calling DT_MAP_ENTRY_HAS_PARENT_ADDRESS_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Trueif the parent address has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_PARENT_ADDRESS_BY_IDX

#define DT_MAP_ENTRY_HAS_PARENT_ADDRESS_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)

#include <zephyr/devicetree/map.h>

Value:
IS_ENABLED(DT_CAT8(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_ADDRESS_IDX_, \
param_idx, _EXISTS))

Checks if the parent address has the specified index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the parent addresses.
Return values
Trueif the parent address has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_PARENT_SPECIFIER

#define DT_MAP_ENTRY_HAS_PARENT_SPECIFIER (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_HAS_PARENT_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Checks if the mapping entry has any parent specifiers.

Equivalent to calling DT_MAP_ENTRY_HAS_PARENT_SPECIFIER_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Trueif the parent specifier has the index, otherwise 0.

◆ DT_MAP_ENTRY_HAS_PARENT_SPECIFIER_BY_IDX

#define DT_MAP_ENTRY_HAS_PARENT_SPECIFIER_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)

#include <zephyr/devicetree/map.h>

Value:
IS_ENABLED(DT_CAT8(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_SPECIFIER_IDX_, \
param_idx, _EXISTS))

Checks if the parent specifier has the specified index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the parent specifiers.
Return values
Trueif the parent specifier has the index, otherwise 0.

◆ DT_MAP_ENTRY_PARENT

#define DT_MAP_ENTRY_PARENT (   node_id,
  prop 
)     DT_MAP_ENTRY_PARENT_BY_IDX(node_id, prop, 0)

#include <zephyr/devicetree/map.h>

Extracts the parent node from the first mapping entry.

Equivalent to calling DT_MAP_ENTRY_PARENT_BY_IDX with entry_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
Returns
The parent node id.

◆ DT_MAP_ENTRY_PARENT_ADDRESS

#define DT_MAP_ENTRY_PARENT_ADDRESS (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_PARENT_ADDRESS_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Get the first parent address element from a mapping entry.

Equivalent to calling DT_MAP_ENTRY_PARENT_ADDRESS_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Theelement of the specified position of the parent addresses.

◆ DT_MAP_ENTRY_PARENT_ADDRESS_BY_IDX

#define DT_MAP_ENTRY_PARENT_ADDRESS_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)     DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_ADDRESS_IDX_, param_idx)

#include <zephyr/devicetree/map.h>

Get the parent address element from a mapping entry, by index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the parent addresses.
Return values
Theelement of the specified position of the parent addresses.

◆ DT_MAP_ENTRY_PARENT_ADDRESS_LEN

#define DT_MAP_ENTRY_PARENT_ADDRESS_LEN (   node_id,
  prop,
  entry_idx 
)     DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_ADDRESS_LEN)

#include <zephyr/devicetree/map.h>

Get the number of parent addresses.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Returns
The number of parent addresses.

◆ DT_MAP_ENTRY_PARENT_BY_IDX

#define DT_MAP_ENTRY_PARENT_BY_IDX (   node_id,
  prop,
  entry_idx 
)     DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT)

#include <zephyr/devicetree/map.h>

Extracts the parent node from a mapping entry.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Returns
The parent node id.

◆ DT_MAP_ENTRY_PARENT_SPECIFIER

#define DT_MAP_ENTRY_PARENT_SPECIFIER (   node_id,
  prop,
  entry_idx 
)     DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX(node_id, prop, entry_idx, 0)

#include <zephyr/devicetree/map.h>

Get the first parent specifier element from a mapping entry.

Equivalent to calling DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX with param_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Theelement of the specified position of the parent specifiers.

◆ DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX

#define DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX (   node_id,
  prop,
  entry_idx,
  param_idx 
)     DT_CAT7(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_SPECIFIER_IDX_, param_idx)

#include <zephyr/devicetree/map.h>

Get the parent specifier element from a mapping entry, by index.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
param_idxThe index in the parent specifiers.
Return values
Theelement of the specified position of the parent specifiers.

◆ DT_MAP_ENTRY_PARENT_SPECIFIER_LEN

#define DT_MAP_ENTRY_PARENT_SPECIFIER_LEN (   node_id,
  prop,
  entry_idx 
)     DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _PARENT_SPECIFIER_LEN)

#include <zephyr/devicetree/map.h>

Get the number of parent specifiers.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxThe mapping entry index.
Return values
Thenumber of parent specifiers.

◆ DT_MAP_HAS_ENTRY

#define DT_MAP_HAS_ENTRY (   node_id,
  prop 
)    DT_MAP_HAS_ENTRY_BY_IDX(node_id, prop, 0)

#include <zephyr/devicetree/map.h>

Checks if the map property has any entries.

Equivalent to calling DT_MAP_HAS_ENTRY_BY_IDX with entry_idx set to zero.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
Returns
An expression which evaluates to 1 if idx is a valid index into the given property, and 0 otherwise.

◆ DT_MAP_HAS_ENTRY_BY_IDX

#define DT_MAP_HAS_ENTRY_BY_IDX (   node_id,
  prop,
  entry_idx 
)     IS_ENABLED(DT_CAT6(node_id, _P_, prop, _MAP_ENTRY_, entry_idx, _EXISTS))

#include <zephyr/devicetree/map.h>

Is index idx valid for an array type property?

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
entry_idxindex to check
Returns
An expression which evaluates to 1 if idx is a valid index into the given property, and 0 otherwise.

◆ DT_MAP_LEN

#define DT_MAP_LEN (   node_id,
  prop 
)    DT_PROP_LEN(node_id, prop)

#include <zephyr/devicetree/map.h>

Returns the number of maps for the given property.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
Returns
The total count of mapping entries.
See also
DT_PROP_LEN

◆ DT_NODE_HAS_MAP

#define DT_NODE_HAS_MAP (   node_id,
  prop 
)    DT_NODE_HAS_PROP(node_id, prop)

#include <zephyr/devicetree/map.h>

Returns the existence of map property.

Parameters
node_idThe node identifier.
propThe map property name. i.e. "gpio_map"
Return values
Trueif the map exists, otherwise 0.
See also
DT_NODE_HAS_PROP