mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-30 04:27:23 +00:00
fix(nimble): initialize BLE Log in host-only mode
(cherry picked from commit 82f035a899)
This commit is contained in:
@@ -52,6 +52,9 @@
|
||||
#endif
|
||||
#include "bt_osal.h"
|
||||
#include "bt_prf_task.h"
|
||||
#if CONFIG_BLE_LOG_ENABLED && !CONFIG_BT_CONTROLLER_ENABLED
|
||||
#include "ble_log.h"
|
||||
#endif
|
||||
|
||||
#define NIMBLE_PORT_LOG_TAG "BLE_INIT"
|
||||
|
||||
@@ -229,6 +232,12 @@ esp_err_t esp_nimble_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_BLE_LOG_ENABLED && !CONFIG_BT_CONTROLLER_ENABLED
|
||||
if (!ble_log_init()) {
|
||||
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE Log init failed");
|
||||
}
|
||||
#endif
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -246,6 +255,10 @@ esp_err_t esp_nimble_deinit(void)
|
||||
ble_npl_deiniting = true;
|
||||
#endif
|
||||
|
||||
#if CONFIG_BLE_LOG_ENABLED && !CONFIG_BT_CONTROLLER_ENABLED
|
||||
ble_log_deinit();
|
||||
#endif
|
||||
|
||||
ble_transport_ll_deinit();
|
||||
|
||||
#if (BT_HCI_LOG_INCLUDED == TRUE)
|
||||
|
||||
Reference in New Issue
Block a user