summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/ble.c14
-rw-r--r--app/src/main.c8
2 files changed, 9 insertions, 13 deletions
diff --git a/app/src/ble.c b/app/src/ble.c
index 3cbb14d..809575d 100644
--- a/app/src/ble.c
+++ b/app/src/ble.c
@@ -128,8 +128,11 @@ static struct bt_conn_auth_cb zmk_ble_auth_cb_display = {
static const struct bt_data zmk_ble_ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
BT_DATA_BYTES(BT_DATA_UUID16_SOME,
+#if !IS_ENABLED(CONFIG_ZMK_SPLIT_BLE)
0x12, 0x18, /* HID Service */
- 0x0f, 0x18), /* Battery Service */
+#endif
+ 0x0f, 0x18 /* Battery Service */
+ ),
#if IS_ENABLED(CONFIG_ZMK_SPLIT_BLE)
BT_DATA_BYTES(BT_DATA_UUID128_ALL,
ZMK_SPLIT_BT_SERVICE_UUID)
@@ -155,10 +158,6 @@ static void zmk_ble_ready(int err)
static int zmk_ble_init(struct device *_arg)
{
- if (IS_ENABLED(CONFIG_SETTINGS))
- {
- settings_load();
- }
int err = bt_enable(NULL);
if (err)
@@ -167,6 +166,11 @@ static int zmk_ble_init(struct device *_arg)
return err;
}
+ if (IS_ENABLED(CONFIG_BT_SETTINGS))
+ {
+ settings_load();
+ }
+
bt_conn_cb_register(&conn_callbacks);
bt_conn_auth_cb_register(&zmk_ble_auth_cb_display);
diff --git a/app/src/main.c b/app/src/main.c
index b7d3a4b..e755304 100644
--- a/app/src/main.c
+++ b/app/src/main.c
@@ -16,10 +16,6 @@ LOG_MODULE_REGISTER(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/kscan.h>
#include <zmk/endpoints.h>
-#ifdef CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL
-#include <zmk/split/bluetooth/central.h>
-#endif /* CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL */
-
#define ZMK_KSCAN_DEV DT_LABEL(ZMK_MATRIX_NODE_ID)
void main(void)
@@ -30,8 +26,4 @@ void main(void)
{
return;
}
-
-#ifdef CONFIG_SETTINGS
- settings_load();
-#endif
}