|
23 | 23 | DT_FOREACH_PROP_ELEM_VARGS(DT_PATH(zephyr_user), gpio_ports, ZARD_ACCUM_NGPIOS, \
|
24 | 24 | DT_PHANDLE_BY_IDX(n, p, i)) \
|
25 | 25 | DT_PHA_BY_IDX(n, p, i, pin)
|
26 |
| -#define DIGITAL_PIN_EXISTS(n, p, i, dev, num) \ |
27 |
| - (((dev == DT_REG_ADDR(DT_PHANDLE_BY_IDX(n, p, i))) && \ |
28 |
| - (num == DT_PHA_BY_IDX(n, p, i, pin))) \ |
29 |
| - ? 1 \ |
30 |
| - : 0) |
31 |
| - |
32 |
| -/* Check all pins are defined only once */ |
33 |
| -#define DIGITAL_PIN_CHECK_UNIQUE(i, _) \ |
34 |
| - ((DT_FOREACH_PROP_ELEM_SEP_VARGS( \ |
35 |
| - DT_PATH(zephyr_user), digital_pin_gpios, DIGITAL_PIN_EXISTS, (+), \ |
36 |
| - DT_REG_ADDR(DT_PHANDLE_BY_IDX(DT_PATH(zephyr_user), digital_pin_gpios, i)), \ |
37 |
| - DT_PHA_BY_IDX(DT_PATH(zephyr_user), digital_pin_gpios, i, pin))) == 1) |
38 |
| - |
39 |
| -#if !LISTIFY(DT_PROP_LEN(DT_PATH(zephyr_user), digital_pin_gpios), DIGITAL_PIN_CHECK_UNIQUE, (&&)) |
40 |
| -#error "digital_pin_gpios has duplicate definition" |
41 |
| -#endif |
42 |
| - |
43 |
| -#undef DIGITAL_PIN_CHECK_UNIQUE |
44 | 26 |
|
45 | 27 | #ifndef LED_BUILTIN
|
46 | 28 |
|
|
0 commit comments