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/src/ble.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/src/ble.c') diff --git a/app/src/ble.c b/app/src/ble.c index 71bbccd..686a536 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -190,6 +190,12 @@ static int zmk_ble_init(struct device *_arg) return 0; } +int zmk_ble_unpair_all() +{ + LOG_DBG(""); + return bt_unpair(BT_ID_DEFAULT, NULL); +}; + bool zmk_ble_handle_key_user(struct zmk_key_event *key_event) { zmk_key key = key_event->key; -- cgit v1.2.3