devicetree: add DT_INST_CHILD
Add the instance-based version of DT_CHILD. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
61a44f1af2
commit
7a54318d35
|
@ -2711,6 +2711,18 @@
|
|||
*/
|
||||
#define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
|
||||
|
||||
/**
|
||||
* @brief Get a node identifier for a child node of DT_DRV_INST(inst)
|
||||
*
|
||||
* @param inst instance number
|
||||
* @param child lowercase-and-underscores child node name
|
||||
* @return node identifier for the node with the name referred to by 'child'
|
||||
*
|
||||
* @see DT_CHILD
|
||||
*/
|
||||
#define DT_INST_CHILD(inst, child) \
|
||||
DT_CHILD(DT_DRV_INST(inst), child)
|
||||
|
||||
/**
|
||||
* @brief Call "fn" on all child nodes of DT_DRV_INST(inst).
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue