zephyr/tests/lib/devicetree/api
Martí Bolívar 56da140791 devicetree: add new for-each macros
Add two new for-each macros:

- DT_FOREACH_STATUS_OKAY(compat, fn)
- DT_FOREACH_STATUS_OKAY_VARGS(compat, fn, ...)

These can be used to expand "fn" once for every status "okay" node in
the devicetree which has a given compatible. The intended use case is
to allow doing something in C once for each node of a compatible,
but outside of a device driver.

E.g. an application might want to collect an array of structures for a
compatible, where each structure is initialized from a node.

In such cases we don't want people to be forced into using
DT_DRV_COMPAT and instance numbers, because that's in general a hint
that you're doing something driver-like.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-06 12:24:57 -05:00
..
src devicetree: add new for-each macros 2021-08-06 12:24:57 -05:00
app.overlay devicetree: Add DT_FOREACH_CHILD_STATUS_OKAY macro 2021-04-27 13:32:55 -04:00
CMakeLists.txt cmake: removing DTS_ROOTS in test samples as they serves no purpose 2020-07-03 12:18:04 -04:00
prj.conf
README
testcase.yaml tests/samples: enable for integration testing 2020-07-30 08:00:03 -04:00

Test cases for the devicetree.h API.