zephyr/tests/lib/devicetree/api
Martí Bolívar 74abb2bf95 devicetree: add first-class node label helpers
Add the following new macros:

- DT_FOREACH_NODELABEL
- DT_FOREACH_NODELABEL_VARGS
- DT_INST_FOREACH_NODELABEL
- DT_INST_FOREACH_NODELABEL_VARGS

These are for-each helpers for iterating over the node labels of a
devicetree node. Since node labels are unique in the entire
devicetree, their token representations can be useful as unique IDs in
code as well.

As a first user of these, add:

- DT_NODELABEL_STRING_ARRAY
- DT_INST_NODELABEL_STRING_ARRAY

The motivating use case for these macros is to allow looking up a
struct device by devicetree node label in Zephyr shell utilities.
The work on the shells themselves is deferred to other patches.

To make working with the string array helpers easier, add:

- DT_NUM_NODELABELS
- DT_INST_NUM_NODELABELS

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2024-06-12 18:49:54 +02:00
..
src devicetree: add first-class node label helpers 2024-06-12 18:49:54 +02:00
app.overlay drivers: can: remove initial bus-speed/bus-speed-data properties 2024-05-16 09:23:59 +02:00
CMakeLists.txt
prj.conf
README
testcase.yaml tests/lib/devicetree: Enable for native_sim 2023-11-27 16:06:42 +00:00

Test cases for the devicetree.h API.