From e2fbec5d2e70bd0a7d3b2e5f5b5cc7a662157130 Mon Sep 17 00:00:00 2001 From: Zhou Xiao Date: Tue, 18 Feb 2025 14:23:05 +0800 Subject: [PATCH] feat(ble): support ble log spi out for ESP32 --- components/bt/controller/esp32/bt.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/components/bt/controller/esp32/bt.c b/components/bt/controller/esp32/bt.c index 30c3f02e62..9855d894fb 100644 --- a/components/bt/controller/esp32/bt.c +++ b/components/bt/controller/esp32/bt.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -48,6 +48,10 @@ #include "esp_rom_sys.h" #include "hli_api.h" +#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED +#include "ble_log/ble_log_spi_out.h" +#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED + #if CONFIG_BT_ENABLED /* Macro definition @@ -1686,6 +1690,10 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg) coex_init(); #endif +#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED + ble_log_spi_out_init(); +#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED + btdm_cfg_mask = btdm_config_mask_load(); err = btdm_controller_init(btdm_cfg_mask, cfg); @@ -1713,6 +1721,10 @@ esp_err_t esp_bt_controller_deinit(void) return ESP_ERR_INVALID_STATE; } +#if CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED + ble_log_spi_out_deinit(); +#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED + btdm_controller_deinit(); bt_controller_deinit_internal();