feat(ble): add peripheral fast rx data in latency config on ESP32-C6
(cherry picked from commit 0f03da43c8cab9a8cd54d56e81782e693dcac789) Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
This commit is contained in:
@@ -977,3 +977,11 @@ menu "Scheduling Priority Level Config"
|
||||
default 2 if BT_LE_SYNC_SCHED_PRIO_HIGH_LEVEL
|
||||
default 1
|
||||
endmenu
|
||||
|
||||
config BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN
|
||||
bool "Enable Peripheral fast PDU reception during latency"
|
||||
default n
|
||||
help
|
||||
When this option is enabled, the Controller continues receiving PDUs
|
||||
In the next connection event instead of entering latency
|
||||
After a data packet is received.
|
||||
|
||||
@@ -212,6 +212,12 @@ extern "C" {
|
||||
#define DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
|
||||
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
||||
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
||||
#else
|
||||
|
||||
@@ -981,3 +981,11 @@ menu "Scheduling Priority Level Config"
|
||||
default 2 if BT_LE_SYNC_SCHED_PRIO_HIGH_LEVEL
|
||||
default 1
|
||||
endmenu
|
||||
|
||||
config BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN
|
||||
bool "Enable Peripheral fast PDU reception during latency"
|
||||
default n
|
||||
help
|
||||
When this option is enabled, the Controller continues receiving PDUs
|
||||
In the next connection event instead of entering latency
|
||||
After a data packet is received.
|
||||
|
||||
@@ -209,6 +209,12 @@ extern "C" {
|
||||
#define DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
|
||||
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
||||
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
|
||||
#else
|
||||
|
||||
@@ -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 0x20251022
|
||||
#define CONFIG_VERSION 0x20251104
|
||||
#define CONFIG_MAGIC 0x5A5AA5A5
|
||||
|
||||
/**
|
||||
@@ -235,6 +235,7 @@ typedef struct {
|
||||
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 priority_level_cfg; /*!< The option for priority level configuration */
|
||||
uint8_t slv_fst_rx_lat_en; /*!< The option for enabling slave fast PDU reception during latency. */
|
||||
uint32_t config_magic; /*!< Magic number for configuration validation */
|
||||
} esp_bt_controller_config_t;
|
||||
|
||||
@@ -300,6 +301,7 @@ typedef struct {
|
||||
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
||||
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
||||
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
|
||||
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
#elif CONFIG_IDF_TARGET_ESP32C61
|
||||
@@ -362,6 +364,7 @@ typedef struct {
|
||||
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
||||
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
||||
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
|
||||
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -161,7 +161,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 0x20251022
|
||||
#define CONFIG_VERSION 0x20251104
|
||||
#define CONFIG_MAGIC 0x5A5AA5A5
|
||||
|
||||
/**
|
||||
@@ -237,6 +237,7 @@ typedef struct {
|
||||
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 priority_level_cfg; /*!< The option for priority level configuration */
|
||||
uint8_t slv_fst_rx_lat_en; /*!< The option for enabling slave fast PDU reception during latency. */
|
||||
uint32_t config_magic; /*!< Configuration magic value */
|
||||
} esp_bt_controller_config_t;
|
||||
|
||||
@@ -300,6 +301,7 @@ typedef struct {
|
||||
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
|
||||
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
|
||||
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
|
||||
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user