From e4deac30606c70d94ccab55c324aa651788e3b60 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sat, 5 Oct 2024 19:12:26 +1300 Subject: [PATCH] add support for user button on rak wismesh pocket which uses RAK4630 internally --- Boards.h | 3 +++ RNode_Firmware.ino | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Boards.h b/Boards.h index ab97d62..81475a9 100644 --- a/Boards.h +++ b/Boards.h @@ -569,6 +569,7 @@ #define HAS_TCXO true #define HAS_RF_SWITCH_RX_TX true #define HAS_BUSY true + #define HAS_INPUT true #define DIO2_AS_RF_SWITCH true #define CONFIG_UART_BUFFER_SIZE 6144 #define CONFIG_QUEUE_SIZE 6144 @@ -578,6 +579,8 @@ #define BLE_MANUFACTURER "RAK Wireless" #define BLE_MODEL "RAK4640" + const int pin_btn_usr1 = 9; + // Following pins are for the sx1262 const int pin_rxen = 37; const int pin_reset = 38; diff --git a/RNode_Firmware.ino b/RNode_Firmware.ino index b91cb8a..80a0077 100644 --- a/RNode_Firmware.ino +++ b/RNode_Firmware.ino @@ -1389,7 +1389,7 @@ void sleep_now() { } void button_event(uint8_t event, unsigned long duration) { - #if MCU_VARIANT == MCU_ESP32 + #if MCU_VARIANT == MCU_ESP32 || MCU_VARIANT == MCU_NRF52 if (display_blanked) { display_unblank(); } else {