From 9f1cb2aff4749e137b58d6c2b90621527b56ff49 Mon Sep 17 00:00:00 2001 From: hathach Date: Thu, 9 May 2024 21:37:41 +0700 Subject: [PATCH] add PIN_NEOPIXEL_POWER as D34 for Feather nRF52840 Express RevE. Also set it as output, and write to HIGH as default --- variants/feather_nrf52840_express/variant.cpp | 8 ++++++-- variants/feather_nrf52840_express/variant.h | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/variants/feather_nrf52840_express/variant.cpp b/variants/feather_nrf52840_express/variant.cpp index d0ef4097..16462791 100644 --- a/variants/feather_nrf52840_express/variant.cpp +++ b/variants/feather_nrf52840_express/variant.cpp @@ -71,7 +71,9 @@ const uint32_t g_ADigitalPinMap[] = // The remaining NFC pin 9, // D33 is P0.09 (NFC1, exposed only via test point on bottom of board) - // Thus, there are 34 defined pins + 32+14, // D34 is P1.14 + + // Thus, there are 35 defined pins // The remaining pins are not usable: // @@ -92,7 +94,6 @@ const uint32_t g_ADigitalPinMap[] = // 43, // P1.11 is not connected per schematic // 44, // P1.12 is not connected per schematic // 45, // P1.13 is not connected per schematic - // 46, // P1.14 is not connected per schematic }; void initVariant() @@ -103,5 +104,8 @@ void initVariant() pinMode(PIN_LED2, OUTPUT); ledOff(PIN_LED2); + + pinMode(PIN_NEOPIXEL_POWER, OUTPUT); + digitalWrite(PIN_NEOPIXEL_POWER, HIGH); } diff --git a/variants/feather_nrf52840_express/variant.h b/variants/feather_nrf52840_express/variant.h index f112e0f8..59786641 100644 --- a/variants/feather_nrf52840_express/variant.h +++ b/variants/feather_nrf52840_express/variant.h @@ -37,14 +37,15 @@ extern "C" #endif // __cplusplus // Number of pins defined in PinDescription array -#define PINS_COUNT (34) -#define NUM_DIGITAL_PINS (34) +#define PINS_COUNT (35) +#define NUM_DIGITAL_PINS (35) #define NUM_ANALOG_INPUTS (6) // A6 is used for battery, A7 is analog reference #define NUM_ANALOG_OUTPUTS (0) // LEDs #define PIN_LED1 (3) #define PIN_LED2 (4) +#define PIN_NEOPIXEL_POWER (34) #define PIN_NEOPIXEL (8) #define NEOPIXEL_NUM 1