From 5dd5400ee19d71d1e938b87f0ed1e8de691d4309 Mon Sep 17 00:00:00 2001 From: "Martine S. Lenders" Date: Thu, 21 Nov 2024 13:08:08 +0100 Subject: [PATCH] feather-nrf52840: add config for NeoPixel LED --- boards/feather-nrf52840/Makefile.dep | 1 + boards/feather-nrf52840/include/board.h | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/boards/feather-nrf52840/Makefile.dep b/boards/feather-nrf52840/Makefile.dep index 3c0513a610..8e0754d06d 100644 --- a/boards/feather-nrf52840/Makefile.dep +++ b/boards/feather-nrf52840/Makefile.dep @@ -1,5 +1,6 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio + USEMODULE += ws281x endif # include common nrf52 dependencies diff --git a/boards/feather-nrf52840/include/board.h b/boards/feather-nrf52840/include/board.h index f1a8e44540..465eb31b34 100644 --- a/boards/feather-nrf52840/include/board.h +++ b/boards/feather-nrf52840/include/board.h @@ -57,6 +57,21 @@ extern "C" { #define BTN0_MODE GPIO_IN_PU /** @} */ +/** + * @name WS281x RGB LEDs configuration + * @{ + */ +#ifndef WS281X_PARAM_PIN +/** + * @brief GPIO pin connected to the data pin of the first LED + */ +#define WS281X_PARAM_PIN GPIO_PIN(0, 16) +#endif +#ifndef WS281X_PARAM_NUMOF +#define WS281X_PARAM_NUMOF (1U) /**< Number of LEDs chained */ +#endif +/** @} */ + #ifdef __cplusplus } #endif