diff --git a/src/platform/nrf52/architecture.h b/src/platform/nrf52/architecture.h index 8ea2c3829..5c0bee44f 100644 --- a/src/platform/nrf52/architecture.h +++ b/src/platform/nrf52/architecture.h @@ -120,7 +120,13 @@ #endif #ifdef PIN_BUTTON2 -#define BUTTON_PIN_ALT PIN_BUTTON2 +#define BACK_BUTTON_PIN PIN_BUTTON2 +#ifndef BACK_BUTTON_ACTIVE_LOW +#define BACK_BUTTON_ACTIVE_LOW true +#endif +#ifndef BACK_BUTTON_ACTIVE_PULLUP +#define BACK_BUTTON_ACTIVE_PULLUP true +#endif #endif #ifdef PIN_BUTTON_TOUCH diff --git a/variants/ELECROW-ThinkNode-M2/variant.h b/variants/ELECROW-ThinkNode-M2/variant.h index a6bb40f1a..32c1e15b3 100644 --- a/variants/ELECROW-ThinkNode-M2/variant.h +++ b/variants/ELECROW-ThinkNode-M2/variant.h @@ -3,6 +3,8 @@ #define PIN_BUTTON1 47 // 功能键 #define PIN_BUTTON2 4 // 电源键 +#define BACK_BUTTON_ACTIVE_LOW false +#define BACK_BUTTON_ACTIVE_PULLUP false #define LED_POWER 6 #define ADC_V 42 @@ -60,4 +62,3 @@ #define HAS_GPS 0 #define BUTTON_PIN PIN_BUTTON1 -#define BUTTON_PIN_ALT PIN_BUTTON2 diff --git a/variants/link32_s3_v1/variant.h b/variants/link32_s3_v1/variant.h index 1f8a7435a..23cabe233 100644 --- a/variants/link32_s3_v1/variant.h +++ b/variants/link32_s3_v1/variant.h @@ -6,7 +6,7 @@ #define USE_SSD1306 #define BUTTON_PIN 0 // Button pin for this board -#define BUTTON_PIN_ALT 36 +#define BACK_BUTTON_PIN 36 #define HAS_NEOPIXEL // If defined, we will use the neopixel library #define NEOPIXEL_DATA 35 // Neopixel pin for this board diff --git a/variants/nano-g1-explorer/variant.h b/variants/nano-g1-explorer/variant.h index 3d5d71acc..f3640241a 100644 --- a/variants/nano-g1-explorer/variant.h +++ b/variants/nano-g1-explorer/variant.h @@ -3,9 +3,7 @@ #define I2C_SDA 21 #define I2C_SCL 22 -#define BUTTON_PIN 36 // The user button (information button) GPIO on the Nano G1 explorer -// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented -// anywhere. +#define BUTTON_PIN 36 // The user button (information button) GPIO on the Nano G1 explorer #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. // common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if diff --git a/variants/nano-g1/variant.h b/variants/nano-g1/variant.h index dd8355492..2521c3ffe 100644 --- a/variants/nano-g1/variant.h +++ b/variants/nano-g1/variant.h @@ -3,9 +3,7 @@ #define I2C_SDA 21 #define I2C_SCL 22 -#define BUTTON_PIN 36 // The middle button GPIO on the Nano G1 -// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented -// anywhere. +#define BUTTON_PIN 36 // The middle button GPIO on the Nano G1 #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. // common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if diff --git a/variants/station-g1/variant.h b/variants/station-g1/variant.h index 9a3c37b73..6c3a39261 100644 --- a/variants/station-g1/variant.h +++ b/variants/station-g1/variant.h @@ -6,9 +6,7 @@ #define I2C_SDA1 14 // Second i2c channel on external IO connector #define I2C_SCL1 15 // Second i2c channel on external IO connector -#define BUTTON_PIN 36 // The middle button GPIO on the Nano G1 -// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented -// anywhere. +#define BUTTON_PIN 36 // The middle button GPIO on the Nano G1 #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. // common pinout for their SX1262 vs RF95 modules - both can be enabled and we will probe at runtime for RF95 and if diff --git a/variants/tbeam-s3-core/variant.h b/variants/tbeam-s3-core/variant.h index cc706459f..dabd52980 100644 --- a/variants/tbeam-s3-core/variant.h +++ b/variants/tbeam-s3-core/variant.h @@ -7,8 +7,6 @@ #define I2C_SCL 18 // For QMC6310 sensors and screens #define BUTTON_PIN 0 // The middle button GPIO on the T-Beam S3 -// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented -// anywhere. // #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. #define LED_STATE_ON 0 // State when LED is lit diff --git a/variants/tbeam/variant.h b/variants/tbeam/variant.h index 32b55b345..5b521a2de 100644 --- a/variants/tbeam/variant.h +++ b/variants/tbeam/variant.h @@ -6,8 +6,6 @@ #define BUTTON_PIN 38 // The middle button GPIO on the T-Beam #define BUTTON_ACTIVE_LOW true #define BUTTON_ACTIVE_PULLUP true -// #define BUTTON_PIN_ALT 13 // Alternate GPIO for an external button if needed. Does anyone use this? It is not documented -// anywhere. #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Module. #define LED_STATE_ON 0 // State when LED is lit diff --git a/variants/unphone/variant.h b/variants/unphone/variant.h index eaf142721..422f0c4a9 100644 --- a/variants/unphone/variant.h +++ b/variants/unphone/variant.h @@ -59,7 +59,7 @@ #define BUTTON_PIN 21 // Button 3 - square - top button in landscape mode #define BUTTON_NEED_PULLUP // we do need a helping hand up -#define BUTTON_PIN_ALT 45 // Button 1 - triangle - bottom button in landscape mode +#define BACK_BUTTON_PIN 45 // Button 1 - triangle - bottom button in landscape mode #define I2C_SDA 3 // I2C pins for this board #define I2C_SCL 4