Sync
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <zephyr/logging/log.h>
|
||||
|
||||
#include "ble_mgmt.h"
|
||||
#include "event_mgmt.h"
|
||||
|
||||
LOG_MODULE_REGISTER(ble_mgmt, CONFIG_BLE_MGMT_LOG_LEVEL);
|
||||
|
||||
@@ -239,6 +240,8 @@ static void connected(struct bt_conn *conn, uint8_t err)
|
||||
if (peer_count() < CONFIG_BT_MAX_CONN) {
|
||||
(void)start_advertising();
|
||||
}
|
||||
|
||||
event_mgmt_set_event(EVENT_MGMT_BLE_CONNECTED);
|
||||
}
|
||||
|
||||
static void disconnected(struct bt_conn *conn, uint8_t reason)
|
||||
@@ -252,6 +255,8 @@ static void disconnected(struct bt_conn *conn, uint8_t reason)
|
||||
if (peer_count() < CONFIG_BT_MAX_CONN) {
|
||||
(void)start_advertising();
|
||||
}
|
||||
|
||||
event_mgmt_set_event(EVENT_MGMT_BLE_DISCONNECTED);
|
||||
}
|
||||
|
||||
BT_CONN_CB_DEFINE(conn_callbacks) = {
|
||||
|
||||
Reference in New Issue
Block a user