mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(bt): initialize BLE Log in host-only mode
Initialize and deinitialize BLE Log from the Bluedroid host lifecycle when the local controller is disabled. Guard controller mbuf handling with BLE_LOG_LL_ENABLED so host- only builds do not depend on controller headers. Update NimBLE to b6e2f93db269ad2bba8715953cb56f93bae4fc2f to provide the corresponding host-only initialization. Combine the host initialization fix and the final NimBLE revision into one prerequisite commit.
This commit is contained in:
@@ -13,9 +13,9 @@
|
||||
#include "ble_log_rt.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#if CONFIG_SOC_ESP_NIMBLE_CONTROLLER
|
||||
#if CONFIG_BLE_LOG_LL_ENABLED && CONFIG_SOC_ESP_NIMBLE_CONTROLLER
|
||||
#include "os/os_mbuf.h"
|
||||
#endif /* CONFIG_SOC_ESP_NIMBLE_CONTROLLER */
|
||||
#endif /* CONFIG_BLE_LOG_LL_ENABLED && CONFIG_SOC_ESP_NIMBLE_CONTROLLER */
|
||||
|
||||
/* VARIABLE */
|
||||
#define TAG "ble_log"
|
||||
@@ -200,13 +200,13 @@ void ble_log_lbm_write_trans(ble_log_prph_trans_t **trans, ble_log_src_t src_cod
|
||||
BLE_LOG_MEMCPY(buf + BLE_LOG_FRAME_HEAD_LEN, addr, len);
|
||||
}
|
||||
if (len_append) {
|
||||
#if CONFIG_SOC_ESP_NIMBLE_CONTROLLER
|
||||
#if CONFIG_BLE_LOG_LL_ENABLED && CONFIG_SOC_ESP_NIMBLE_CONTROLLER
|
||||
if (omdata) {
|
||||
os_mbuf_copydata((struct os_mbuf *)addr_append, 0,
|
||||
len_append, buf + BLE_LOG_FRAME_HEAD_LEN + len);
|
||||
}
|
||||
else
|
||||
#endif /* CONFIG_SOC_ESP_NIMBLE_CONTROLLER */
|
||||
#endif /* CONFIG_BLE_LOG_LL_ENABLED && CONFIG_SOC_ESP_NIMBLE_CONTROLLER */
|
||||
{
|
||||
BLE_LOG_MEMCPY(buf + BLE_LOG_FRAME_HEAD_LEN + len, addr_append, len_append);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user