samples: conn_cb replace to const zsector
It is more efficient and saves part of RAM by replacing it with static one dynamically. Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
This commit is contained in:
parent
23a9594944
commit
8e1682d1ea
31 changed files with 35 additions and 94 deletions
|
@ -258,7 +258,7 @@ static void disconnected(struct bt_conn *conn, uint8_t reason)
|
|||
}
|
||||
}
|
||||
|
||||
static struct bt_conn_cb conn_callbacks = {
|
||||
BT_CONN_CB_DEFINE(conn_callbacks) = {
|
||||
.connected = connected,
|
||||
.disconnected = disconnected,
|
||||
};
|
||||
|
@ -275,8 +275,6 @@ void main(void)
|
|||
|
||||
printk("Bluetooth initialized\n");
|
||||
|
||||
bt_conn_cb_register(&conn_callbacks);
|
||||
|
||||
err = scan_start();
|
||||
|
||||
if (err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue