Skip to content

Commit 308fbf7

Browse files
authored
Merge pull request #19 from soburi/codex/review-last-3-commits-for-documentation-issues-uh1j8t
docs/core: align LED_BUILTIN precedence and fix DTS docs
2 parents 67e5f05 + 6d5db31 commit 308fbf7

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

cores/arduino/Arduino.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,12 @@
161161
DT_MAP_ENTRY_PARENT_BY_IDX(DT_NODELABEL(ZARD_CONNECTOR), gpio_map, i)) + \
162162
DT_MAP_ENTRY_PARENT_SPECIFIER_BY_IDX(DT_NODELABEL(ZARD_CONNECTOR), gpio_map, i, 0)
163163

164-
#if DT_NODE_EXISTS(DT_ALIAS(led0))
164+
#if DT_NODE_HAS_PROP(DT_PATH(zephyr_user), builtin_led_gpios) && \
165+
(DT_PROP_LEN(DT_PATH(zephyr_user), builtin_led_gpios) > 0)
166+
#define ZARD_LED_BUILTIN \
167+
ZARD_GLOBAL_GPIO_OFFSET(DT_PHANDLE_BY_IDX(DT_PATH(zephyr_user), builtin_led_gpios, 0)) + \
168+
DT_PHA_BY_IDX(DT_PATH(zephyr_user), builtin_led_gpios, 0, pin)
169+
#elif DT_NODE_EXISTS(DT_ALIAS(led0))
165170
#define ZARD_LED_BUILTIN \
166171
ZARD_GLOBAL_GPIO_OFFSET(DT_PHANDLE_BY_IDX(DT_ALIAS(led0), gpios, 0)) + \
167172
DT_PHA_BY_IDX(DT_ALIAS(led0), gpios, 0, pin)

documentation/configuration-guide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ Two ways to reach it (**lowest precedence rule first**):
134134
/* ---- snip ---- */
135135
<ARDUINO_HEADER_R3_D15 0 &ioport1 0 0>;
136136
};
137+
};
137138
```
138139
139140
2. **Define `/zephyr,user/digital-pin-gpios`**

documentation/configuration-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ B. Board devicetree constructs (board-provided defaults)
203203
/* ---- snip ---- */
204204
<ARDUINO_HEADER_R3_D15 0 &ioport1 0 0>;
205205
};
206+
};
206207
```
207208
208209

0 commit comments

Comments
 (0)