feat(ble): add channel assessment and enhanced connect function on ESP32-C6

This commit is contained in:
zwl
2025-01-04 16:35:28 +08:00
parent 8ca2a45a16
commit 192ba32e6d
3 changed files with 99 additions and 3 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
*/
@@ -156,7 +156,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
*/
esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
#define CONFIG_VERSION 0x20241121
#define CONFIG_VERSION 0x20250104
#define CONFIG_MAGIC 0x5A5AA5A5
/**
@@ -213,6 +213,15 @@ typedef struct {
uint8_t csa2_select; /*!< Select CSA#2*/
uint8_t enable_csr; /*!< Enable CSR */
uint8_t ble_aa_check; /*!< True if adds a verification step for the Access Address within the CONNECT_IND PDU; false otherwise. Configurable in menuconfig */
uint8_t ble_llcp_disc_flag; /*!< Flag indicating whether the Controller disconnects after Instant Passed (0x28) error occurs. Configurable in menuconfig.
- The Controller does not disconnect after Instant Passed (0x28) by default. */
uint16_t scan_backoff_upperlimitmax; /*!< The value of upperlimitmax is 2^n, The maximum value is 256 */
uint8_t ble_chan_ass_en; /*!< Enable / disable BLE channel assessment. Configurable in menuconfig.
- 0 - Disable
- 1 - Enable (default) */
uint8_t ble_data_lenth_zero_aux; /*!< Enable / disable auxiliary packets when the extended ADV data length is zero. Configurable in menuconfig.
- 0 - Disable (default)
- 1 - Enable */
uint32_t config_magic; /*!< Magic number for configuration validation */
} esp_bt_controller_config_t;
@@ -263,6 +272,10 @@ typedef struct {
.csa2_select = DEFAULT_BT_LE_50_FEATURE_SUPPORT, \
.enable_csr = 0, \
.ble_aa_check = DEFAULT_BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS, \
.ble_llcp_disc_flag = BT_LE_CTRL_LLCP_DISC_FLAG, \
.scan_backoff_upperlimitmax = BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX, \
.ble_chan_ass_en = DEFAULT_BT_LE_CTRL_CHAN_ASS_EN, \
.ble_data_lenth_zero_aux = DEFAULT_BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX, \
.config_magic = CONFIG_MAGIC, \
}