Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
devicetree_regions.h File Reference

Go to the source code of this file.

Macros

#define LINKER_DT_REGION_FROM_NODE(name, attr, node_id)
 Generate a linker memory region from a devicetree node. More...
 

Macro Definition Documentation

◆ LINKER_DT_REGION_FROM_NODE

#define LINKER_DT_REGION_FROM_NODE (   name,
  attr,
  node_id 
)
Value:
COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), \
(_REGION_DECLARE(name, attr, node_id)), \
())
#define DT_NODE_HAS_STATUS(node_id, status)
Does a node identifier refer to a node with a status?
Definition: devicetree.h:1861
#define COND_CODE_1(_flag, _if_1_code, _else_code)
Insert code depending on whether _flag expands to 1 or not.
Definition: util_macro.h:156

Generate a linker memory region from a devicetree node.

If node_id refers to a node with status "okay", then this declares a linker memory region named name with attributes from attr.

Otherwise, it doesn't expand to anything.

Parameters
namename of the generated memory region
attrregion attributes to use (rx, rw, ...)
node_iddevicetree node identifier with a <reg> property defining region location and size.