feat(bt): Update bt lib for ESP32-C3 and ESP32-S3(723439d)

- Added BLE controller debug log trace
- Added BLE controller log module
This commit is contained in:
chenjianhua
2025-02-25 15:17:49 +08:00
parent 61f992a061
commit d4c15e2cb6
4 changed files with 417 additions and 4 deletions

View File

@@ -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
*/
@@ -30,7 +30,7 @@ extern "C" {
*
* @note Please do not modify this value
*/
#define ESP_BT_CTRL_CONFIG_VERSION 0x02410230
#define ESP_BT_CTRL_CONFIG_VERSION 0x02502230
/**
* @brief Internal use only
@@ -323,6 +323,24 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
#define BLE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED 0
#endif
#if defined(CONFIG_BT_CTRL_LE_LOG_EN)
#define BT_BLE_LOG_EN CONFIG_BT_CTRL_LE_LOG_EN
#else
#define BT_BLE_LOG_EN (0)
#endif
#if defined(CONFIG_BT_CTRL_LE_LOG_MODE_EN)
#define BLE_LOG_MODE_EN CONFIG_BT_CTRL_LE_LOG_MODE_EN
#else
#define BLE_LOG_MODE_EN (0)
#endif
#if defined(CONFIG_BT_CTRL_LE_LOG_LEVEL)
#define BLE_LOG_LEVEL CONFIG_BT_CTRL_LE_LOG_LEVEL
#else
#define BLE_LOG_LEVEL (0)
#endif
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \
.magic = ESP_BT_CTRL_CONFIG_MAGIC_VAL, \
.version = ESP_BT_CTRL_CONFIG_VERSION, \
@@ -369,6 +387,8 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
.master_en = BT_CTRL_BLE_MASTER, \
.scan_en = BT_CTRL_BLE_SCAN, \
.ble_aa_check = BLE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED, \
.ble_log_mode_en = BLE_LOG_MODE_EN, \
.ble_log_level = BLE_LOG_LEVEL, \
}
#else
@@ -494,6 +514,8 @@ typedef struct {
bool master_en; /*!< In the flash mode, True if the master feature is enabled (default); false otherwise. Configurable in menuconfig.*/
bool scan_en; /*!< In the flash mode, True if the scan feature is enabled (default); false otherwise. Configurable in menuconfig.*/
bool ble_aa_check; /*!< True if adds a verification step for the Access Address within the CONNECT_IND PDU; false otherwise. Configurable in menuconfig */
uint32_t ble_log_mode_en; /*!< BLE log mode enable */
uint8_t ble_log_level; /*!< BLE log level */
} esp_bt_controller_config_t;
/**
@@ -904,6 +926,16 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len);
*/
esp_err_t esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callback);
/**
* @brief Select buffers
*/
typedef enum {
ESP_BLE_LOG_BUF_HCI = 0x02,
ESP_BLE_LOG_BUF_CONTROLLER = 0x05,
} esp_ble_log_buf_t;
void esp_ble_controller_log_dump_all(bool output);
#ifdef __cplusplus
}
#endif