Zephyr API 3.6.99
Loading...
Searching...
No Matches
Chosen nodes

Macros

#define DT_CHOSEN(prop)
 Get a node identifier for a /chosen node property.
 
#define DT_HAS_CHOSEN(prop)
 Test if the devicetree has a /chosen node.
 

Detailed Description

Macro Definition Documentation

◆ DT_CHOSEN

#define DT_CHOSEN ( prop)

#include <zephyr/devicetree.h>

Value:
DT_CAT(DT_CHOSEN_, prop)

Get a node identifier for a /chosen node property.

This is only valid to call if DT_HAS_CHOSEN(prop) is 1.

Parameters
proplowercase-and-underscores property name for the /chosen node
Returns
a node identifier for the chosen node property

◆ DT_HAS_CHOSEN

#define DT_HAS_CHOSEN ( prop)

#include <zephyr/devicetree.h>

Value:
IS_ENABLED(DT_CAT3(DT_CHOSEN_, prop, _EXISTS))
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:124

Test if the devicetree has a /chosen node.

Parameters
proplowercase-and-underscores devicetree property
Returns
1 if the chosen property exists and refers to a node, 0 otherwise