feat(control-plane): add configurable Wi-Fi reset button

This commit is contained in:
chenjintao
2026-08-18 16:00:10 +08:00
parent 96f5e535d3
commit 22a409973e
10 changed files with 153 additions and 4 deletions
+52 -2
View File
@@ -389,8 +389,9 @@ menu "Example Configuration"
default y
help
Start the staged GPIO interrupt key input task for PTT, SW1,
and SW2. SW1 remains the turntable calibration input and is
also reported for post-boot button diagnostics.
SW2, and the optional Wi-Fi reset button. SW1 remains the
turntable calibration input and is also reported for post-boot
button diagnostics.
config TQ_KEY_INPUT_TASK_STACK
int "Key input task stack size"
@@ -448,6 +449,55 @@ menu "Example Configuration"
help
Ignore raw GPIO chatter briefly after a double-click has been emitted.
config TQ_RESET_BUTTON_ENABLE
bool "Enable Wi-Fi reset button"
default n
depends on TQ_KEY_INPUT_ENABLE
help
Enable a dedicated reset button. Holding the button for the
configured duration clears saved Wi-Fi credentials and then
restarts the device. Other persisted data is not changed.
config TQ_RESET_BUTTON_GPIO
int "Wi-Fi reset button GPIO"
default 14
range 0 48
depends on TQ_RESET_BUTTON_ENABLE
help
GPIO used for the dedicated Wi-Fi reset button when enabled.
GPIO14 is unassigned on the current board revision.
config TQ_RESET_BUTTON_ACTIVE_LEVEL
int "Wi-Fi reset button active level"
default 0
range 0 1
depends on TQ_RESET_BUTTON_ENABLE
help
Logic level that means the Wi-Fi reset button is pressed.
config TQ_RESET_BUTTON_PULLUP
bool "Enable Wi-Fi reset button pull-up"
default y
depends on TQ_RESET_BUTTON_ENABLE
help
Enable the internal pull-up for active-low wiring.
config TQ_RESET_BUTTON_PULLDOWN
bool "Enable Wi-Fi reset button pull-down"
default n
depends on TQ_RESET_BUTTON_ENABLE
help
Enable the internal pull-down for active-high wiring.
config TQ_RESET_BUTTON_LONG_PRESS_MS
int "Wi-Fi reset button hold duration (ms)"
default 5000
range 1000 15000
depends on TQ_RESET_BUTTON_ENABLE
help
Continuous press duration required before saved Wi-Fi
credentials are cleared and the device restarts.
choice TQ_PTT_INTERACTION_MODE
prompt "PTT interaction mode"
default TQ_PTT_MODE_CLICK_TO_TALK