Commit 0e42a69
committed
fix: remove SDA/SCL/TX/RX intermediate macros from nRF52 board headers
The nRF52840 board headers were defining SDA, SCL, TX and RX as numeric
preprocessor macros (with #ifndef guards) and then assigning them to the
BOARD_I2C_SDA / BOARD_UART_RX aliases. This caused a cascade of parse
errors because board_config.h is included before Arduino.h, and the nRF52
SDK header nrf52.h declares struct members named SDA, SCL and RX — the
preprocessor replaces those identifiers with their numeric values, turning
valid struct declarations into syntax errors.
Fix: assign pin numbers directly to the BOARD_* macros so that SDA, SCL,
TX and RX are never defined as macros. The nRF52 platform variant still
exposes them as const uint8_t variables after Arduino.h is processed, which
is fine because our code only references the BOARD_* names.
Both nRF52840-DK and nRF52840 Feather headers are updated.
https://claude.ai/code/session_01KcwgryFgMCJubfjtwqMnUc1 parent 48c7183 commit 0e42a69
2 files changed
Lines changed: 23 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
52 | 42 | | |
53 | 43 | | |
54 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
43 | 34 | | |
44 | 35 | | |
45 | 36 | | |
| |||
0 commit comments