Merge pull request #108 from petejohanson/bluetooth/unpair-combo-build-fixes
Build unpair combo behavior in if DT node is present.
This commit is contained in:
commit
b8b25f0c03
9 changed files with 7 additions and 16 deletions
|
@ -44,7 +44,7 @@ target_sources(app PRIVATE src/behaviors/behavior_none.c)
|
||||||
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_BLE_UNPAIR_COMBO app PRIVATE src/ble_unpair_combo.c)
|
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/ble_unpair_combo.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL app PRIVATE src/split_listener.c)
|
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL app PRIVATE src/split_listener.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL app PRIVATE src/split/bluetooth/service.c)
|
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL app PRIVATE src/split/bluetooth/service.c)
|
||||||
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL app PRIVATE src/split/bluetooth/central.c)
|
target_sources_ifdef(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL app PRIVATE src/split/bluetooth/central.c)
|
||||||
|
|
|
@ -45,12 +45,6 @@ menuconfig ZMK_BLE
|
||||||
|
|
||||||
if ZMK_BLE
|
if ZMK_BLE
|
||||||
|
|
||||||
config ZMK_BLE_UNPAIR_COMBO
|
|
||||||
bool "Enable BT unpair combo"
|
|
||||||
help
|
|
||||||
Adds a magic key combo that can be held on startup to remove all paired devices
|
|
||||||
default n
|
|
||||||
|
|
||||||
config ZMK_BLE_INIT_PRIORITY
|
config ZMK_BLE_INIT_PRIORITY
|
||||||
int "Init Priority"
|
int "Init Priority"
|
||||||
default 50
|
default 50
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_ZMK_SPLIT=y
|
CONFIG_ZMK_SPLIT=y
|
||||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
||||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_ZMK_SPLIT=y
|
CONFIG_ZMK_SPLIT=y
|
||||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
||||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_ZMK_SPLIT=y
|
CONFIG_ZMK_SPLIT=y
|
||||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
||||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_ZMK_SPLIT=y
|
CONFIG_ZMK_SPLIT=y
|
||||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
||||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_ZMK_SPLIT=y
|
CONFIG_ZMK_SPLIT=y
|
||||||
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y
|
||||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y
|
|
|
@ -1,3 +1,2 @@
|
||||||
CONFIG_ZMK_SPLIT=y
|
CONFIG_ZMK_SPLIT=y
|
||||||
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y
|
||||||
CONFIG_ZMK_BLE_UNPAIR_COMBO=y
|
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
#include <device.h>
|
#include <device.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
|
|
||||||
#include <logging/log.h>
|
|
||||||
|
|
||||||
#define DT_DRV_COMPAT zmk_bt_unpair_combo
|
#define DT_DRV_COMPAT zmk_bt_unpair_combo
|
||||||
|
|
||||||
|
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
|
||||||
|
|
||||||
|
#include <logging/log.h>
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zmk/ble.h>
|
#include <zmk/ble.h>
|
||||||
|
@ -78,3 +79,5 @@ ZMK_SUBSCRIPTION(zmk_ble_unpair_combo, position_state_changed);
|
||||||
SYS_INIT(zmk_ble_unpair_combo_init,
|
SYS_INIT(zmk_ble_unpair_combo_init,
|
||||||
APPLICATION,
|
APPLICATION,
|
||||||
CONFIG_APPLICATION_INIT_PRIORITY);
|
CONFIG_APPLICATION_INIT_PRIORITY);
|
||||||
|
|
||||||
|
#endif DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
|
||||||
|
|
Loading…
Reference in a new issue