mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
feat(ble): add priority level config on ESP32-C6
(cherry picked from commit 09337109b7)
Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
This commit is contained in:
co-authored by
zhaoweiliang
parent
8561f26e3c
commit
2852dc2566
@@ -915,3 +915,65 @@ endmenu
|
|||||||
config BT_LE_DTM_ENABLED
|
config BT_LE_DTM_ENABLED
|
||||||
bool "Enable Direct Test Mode (DTM) feature"
|
bool "Enable Direct Test Mode (DTM) feature"
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
menu "Scheduling Priority Level Config"
|
||||||
|
choice BT_LE_ADV_SCHED_PRIO_LEVEL
|
||||||
|
prompt "The Adv scheduling priority level"
|
||||||
|
default BT_LE_ADV_SCHED_PRIO_LOW_LEVEL
|
||||||
|
help
|
||||||
|
The Adv scheduling priority level is used for arbitration when internal scheduling conflicts.
|
||||||
|
config BT_LE_ADV_SCHED_PRIO_LOW_LEVEL
|
||||||
|
bool "low priority level"
|
||||||
|
config BT_LE_ADV_SCHED_PRIO_MID_LEVEL
|
||||||
|
bool "medium priority level"
|
||||||
|
config BT_LE_ADV_SCHED_PRIO_HIGH_LEVEL
|
||||||
|
bool "high priority level"
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config BT_LE_DFT_ADV_SCHED_PRIO_LEVEL
|
||||||
|
int
|
||||||
|
default 0 if BT_LE_ADV_SCHED_PRIO_LOW_LEVEL
|
||||||
|
default 1 if BT_LE_ADV_SCHED_PRIO_MID_LEVEL
|
||||||
|
default 2 if BT_LE_ADV_SCHED_PRIO_HIGH_LEVEL
|
||||||
|
default 0
|
||||||
|
|
||||||
|
choice BT_LE_PERIODIC_ADV_SCHED_PRIO_LEVEL
|
||||||
|
prompt "The Periodic Adv scheduling priority level"
|
||||||
|
default BT_LE_PERIODIC_ADV_SCHED_PRIO_MID_LEVEL
|
||||||
|
help
|
||||||
|
The Periodic Adv scheduling priority level is used for arbitration when internal scheduling conflicts.
|
||||||
|
config BT_LE_PERIODIC_ADV_SCHED_PRIO_LOW_LEVEL
|
||||||
|
bool "low priority level"
|
||||||
|
config BT_LE_PERIODIC_ADV_SCHED_PRIO_MID_LEVEL
|
||||||
|
bool "medium priority level"
|
||||||
|
config BT_LE_PERIODIC_ADV_SCHED_PRIO_HIGH_LEVEL
|
||||||
|
bool "high priority level"
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config BT_LE_DFT_PERIODIC_ADV_SCHED_PRIO_LEVEL
|
||||||
|
int
|
||||||
|
default 0 if BT_LE_PERIODIC_ADV_SCHED_PRIO_LOW_LEVEL
|
||||||
|
default 1 if BT_LE_PERIODIC_ADV_SCHED_PRIO_MID_LEVEL
|
||||||
|
default 2 if BT_LE_PERIODIC_ADV_SCHED_PRIO_HIGH_LEVEL
|
||||||
|
default 1
|
||||||
|
|
||||||
|
choice BT_LE_SYNC_SCHED_PRIO_LEVEL
|
||||||
|
prompt "The Sync scheduling priority level"
|
||||||
|
default BT_LE_SYNC_SCHED_PRIO_MID_LEVEL
|
||||||
|
help
|
||||||
|
The SYNC scheduling priority level is used for arbitration when internal scheduling conflicts.
|
||||||
|
config BT_LE_SYNC_SCHED_PRIO_LOW_LEVEL
|
||||||
|
bool "low priority level"
|
||||||
|
config BT_LE_SYNC_SCHED_PRIO_MID_LEVEL
|
||||||
|
bool "medium priority level"
|
||||||
|
config BT_LE_SYNC_SCHED_PRIO_HIGH_LEVEL
|
||||||
|
bool "high priority level"
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config BT_LE_DFT_SYNC_SCHED_PRIO_LEVEL
|
||||||
|
int
|
||||||
|
default 0 if BT_LE_SYNC_SCHED_PRIO_LOW_LEVEL
|
||||||
|
default 1 if BT_LE_SYNC_SCHED_PRIO_MID_LEVEL
|
||||||
|
default 2 if BT_LE_SYNC_SCHED_PRIO_HIGH_LEVEL
|
||||||
|
default 1
|
||||||
|
endmenu
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ extern "C" {
|
|||||||
#define RUN_BQB_TEST (0)
|
#define RUN_BQB_TEST (0)
|
||||||
#define RUN_QA_TEST (0)
|
#define RUN_QA_TEST (0)
|
||||||
#define NIMBLE_DISABLE_SCAN_BACKOFF (0)
|
#define NIMBLE_DISABLE_SCAN_BACKOFF (0)
|
||||||
|
#define BT_LL_CTRL_PRIO_LVL_CFG ((CONFIG_BT_LE_DFT_SYNC_SCHED_PRIO_LEVEL << 4) | (CONFIG_BT_LE_DFT_PERIODIC_ADV_SCHED_PRIO_LEVEL << 2) | CONFIG_BT_LE_DFT_ADV_SCHED_PRIO_LEVEL)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
|
||||||
|
|
||||||
#define CONFIG_VERSION 0x20250606
|
#define CONFIG_VERSION 0x20251022
|
||||||
#define CONFIG_MAGIC 0x5A5AA5A5
|
#define CONFIG_MAGIC 0x5A5AA5A5
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -232,6 +232,7 @@ typedef struct {
|
|||||||
int8_t ch39_txpwr; /*!< BLE transmit power (in dBm) used for BLE advertising on channel 39. */
|
int8_t ch39_txpwr; /*!< BLE transmit power (in dBm) used for BLE advertising on channel 39. */
|
||||||
uint8_t adv_rsv_cnt; /*!< BLE adv state machine reserve count number */
|
uint8_t adv_rsv_cnt; /*!< BLE adv state machine reserve count number */
|
||||||
uint8_t conn_rsv_cnt; /*!< BLE conn state machine reserve count number */
|
uint8_t conn_rsv_cnt; /*!< BLE conn state machine reserve count number */
|
||||||
|
uint8_t priority_level_cfg; /*!< The option for priority level configuration */
|
||||||
uint32_t config_magic; /*!< Magic number for configuration validation */
|
uint32_t config_magic; /*!< Magic number for configuration validation */
|
||||||
} esp_bt_controller_config_t;
|
} esp_bt_controller_config_t;
|
||||||
|
|
||||||
@@ -295,6 +296,7 @@ typedef struct {
|
|||||||
.ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \
|
.ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \
|
||||||
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
||||||
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
||||||
|
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
|
||||||
.config_magic = CONFIG_MAGIC, \
|
.config_magic = CONFIG_MAGIC, \
|
||||||
}
|
}
|
||||||
#elif CONFIG_IDF_TARGET_ESP32C61
|
#elif CONFIG_IDF_TARGET_ESP32C61
|
||||||
@@ -356,6 +358,7 @@ typedef struct {
|
|||||||
.ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \
|
.ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \
|
||||||
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
||||||
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
||||||
|
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
|
||||||
.config_magic = CONFIG_MAGIC, \
|
.config_magic = CONFIG_MAGIC, \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user