summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-07-13 23:37:25 -0400
committerPete Johanson <peter@peterjohanson.com>2020-07-17 22:43:40 -0400
commitd1a5c7ee5ab7b3541ac45c4eef4c17d71475d645 (patch)
tree90690cd7c54b627d3f135ea75041171d6194368d
parentbe537d06565a38f5fcca8d5a1d0a7b7350b35d51 (diff)
Swtich to SYS_INIT.
-rw-r--r--app/src/split/bluetooth/central.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c
index 9cad29d..c370ea0 100644
--- a/app/src/split/bluetooth/central.c
+++ b/app/src/split/bluetooth/central.c
@@ -17,6 +17,7 @@
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/split/bluetooth/uuid.h>
+#include <init.h>
static int start_scan(void);
@@ -236,9 +237,13 @@ static struct bt_conn_cb conn_callbacks = {
.disconnected = disconnected,
};
-int zmk_split_bt_central_init()
+int zmk_split_bt_central_init(struct device *_arg)
{
bt_conn_cb_register(&conn_callbacks);
return start_scan();
}
+
+SYS_INIT(zmk_split_bt_central_init,
+ APPLICATION,
+ CONFIG_APPLICATION_INIT_PRIORITY); \ No newline at end of file