diff --git a/app/Kconfig b/app/Kconfig index 58825fa5..32ec4355 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -127,9 +127,9 @@ menuconfig ZMK_BLE select BT_SMP_APP_PAIRING_ACCEPT select BT_PERIPHERAL select BT_DIS - select BT_SETTINGS - select SETTINGS - imply ZMK_BATTERY_REPORTING + imply BT_SETTINGS if !ARCH_POSIX + imply SETTINGS if !ARCH_POSIX + imply ZMK_BATTERY_REPORTING if !ARCH_POSIX if ZMK_BLE diff --git a/app/src/ble.c b/app/src/ble.c index a6e63cb5..a5f973a4 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -106,7 +106,9 @@ void set_profile_address(uint8_t index, const bt_addr_le_t *addr) { memcpy(&profiles[index].peer, addr, sizeof(bt_addr_le_t)); sprintf(setting_name, "ble/profiles/%d", index); LOG_DBG("Setting profile addr for %s to %s", setting_name, addr_str); +#if IS_ENABLED(CONFIG_SETTINGS) settings_save_one(setting_name, &profiles[index], sizeof(struct zmk_ble_profile)); +#endif k_work_submit(&raise_profile_changed_event_work); }