devicetree: add DT_INST_PARENT helper
Provide the instance based version of the DT_PARENT macro. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
20fd6e7cd1
commit
14860d8a97
1 changed files with 7 additions and 0 deletions
|
@ -325,6 +325,13 @@
|
||||||
*/
|
*/
|
||||||
#define DT_PARENT(node_id) UTIL_CAT(node_id, _PARENT)
|
#define DT_PARENT(node_id) UTIL_CAT(node_id, _PARENT)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get a DT_DRV_COMPAT parent's node identifier
|
||||||
|
* @param inst instance number
|
||||||
|
* @return a node identifier for the instance's parent
|
||||||
|
*/
|
||||||
|
#define DT_INST_PARENT(inst) DT_PARENT(DT_DRV_INST(inst))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get a node identifier for a grandparent node
|
* @brief Get a node identifier for a grandparent node
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue