Swtich to SYS_INIT.
This commit is contained in:
parent
be537d0656
commit
d1a5c7ee5a
1 changed files with 6 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <zmk/split/bluetooth/uuid.h>
|
#include <zmk/split/bluetooth/uuid.h>
|
||||||
|
#include <init.h>
|
||||||
|
|
||||||
static int start_scan(void);
|
static int start_scan(void);
|
||||||
|
|
||||||
|
@ -236,9 +237,13 @@ static struct bt_conn_cb conn_callbacks = {
|
||||||
.disconnected = disconnected,
|
.disconnected = disconnected,
|
||||||
};
|
};
|
||||||
|
|
||||||
int zmk_split_bt_central_init()
|
int zmk_split_bt_central_init(struct device *_arg)
|
||||||
{
|
{
|
||||||
bt_conn_cb_register(&conn_callbacks);
|
bt_conn_cb_register(&conn_callbacks);
|
||||||
|
|
||||||
return start_scan();
|
return start_scan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYS_INIT(zmk_split_bt_central_init,
|
||||||
|
APPLICATION,
|
||||||
|
CONFIG_APPLICATION_INIT_PRIORITY);
|
Loading…
Reference in a new issue