From 10b43a8f9fa2f1868b2149bdff2d45207b204500 Mon Sep 17 00:00:00 2001 From: Frieder Schrempf Date: Fri, 5 Dec 2025 12:39:37 +0100 Subject: [PATCH] variants: XIAO NRF52: Enable button pullup Some versions of the Wio-SX1262 board don't have the button and the pullup resistor populated. Enable the internal pullup to prevent a floating pin and spurious button presses on those boards. This fixes #1173. Signed-off-by: Frieder Schrempf --- variants/xiao_nrf52/XiaoNrf52Board.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/xiao_nrf52/XiaoNrf52Board.cpp b/variants/xiao_nrf52/XiaoNrf52Board.cpp index 69218926..f847c654 100644 --- a/variants/xiao_nrf52/XiaoNrf52Board.cpp +++ b/variants/xiao_nrf52/XiaoNrf52Board.cpp @@ -38,7 +38,7 @@ void XiaoNrf52Board::begin() { digitalWrite(VBAT_ENABLE, HIGH); #ifdef PIN_USER_BTN - pinMode(PIN_USER_BTN, INPUT); + pinMode(PIN_USER_BTN, INPUT_PULLUP); #endif #if defined(PIN_WIRE_SDA) && defined(PIN_WIRE_SCL)