diff options
author | Mark Kriegsman <1334634+kriegsman@users.noreply.github.com> | 2020-01-29 22:50:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-29 22:50:24 +0300 |
commit | 42441aaa2448c02480846ba6015180347ac61257 (patch) | |
tree | 7c1cc19d80595b4372cdf50d6a901a29afb84e94 | |
parent | b7e967263943a56b246d2c7b81e85d99a1c94322 (diff) | |
parent | 0f915c295f7a1d7486e3c29ff3b04947bb65e892 (diff) |
Merge pull request #900 from maddogjt/fix_nrf52_single_port
Fix compilation for NRF52 chips with a single GPIO port such as NRF52832
-rw-r--r-- | platforms/arm/nrf52/fastpin_arm_nrf52.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/platforms/arm/nrf52/fastpin_arm_nrf52.h b/platforms/arm/nrf52/fastpin_arm_nrf52.h index b761cfa8..e3da3898 100644 --- a/platforms/arm/nrf52/fastpin_arm_nrf52.h +++ b/platforms/arm/nrf52/fastpin_arm_nrf52.h @@ -77,11 +77,14 @@ struct __generated_struct_NRF_P0 { return NRF_P0_BASE; } }; +// Not all NRF52 chips have two ports. Only define if P1 is present. +#if defined(NRF_P1_BASE) struct __generated_struct_NRF_P1 { FASTLED_NRF52_INLINE_ATTRIBUTE constexpr static uintptr_t r() { return NRF_P1_BASE; } }; +#endif // The actual class template can then use a typename, for what is essentially a constexpr NRF_GPIO_Type* |