devicetree: add DT_INST_NUM_IRQS()
Add `DT_INST_NUM_IRQS()` to get the number of interrupt lines of the current `DT_DRV_COMPAT` Signed-off-by: Yong Cong Sin <ycsin@meta.com> Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
parent
707844ca56
commit
ee08ebd9ca
2 changed files with 11 additions and 0 deletions
|
@ -751,6 +751,9 @@ ZTEST(devicetree_api, test_irq)
|
|||
/* DT_INST */
|
||||
zassert_equal(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT), 1, "");
|
||||
|
||||
/* DT_INST_NUM_IRQS */
|
||||
zassert_equal(DT_INST_NUM_IRQS(0), 3);
|
||||
|
||||
/* DT_INST_IRQ_HAS_IDX */
|
||||
zassert_equal(DT_INST_IRQ_HAS_IDX(0, 0), 1, "");
|
||||
zassert_equal(DT_INST_IRQ_HAS_IDX(0, 1), 1, "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue