Commit 7a54318d authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Martí Bolívar
Browse files

devicetree: add DT_INST_CHILD



Add the instance-based version of DT_CHILD.

Signed-off-by: default avatarGerard Marull-Paretas <gerard.marull@nordicsemi.no>
parent 61a44f1a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -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).
 *