button fixes

This commit is contained in:
liquidraver
2026-10-11 10:45:37 +02:00
parent 75543d4f22
commit 90370e461e
8 changed files with 76 additions and 1 deletions
@@ -24,3 +24,7 @@ CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
# PSRAM mode — ESP32-S3R8 is silicon-strapped OPI octal.
# Enable is auto-detected from DTS by Kconfig.psram; only the mode is set here.
CONFIG_SPIRAM_MODE_OCT=y
# ENTER is a 1 s long press of the user button: two of them do not fit in the
# default 500 ms confirmation window.
CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000
+18 -1
View File
@@ -34,9 +34,26 @@
* defined: it is also a light-sleep wake pin. */
gpios = <&gpio1 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; /* GPIO38 = gpio1 pin 6 */
label = "User Button";
zephyr,code = <INPUT_BTN_0>;
zephyr,code = <INPUT_KEY_0>;
};
};
/* Button chain — same mapping as RAK4631 / WisMesh Pocket (rak4631/board.overlay). */
user_btn_longpress {
compatible = "zephyr,input-longpress";
input = <&buttons>;
input-codes = <INPUT_KEY_0>;
short-codes = <INPUT_KEY_A>;
long-codes = <INPUT_KEY_ENTER>;
long-delay-ms = <1000>;
};
page_btn_multitap {
compatible = "zephcore,input-multi-tap";
input-codes = <INPUT_KEY_A>;
tap-codes = <INPUT_KEY_1 INPUT_KEY_LEFT>;
tap-delay-ms = <400>;
};
};
/* SX1262 + PA on SPI2 */
@@ -167,6 +167,9 @@ backwards.
| | | hold 1 s | page enter |
| Function (S2) | P0.14 | press | page previous |
Offgrid, DFU and Power Off ask for confirmation: hold the user button again
within 3 s. A tap instead pages on.
The datasheet calls P1.10 "Button1 / USER key" and P0.14 "Button2 / Function
key"; the schematic silkscreen labels are the other way round (S2 = "User1" on
P0.14, S3 = "User2" on P1.10). Pins are what matter.
@@ -35,3 +35,7 @@ CONFIG_ZEPHCORE_SD_FWID=0x00B6
# CFB mono-tft framebuffer = 160x80/8 = 1600 bytes, allocated from k_malloc.
# Default heap (2048) is sized tightly for SSD1306 128x64 (1024 bytes).
CONFIG_HEAP_MEM_POOL_SIZE=4096
# ENTER is a 1 s long press of the user button: two of them do not fit in the
# default 500 ms confirmation window.
CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000
@@ -14,3 +14,7 @@ CONFIG_ZEPHCORE_RADIO_LR2021=y
# still fits. This board additionally carries the OLED UI, so if RAM gets tight
# this is the first knob to turn.
CONFIG_ZEPHCORE_MAX_CONTACTS=450
# ENTER is a 1 s long press of the user button: two of them do not fit in the
# default 500 ms confirmation window.
CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000
@@ -20,3 +20,7 @@ CONFIG_ZEPHCORE_OFFLINE_QUEUE_SIZE=512
# layout, and the SPI NOR driver's default page is the 64 KB block, not the
# 4 KB sector (the QSPI driver's equivalent is set in nrf52_common.conf).
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
# ENTER is a 1 s long press of the user button: two of them do not fit in the
# default 500 ms confirmation window.
CONFIG_ZEPHCORE_UI_CONFIRM_WINDOW_MS=3000