From 4402e4fbc7bc79206589d3006fde802c4ba70ec7 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 18 Aug 2020 11:20:15 -0400 Subject: feeature(bt): Add "unpair combo" on startup. * Especially for splits, we need the ability to unpair all paired devices as sledgehammer if we need to "reset things", and doing so via keymaps isn't suitable. * Allows shields to define a collection of key positions that if all held 2 seconds after startup, will unpair all existing pairs for the device. --- app/boards/shields/lily58/lily58.dtsi | 4 ++++ app/boards/shields/lily58/lily58_left.conf | 3 ++- app/boards/shields/lily58/lily58_left.overlay | 3 +++ app/boards/shields/lily58/lily58_right.conf | 1 + app/boards/shields/lily58/lily58_right.overlay | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) (limited to 'app/boards/shields/lily58') diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index 8655d8c..cbda523 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -44,6 +44,10 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) ; }; + + bt_unpair_combo: bt_unpair_combo { + compatible = "zmk,bt-unpair-combo"; + }; }; &pro_micro_i2c { diff --git a/app/boards/shields/lily58/lily58_left.conf b/app/boards/shields/lily58/lily58_left.conf index e51dee4..338fa59 100644 --- a/app/boards/shields/lily58/lily58_left.conf +++ b/app/boards/shields/lily58/lily58_left.conf @@ -1,2 +1,3 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y +CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/lily58/lily58_left.overlay b/app/boards/shields/lily58/lily58_left.overlay index c8e2213..c6f630f 100644 --- a/app/boards/shields/lily58/lily58_left.overlay +++ b/app/boards/shields/lily58/lily58_left.overlay @@ -17,3 +17,6 @@ ; }; +&bt_unpair_combo { + key-positions = <0 42>; +}; diff --git a/app/boards/shields/lily58/lily58_right.conf b/app/boards/shields/lily58/lily58_right.conf index 990cf7c..cf16779 100644 --- a/app/boards/shields/lily58/lily58_right.conf +++ b/app/boards/shields/lily58/lily58_right.conf @@ -1,2 +1,3 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y +CONFIG_ZMK_BLE_UNPAIR_COMBO=y diff --git a/app/boards/shields/lily58/lily58_right.overlay b/app/boards/shields/lily58/lily58_right.overlay index 748be14..84f0b06 100644 --- a/app/boards/shields/lily58/lily58_right.overlay +++ b/app/boards/shields/lily58/lily58_right.overlay @@ -21,3 +21,6 @@ ; }; +&bt_unpair_combo { + key-positions = <11 43>; +}; -- cgit v1.2.3