From 363cdb18f1c6af46910646ffd002e120b1e7465a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 6 Feb 2024 10:25:02 +1100 Subject: [PATCH] WS2812: Better error message when trying to use `bitbang` driver on RP2040 --- platforms/chibios/drivers/ws2812_bitbang.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platforms/chibios/drivers/ws2812_bitbang.c b/platforms/chibios/drivers/ws2812_bitbang.c index e3b735a1a693..883a845d8846 100644 --- a/platforms/chibios/drivers/ws2812_bitbang.c +++ b/platforms/chibios/drivers/ws2812_bitbang.c @@ -9,7 +9,11 @@ # if defined(STM32F0XX) || defined(STM32F1XX) || defined(GD32VF103) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(WB32F3G71xx) || defined(WB32FQ95xx) # define NOP_FUDGE 0.4 # else -# error("NOP_FUDGE configuration required") +# if defined(RP2040) +# error "Please use `vendor` WS2812 driver for RP2040" +# else +# error "NOP_FUDGE configuration required" +# endif # define NOP_FUDGE 1 // this just pleases the compile so the above error is easier to spot # endif #endif