zephyr/tests
Gerard Marull-Paretas fff9ecbc7f devicetree: add DT_(INST_)FOREACH_CHILD(_STATUS_OKAY)_SEP(_VARGS)
It is frequent to see in Devicetree code constructs like:

```c
 #define NAME_AND_COMMA(node_id) DT_NODE_FULL_NAME(node_id),

const char *child_names[] = {
	DT_FOREACH_CHILD(DT_NODELABEL(n), NAME_AND_COMMA)
};
```

That is, an auxiliary macro to append a separator character in
DT_FOREACH* macros. Non-DT API, e.g. FOR_EACH(), takes a separator
argument to avoid such intermediate macros.

This patch adds DT_FOREACH_CHILD_SEP (and instance/status okay/vargs
versions of it). They all take an extra argument: a separator. With this
change, the example above can be simplified to:

```c
const char *child_labels[] = {
	DT_FOREACH_CHILD(DT_NODELABEL(n), DT_NODE_FULL_NAME, (,))
};
```

Notes:
- Other DT_FOREACH* macros could/should be extended as well

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-30 16:19:57 +02:00
..
application_development arch/riscv: support CONFIG_CODE_DATA_RELOCATION 2022-08-24 10:08:06 +02:00
arch tests/arch/common: Add tests for the arch timing API 2022-08-29 16:09:50 -04:00
benchmarks tests: benchmarks: move the cmsis_dsp bathmath test to new ztest API 2022-08-23 20:08:59 +02:00
bluetooth Bluetooth: controller: llcp: fix unhandled rsp in periph phy upd proc 2022-08-26 11:56:33 +02:00
boards logging: adsp hda backend improvements 2022-08-26 21:33:10 -04:00
boot/uefi tests: migrate includes to <zephyr/...> 2022-05-06 20:02:14 +02:00
cmake/config_dir
crypto test: fix more legacy #include paths 2022-08-02 16:41:41 +01:00
drivers tests: drivers: move the led api test to new ztest API 2022-08-29 10:10:30 -04:00
kernel tests: kernel: poll: Disable on qemu_arc_hs6x 2022-08-29 16:57:18 +02:00
lib devicetree: add DT_(INST_)FOREACH_CHILD(_STATUS_OKAY)_SEP(_VARGS) 2022-08-30 16:19:57 +02:00
misc scripts/Kconfig: add dt_node_array_prop Kconfig functions 2022-08-18 12:21:33 +02:00
net tests: net: igmp: move to new ztest API 2022-08-30 14:18:41 +00:00
posix tests: samples: revert timeout change for FVP BaseR 2022-08-16 15:51:38 +02:00
subsys tests: log_stack: increase stack size for x86 and immediate mode 2022-08-30 12:49:31 +02:00
unit tests: unit: move the math_extra test to new ztest API 2022-08-23 16:22:59 +02:00
ztest tests: ztest: ztress: Disable on qemu_cortex_r5 2022-08-29 16:57:18 +02:00