Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Tranchida <jason.tranchida@oculus.com>2019-06-29 06:40:57 +0300
committerJason Tranchida <jason.tranchida@oculus.com>2019-10-12 21:49:25 +0300
commit0f915c295f7a1d7486e3c29ff3b04947bb65e892 (patch)
tree915906b1bad960c2f32a330f7cfdf255930d9f3b
parent8b31b643e42d8a53a3df9abc96bf45f00adf52df (diff)
Fix compilation for nRF5 boards with a single GPIO port
nrf52832, nrf52810, and nrf52811 have a single GPIO port, and do not define NRF_P1_BASE. If NRF_P1_BASE is not defined, do not define the generated structures requried to access GPIO port 1.
-rw-r--r--platforms/arm/nrf52/fastpin_arm_nrf52.h3
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 75260004..e0356630 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*