From 4a669032dcc55012e1e60bd66f2619599b332a6f Mon Sep 17 00:00:00 2001 From: Wilson Date: Sat, 30 Aug 2025 08:37:18 +0800 Subject: [PATCH] Change user button to cancel button on meshtiny. (#7789) --- variants/nrf52840/meshtiny/platformio.ini | 10 +--------- variants/nrf52840/meshtiny/variant.h | 9 +++------ 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/variants/nrf52840/meshtiny/platformio.ini b/variants/nrf52840/meshtiny/platformio.ini index ef744a1c3..5f03f5cb2 100644 --- a/variants/nrf52840/meshtiny/platformio.ini +++ b/variants/nrf52840/meshtiny/platformio.ini @@ -4,15 +4,7 @@ extends = nrf52840_base board = meshtiny board_level = extra build_flags = ${nrf52840_base.build_flags} -Ivariants/nrf52840/meshtiny -D MESHTINY - -DGPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. - -DRADIOLIB_EXCLUDE_SX128X=1 - -DRADIOLIB_EXCLUDE_SX127X=1 - -DRADIOLIB_EXCLUDE_LR11X0=1 - -D INPUTDRIVER_ENCODER_TYPE=2 - -D INPUTDRIVER_ENCODER_UP=4 - -D INPUTDRIVER_ENCODER_DOWN=26 - -D INPUTDRIVER_ENCODER_BTN=28 - -D USE_PIN_BUZZER=PIN_BUZZER + -D USE_PIN_BUZZER -D MESHTASTIC_EXCLUDE_GPS=1 build_src_filter = ${nrf52_base.build_src_filter} +<../variants/nrf52840/meshtiny> lib_deps = diff --git a/variants/nrf52840/meshtiny/variant.h b/variants/nrf52840/meshtiny/variant.h index 83ad4c5b9..d1139b3be 100644 --- a/variants/nrf52840/meshtiny/variant.h +++ b/variants/nrf52840/meshtiny/variant.h @@ -21,8 +21,6 @@ #define MESHTINY -// #define RAK4630 - /** Master clock frequency */ #define VARIANT_MCK (64000000ul) @@ -76,11 +74,10 @@ extern "C" { * Buttons */ -#define PIN_BUTTON1 9 +#define CANCEL_BUTTON_PIN 9 #define BUTTON_NEED_PULLUP -#define PIN_BUTTON2 12 -#define PIN_BUTTON3 24 -#define PIN_BUTTON4 25 +#define CANCEL_BUTTON_ACTIVE_LOW true +#define CANCEL_BUTTON_ACTIVE_PULLUP false /* * Analog pins