mirror of https://github.com/zmkfirmware/zmk.git
feat(ble): introduce Kconfig option to disable Bluetooth profile advertising
This is useful for dongle mode with only USB output.
This commit is contained in:
parent
354cff9c36
commit
daa33dcfca
|
|
@ -210,6 +210,10 @@ config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE
|
|||
config ZMK_BLE_CLEAR_BONDS_ON_START
|
||||
bool "Configuration that clears all bond information from the keyboard on startup."
|
||||
|
||||
config ZMK_BLE_PROFILE_ADVERTISING
|
||||
bool "Advertise on BLE profiles"
|
||||
default y
|
||||
|
||||
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
|
||||
config BT_GATT_NOTIFY_MULTIPLE
|
||||
default n
|
||||
|
|
|
|||
|
|
@ -175,6 +175,13 @@ bool zmk_ble_profile_is_connected(uint8_t index) {
|
|||
advertising_status = ZMK_ADV_CONN;
|
||||
|
||||
int update_advertising(void) {
|
||||
#if IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
#if !IS_ENABLED(CONFIG_ZMK_BLE_PROFILE_ADVERTISING)
|
||||
LOG_INF("skipping advertising since profile advertising is disabled");
|
||||
return 0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int err = 0;
|
||||
bt_addr_le_t *addr;
|
||||
struct bt_conn *conn;
|
||||
|
|
|
|||
Loading…
Reference in New Issue