Skip to content

Commit 1a601ab

Browse files
committed
Merge branch 'change/ble_update_lib_20251106_v5.1' into 'release/v5.1'
change(ble): [AUTO_MR] 20251106 - Update ESP BLE Controller Lib (v5.1) See merge request espressif/esp-idf!43170
2 parents 264a65f + 910e642 commit 1a601ab

File tree

12 files changed

+45
-12
lines changed

12 files changed

+45
-12
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/bt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ extern void esp_unregister_npl_funcs (void);
168168
extern void npl_freertos_mempool_deinit(void);
169169
extern uint32_t r_os_cputime_get32(void);
170170
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
171-
extern void r_ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
171+
extern void r_ble_lll_sleep_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
172172
void *w_arg, uint32_t us_to_enabled);
173173
extern void r_ble_rtc_wake_up_state_clr(void);
174174
extern int os_msys_init(void);
@@ -849,10 +849,10 @@ esp_err_t controller_sleep_init(void)
849849
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
850850
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
851851
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
852-
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
852+
r_ble_lll_sleep_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
853853
BLE_RTC_DELAY_US_LIGHT_SLEEP);
854854
#else
855-
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
855+
r_ble_lll_sleep_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
856856
BLE_RTC_DELAY_US_MODEM_SLEEP);
857857
#endif /* FREERTOS_USE_TICKLESS_IDLE */
858858
#endif // CONFIG_BT_LE_SLEEP_ENABLE

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/bt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ extern void esp_unregister_npl_funcs (void);
159159
extern void npl_freertos_mempool_deinit(void);
160160
extern uint32_t r_os_cputime_get32(void);
161161
extern uint32_t r_os_cputime_ticks_to_usecs(uint32_t ticks);
162-
extern void r_ble_lll_rfmgmt_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
162+
extern void r_ble_lll_sleep_set_sleep_cb(void *s_cb, void *w_cb, void *s_arg,
163163
void *w_arg, uint32_t us_to_enabled);
164164
extern void r_ble_rtc_wake_up_state_clr(void);
165165
extern int os_msys_init(void);
@@ -816,10 +816,10 @@ esp_err_t controller_sleep_init(void)
816816
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
817817
ESP_LOGW(NIMBLE_PORT_LOG_TAG, "BLE modem sleep is enabled");
818818
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
819-
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
819+
r_ble_lll_sleep_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
820820
BLE_RTC_DELAY_US_LIGHT_SLEEP);
821821
#else
822-
r_ble_lll_rfmgmt_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
822+
r_ble_lll_sleep_set_sleep_cb(controller_sleep_cb, controller_wakeup_cb, 0, 0,
823823
BLE_RTC_DELAY_US_MODEM_SLEEP);
824824
#endif /* FREERTOS_USE_TICKLESS_IDLE */
825825
#endif // CONFIG_BT_LE_SLEEP_ENABLE

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
/**
@@ -233,6 +233,7 @@ typedef struct {
233233
uint8_t adv_rsv_cnt; /*!< BLE adv state machine reserve count number */
234234
uint8_t conn_rsv_cnt; /*!< BLE conn state machine reserve count number */
235235
uint8_t priority_level_cfg; /*!< The option for priority level configuration */
236+
uint8_t slv_fst_rx_lat_en; /*!< The option for enabling slave fast PDU reception during latency. */
236237
uint32_t config_magic; /*!< Magic number for configuration validation */
237238
} esp_bt_controller_config_t;
238239

@@ -297,6 +298,7 @@ typedef struct {
297298
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
298299
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
299300
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
301+
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
300302
.config_magic = CONFIG_MAGIC, \
301303
}
302304
#elif CONFIG_IDF_TARGET_ESP32C61
@@ -359,6 +361,7 @@ typedef struct {
359361
.adv_rsv_cnt = BLE_LL_ADV_SM_RESERVE_CNT_N, \
360362
.conn_rsv_cnt = BLE_LL_CONN_SM_RESERVE_CNT_N, \
361363
.priority_level_cfg = BT_LL_CTRL_PRIO_LVL_CFG, \
364+
.slv_fst_rx_lat_en = DEFAULT_BT_LE_CTRL_SLV_FAST_RX_CONN_DATA_EN, \
362365
.config_magic = CONFIG_MAGIC, \
363366
}
364367
#endif

0 commit comments

Comments
 (0)