From 2d8220b0cb0bde81981e4778c95a5588246612f5 Mon Sep 17 00:00:00 2001 From: kevin Date: Sun, 2 Aug 2026 13:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E6=8B=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../diy/moonshine_NRF52_ebyte/variant.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/variants/nrf52840/diy/moonshine_NRF52_ebyte/variant.h b/variants/nrf52840/diy/moonshine_NRF52_ebyte/variant.h index 3d25736d4..fb2362a76 100644 --- a/variants/nrf52840/diy/moonshine_NRF52_ebyte/variant.h +++ b/variants/nrf52840/diy/moonshine_NRF52_ebyte/variant.h @@ -67,11 +67,11 @@ MOONSHINE NRF52 EBYTE PIN ASSIGNMENT (Ebyte nRF52840 + E22-400M33S) // LED - Bluetooth pairing status indicator #define LED_PAIRING (0 + 15) // P0.15 -#define LED_STATE_ON 1 // State when LED is lit (active high) +#define LED_STATE_ON 1 // State when LED is lit (active high) -// Charge detection (P0.13, active high = charging) +// Charge detection (P0.13, active high = charging, needs internal pull-down) #define EXT_CHRG_DETECT (0 + 13) -#define EXT_CHRG_DETECT_VALUE HIGH +#define EXT_CHRG_DETECT_MODE INPUT_PULLDOWN // Buzzer #define PIN_BUZZER (32 + 11) // P1.11 @@ -95,8 +95,8 @@ MOONSHINE NRF52 EBYTE PIN ASSIGNMENT (Ebyte nRF52840 + E22-400M33S) #define SPI_INTERFACES_COUNT 1 #define PIN_SPI_MISO (32 + 0) // P1.00 -#define PIN_SPI_MOSI (0 + 22) // P0.22 -#define PIN_SPI_SCK (0 + 20) // P0.20 +#define PIN_SPI_MOSI (0 + 22) // P0.22 +#define PIN_SPI_SCK (0 + 20) // P0.20 #define LORA_MISO PIN_SPI_MISO #define LORA_MOSI PIN_SPI_MOSI @@ -113,14 +113,14 @@ MOONSHINE NRF52 EBYTE PIN ASSIGNMENT (Ebyte nRF52840 + E22-400M33S) #define TX_GAIN_LORA 12 // SX126X CONFIG -#define SX126X_CS (0 + 17) // P0.17 FIXME - we really should define LORA_CS instead -#define SX126X_DIO1 (32 + 10) // P1.10 IRQ +#define SX126X_CS (0 + 17) // P0.17 FIXME - we really should define LORA_CS instead +#define SX126X_DIO1 (32 + 10) // P1.10 IRQ #define SX126X_DIO2_AS_RF_SWITCH // Note for E22 modules: DIO2 is not attached internally to TXEN for automatic TX/RX switching, // so it needs connecting externally if it is used in this way -#define SX126X_BUSY (0 + 28) // P0.28 (AIN4) -#define SX126X_RESET (32 + 13) // P1.13 -#define SX126X_RXEN (32 + 9) // P1.09 - E22 RXEN, MCU controls RX/TX RF switch path -#define SX126X_TXEN RADIOLIB_NC // DIO2 controls TXEN directly +#define SX126X_BUSY (0 + 28) // P0.28 (AIN4) +#define SX126X_RESET (32 + 13) // P1.13 +#define SX126X_RXEN (32 + 9) // P1.09 - E22 RXEN, MCU controls RX/TX RF switch path +#define SX126X_TXEN RADIOLIB_NC // DIO2 controls TXEN directly #define SX126X_DIO3_TCXO_VOLTAGE 1.8 #define TCXO_OPTIONAL // make it so that the firmware can try both TCXO and XTAL