Skip to content

Commit db9faa3

Browse files
keith-zephyrmbolivar-nordic
authored andcommitted
devicetree: Fix DT_FOREACH_PROP_ELEM_SEP example
Change the DT_FOREACH_PROP_ELEM_SEP example documented to use the correct macro GPIO_DT_SPEC_GET_BY_IDX() instead of GPIO_DT_SPEC_BY_IDX(). Signed-off-by: Keith Short <keithshort@google.com>
1 parent 5b6338d commit db9faa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/zephyr/devicetree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,7 +2594,7 @@
25942594
* @code{.c}
25952595
* struct gpio_dt_spec specs[] = {
25962596
* DT_FOREACH_PROP_ELEM_SEP(DT_NODELABEL(n), my_gpios,
2597-
* GPIO_DT_SPEC_BY_IDX, (,))
2597+
* GPIO_DT_SPEC_GET_BY_IDX, (,))
25982598
* };
25992599
* @endcode
26002600
*
@@ -2603,8 +2603,8 @@
26032603
* @code{.c}
26042604
* struct gpio_dt_spec specs[] = {
26052605
* struct gpio_dt_spec specs[] = {
2606-
* GPIO_DT_SPEC_BY_IDX(DT_NODELABEL(n), my_gpios, 0),
2607-
* GPIO_DT_SPEC_BY_IDX(DT_NODELABEL(n), my_gpios, 1)
2606+
* GPIO_DT_SPEC_GET_BY_IDX(DT_NODELABEL(n), my_gpios, 0),
2607+
* GPIO_DT_SPEC_GET_BY_IDX(DT_NODELABEL(n), my_gpios, 1)
26082608
* };
26092609
* @endcode
26102610
*

0 commit comments

Comments
 (0)