zephyr/tests/lib/devicetree/api
Martí Bolívar 9c229a417c devicetree: add DT_FOREACH_PROP_ELEM(node_id, prop, fn)
It can be convenient to "iterate" over the elements of a property, in
the same way it is convenient to "iterate" over enabled instances.

Add a new macro for doing this, along with a DT_INST_FOREACH_PROP_ELEM
variant.

This is likely to be more convenient than UTIL_LISTIFY or FOR_EACH in
some situations because:

- it handles inputs of any length
- compiler error messages will be shorter and more self-contained
- it is easier to use with phandle-array type properties, which
  require more complicated macro boilerplate when used with
  util_macro.h APIs

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-04-22 15:32:10 +02:00
..
src devicetree: add DT_FOREACH_PROP_ELEM(node_id, prop, fn) 2021-04-22 15:32:10 +02:00
app.overlay devicetree: add DT_FOREACH_PROP_ELEM(node_id, prop, fn) 2021-04-22 15:32:10 +02:00
CMakeLists.txt
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.