mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(bt): Add APIs to control transmit power level
- API to read ACL real RSSI - APIs to read/write tx power of inq/iscan/page/pscan/ACL
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ extern "C" {
|
||||
|
||||
#define SOC_MEM_BT_EM_PER_SYNC_SIZE 0x870
|
||||
|
||||
#define SOC_MEM_BT_EM_BREDR_REAL_END (SOC_MEM_BT_EM_BREDR_NO_SYNC_END + UT_BR_EDR_CTRL_MAX_SYNC_CONN_EFF * SOC_MEM_BT_EM_PER_SYNC_SIZE)
|
||||
#define SOC_MEM_BT_EM_BREDR_REAL_END (SOC_MEM_BT_EM_BREDR_NO_SYNC_END + UC_BR_EDR_CTRL_MAX_SYNC_CONN_EFF * SOC_MEM_BT_EM_PER_SYNC_SIZE)
|
||||
|
||||
#endif //CONFIG_BT_ENABLED
|
||||
|
||||
@@ -242,7 +242,7 @@ the advertising packet will be discarded until the memory is restored. */
|
||||
.bt_sco_datapath = CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF, \
|
||||
.auto_latency = BTDM_CTRL_AUTO_LATENCY_EFF, \
|
||||
.bt_legacy_auth_vs_evt = BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF, \
|
||||
.bt_max_sync_conn = UT_BR_EDR_CTRL_MAX_SYNC_CONN_EFF, \
|
||||
.bt_max_sync_conn = UC_BR_EDR_CTRL_MAX_SYNC_CONN_EFF, \
|
||||
.ble_sca = CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF, \
|
||||
.pcm_role = CONFIG_BTDM_CTRL_PCM_ROLE_EFF, \
|
||||
.pcm_polar = CONFIG_BTDM_CTRL_PCM_POLAR_EFF, \
|
||||
@@ -634,6 +634,7 @@ esp_err_t esp_ble_scan_dupilcate_list_flush(void);
|
||||
* such as performing discovery, profile initialization, and so on.
|
||||
* 2. For BR/EDR to use the new TX power for inquiry, call this function before starting an inquiry.
|
||||
* If BR/EDR is already inquiring, restart the inquiry after calling this function.
|
||||
* 3. If `BT_CLASSIC_ENABLE_POWER_CTRL_VSC` is enabled, this function will be not supported.
|
||||
*
|
||||
* @param[in] min_power_level The minimum power level. The default value is `ESP_PWR_LVL_N0`.
|
||||
* @param[in] max_power_level The maximum power level. The default value is `ESP_PWR_LVL_P3`.
|
||||
@@ -650,6 +651,9 @@ esp_err_t esp_bredr_tx_power_set(esp_power_level_t min_power_level, esp_power_le
|
||||
*
|
||||
* The corresponding power levels will be stored into the arguments.
|
||||
*
|
||||
* @note
|
||||
* 1. If `BT_CLASSIC_ENABLE_POWER_CTRL_VSC` is enabled, this function will be not supported.
|
||||
*
|
||||
* @param[out] min_power_level Pointer to store the minimum power level
|
||||
* @param[out] max_power_level The maximum power level
|
||||
*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -224,6 +224,51 @@ struct bt_hci_vs_legacy_rem_auth_evt {
|
||||
*/
|
||||
#define ESP_BT_VS_WR_AUTO_RATE_INIT_OCF (0x018b)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_RD_ACL_REAL_RSSI_OCF (0x0191)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_RD_NEW_CONN_TX_PWR_LVL_OCF (0x0192)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_WR_NEW_CONN_TX_PWR_LVL_OCF (0x0193)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_RD_PAGE_TX_PWR_LVL_OCF (0x0194)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_WR_PAGE_TX_PWR_LVL_OCF (0x0195)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_RD_PSCAN_TX_PWR_LVL_OCF (0x0196)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_WR_PSCAN_TX_PWR_LVL_OCF (0x0197)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_RD_INQ_TX_PWR_LVL_OCF (0x0198)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePwrCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_WR_ISCAN_TX_PWR_LVL_OCF (0x0199)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user