This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new fa666a62056 boards/arm/nrf52/xiao-nrf52840: Configure the LEDs off.
fa666a62056 is described below

commit fa666a6205607b9cae5ed6767122dae78d77d7f1
Author: Max Kriegleder <[email protected]>
AuthorDate: Sat Oct 24 12:44:37 2026 +0200

    boards/arm/nrf52/xiao-nrf52840: Configure the LEDs off.
    
    The RGB LED is active low (board.h: "A low output illuminates the
    LED"), but GPIO_LED1-3 configured their pins with GPIO_VALUE_ZERO, so
    all three colours lit the moment the pins were configured. With
    USERLED the LED showed white from boot until an application first set
    it; with ARCH_LEDS every state started from white instead of the
    pattern in board.h.
    
    Configure the pins high, i.e. off.
    
    Assisted-by: Claude:claude-opus-5-5
    Signed-off-by: Max Kriegleder <[email protected]>
---
 boards/arm/nrf52/xiao-nrf52840/src/xiao-nrf52840.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/boards/arm/nrf52/xiao-nrf52840/src/xiao-nrf52840.h 
b/boards/arm/nrf52/xiao-nrf52840/src/xiao-nrf52840.h
index 3f04020c833..f1b96957cd1 100644
--- a/boards/arm/nrf52/xiao-nrf52840/src/xiao-nrf52840.h
+++ b/boards/arm/nrf52/xiao-nrf52840/src/xiao-nrf52840.h
@@ -56,11 +56,13 @@
  *   RGB_RED   - P0-26
  *   RGB_GREEN - P0-30
  *   RGB_BLUE  - P0-6
+ *
+ * Active low: configured high, i.e. off.
  */
 
-#define GPIO_LED1  (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN(6))
-#define GPIO_LED2  (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN(26))
-#define GPIO_LED3  (GPIO_OUTPUT | GPIO_VALUE_ZERO | GPIO_PORT0 | GPIO_PIN(30))
+#define GPIO_LED1  (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT0 | GPIO_PIN(6))
+#define GPIO_LED2  (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT0 | GPIO_PIN(26))
+#define GPIO_LED3  (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT0 | GPIO_PIN(30))
 
 /* Button definitions *******************************************************/
 

Reply via email to