Skip to content

Commit 0f03da4

Browse files
feat(ble): add peripheral fast rx data in latency config on ESP32-C6
1 parent ed6587b commit 0f03da4

File tree

6 files changed

+35
-2
lines changed

6 files changed

+35
-2
lines changed

components/bt/controller/esp32c6/Kconfig.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,3 +977,11 @@ menu "Scheduling Priority Level Config"
977977
default 2 if BT_LE_SYNC_SCHED_PRIO_HIGH_LEVEL
978978
default 1
979979
endmenu
980+
981+
config BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN
982+
bool "Enable Peripheral fast PDU reception during latency"
983+
default n
984+
help
985+
When this option is enabled, the Controller continues receiving PDUs
986+
In the next connection event instead of entering latency
987+
After a data packet is received.

components/bt/controller/esp32c6/esp_bt_cfg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ extern "C" {
212212
#define DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN (0)
213213
#endif
214214

215+
#if defined(CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
216+
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
217+
#else
218+
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (0)
219+
#endif
220+
215221
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
216222
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
217223
#else

components/bt/controller/esp32h2/Kconfig.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,3 +981,11 @@ menu "Scheduling Priority Level Config"
981981
default 2 if BT_LE_SYNC_SCHED_PRIO_HIGH_LEVEL
982982
default 1
983983
endmenu
984+
985+
config BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN
986+
bool "Enable Peripheral fast PDU reception during latency"
987+
default n
988+
help
989+
When this option is enabled, the Controller continues receiving PDUs
990+
In the next connection event instead of entering latency
991+
After a data packet is received.

components/bt/controller/esp32h2/esp_bt_cfg.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ extern "C" {
209209
#define DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN (0)
210210
#endif
211211

212+
#if defined(CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
213+
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (CONFIG_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN)
214+
#else
215+
#define DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN (0)
216+
#endif
217+
212218
#ifdef CONFIG_BT_LE_HCI_INTERFACE_USE_UART
213219
#define HCI_UART_EN CONFIG_BT_LE_HCI_INTERFACE_USE_UART
214220
#else

components/bt/include/esp32c6/include/esp_bt.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
156156
*/
157157
esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
158158

159-
#define CONFIG_VERSION 0x20251022
159+
#define CONFIG_VERSION 0x20251104
160160
#define CONFIG_MAGIC 0x5A5AA5A5
161161

162162
/**
@@ -235,6 +235,7 @@ typedef struct {
235235
uint8_t adv_rsv_cnt; /*!< BLE adv state machine reserve count number */
236236
uint8_t conn_rsv_cnt; /*!< BLE conn state machine reserve count number */
237237
uint8_t priority_level_cfg; /*!< The option for priority level configuration */
238+
uint8_t slv_fst_rx_lat_en; /*!< The option for enabling slave fast PDU reception during latency. */
238239
uint32_t config_magic; /*!< Magic number for configuration validation */
239240
} esp_bt_controller_config_t;
240241

@@ -300,6 +301,7 @@ typedef struct {
300301
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
301302
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
302303
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
304+
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
303305
.config_magic = CONFIG_MAGIC, \
304306
}
305307
#elif CONFIG_IDF_TARGET_ESP32C61
@@ -362,6 +364,7 @@ typedef struct {
362364
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
363365
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
364366
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
367+
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
365368
.config_magic = CONFIG_MAGIC, \
366369
}
367370
#endif

components/bt/include/esp32h2/include/esp_bt.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type
161161
*/
162162
esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle);
163163

164-
#define CONFIG_VERSION 0x20251022
164+
#define CONFIG_VERSION 0x20251104
165165
#define CONFIG_MAGIC 0x5A5AA5A5
166166

167167
/**
@@ -237,6 +237,7 @@ typedef struct {
237237
uint8_t adv_rsv_cnt; /*!< BLE adv state machine reserve count number */
238238
uint8_t conn_rsv_cnt; /*!< BLE conn state machine reserve count number */
239239
uint8_t priority_level_cfg; /*!< The option for priority level configuration */
240+
uint8_t slv_fst_rx_lat_en; /*!< The option for enabling slave fast PDU reception during latency. */
240241
uint32_t config_magic; /*!< Configuration magic value */
241242
} esp_bt_controller_config_t;
242243

@@ -300,6 +301,7 @@ typedef struct {
300301
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
301302
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
302303
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
304+
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
303305
.config_magic = CONFIG_MAGIC, \
304306
}
305307

0 commit comments

Comments
 (0)