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:
Diffstat (limited to 'platforms/arm/nrf52')
-rw-r--r--platforms/arm/nrf52/fastpin_arm_nrf52.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/platforms/arm/nrf52/fastpin_arm_nrf52.h b/platforms/arm/nrf52/fastpin_arm_nrf52.h
index 75260004..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*
@@ -290,7 +293,7 @@ public:
// _FL_DEFPIN(47, 47, 1);
//
-#define FL_DEFPIN(ARDUINO_PIN, BOARD_PIN, BOARD_PORT) \
+#define _FL_DEFPIN(ARDUINO_PIN, BOARD_PIN, BOARD_PORT) \
template<> class FastPin<ARDUINO_PIN> : \
public _ARMPIN< \
1u << (BOARD_PIN & 31u), \