Skip to content

Commit ea408a2

Browse files
authored
Merge branch 'espressif:release/v5.3' into release/v5.3
2 parents 4150bc2 + d7d3eb3 commit ea408a2

File tree

149 files changed

+5238
-1699
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+5238
-1699
lines changed

components/bt/common/osi/pkt_queue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ struct pkt_queue *pkt_queue_create(void)
2525
}
2626
if (osi_mutex_new(&queue->lock) != 0) {
2727
osi_free(queue);
28+
return NULL;
2829
}
2930
struct pkt_queue_header *p = &queue->header;
3031
STAILQ_INIT(p);

components/bt/controller/esp32c2/bt.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,17 @@ static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_
449449

450450
#define BLE_RTC_DELAY_US (1800)
451451

452+
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
453+
void *malloc_ble_controller_mem(size_t size)
454+
{
455+
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
456+
}
457+
458+
uint32_t get_ble_controller_free_heap_size(void)
459+
{
460+
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
461+
}
462+
452463
static const struct osi_coex_funcs_t s_osi_coex_funcs_ro = {
453464
._magic = OSI_COEX_MAGIC_VALUE,
454465
._version = OSI_COEX_VERSION,

components/bt/controller/esp32c6/bt.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,20 @@ static bool s_ble_active = false;
393393
static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
394394
#endif // CONFIG_PM_ENABLE
395395
static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_INVALID;
396-
397396
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (2500)
398397
#define BLE_RTC_DELAY_US_MODEM_SLEEP (500)
399398

399+
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
400+
void *malloc_ble_controller_mem(size_t size)
401+
{
402+
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
403+
}
404+
405+
uint32_t get_ble_controller_free_heap_size(void)
406+
{
407+
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
408+
}
409+
400410
static const struct osi_coex_funcs_t s_osi_coex_funcs_ro = {
401411
._magic = OSI_COEX_MAGIC_VALUE,
402412
._version = OSI_COEX_VERSION,

components/bt/controller/esp32h2/bt.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,17 @@ static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL;
388388
#endif // CONFIG_PM_ENABLE
389389
static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_INVALID;
390390

391+
#define BLE_CONTROLLER_MALLOC_CAPS (MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT|MALLOC_CAP_DMA)
392+
void *malloc_ble_controller_mem(size_t size)
393+
{
394+
return heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
395+
}
396+
397+
uint32_t get_ble_controller_free_heap_size(void)
398+
{
399+
return heap_caps_get_free_size(BLE_CONTROLLER_MALLOC_CAPS);
400+
}
401+
391402
#define BLE_RTC_DELAY_US_LIGHT_SLEEP (5100)
392403
#define BLE_RTC_DELAY_US_MODEM_SLEEP (1500)
393404

components/bt/controller/lib_esp32

components/bt/host/bluedroid/api/include/api/esp_gattc_api.h

Lines changed: 586 additions & 478 deletions
Large diffs are not rendered by default.

components/bt/host/bluedroid/api/include/api/esp_gatts_api.h

Lines changed: 322 additions & 298 deletions
Large diffs are not rendered by default.

components/bt/host/nimble/Kconfig.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,15 @@ config BT_NIMBLE_HOST_QUEUE_CONG_CHECK
10711071
or application layer handling adv packets is slow, it will cause the controller memory
10721072
to run out. if enabled, adv packets will be lost when host queue is congested.
10731073

1074+
config BT_NIMBLE_GATTC_PROC_PREEMPTION_PROTECT
1075+
bool "Gatt-proc preemption protect check"
1076+
depends on BT_NIMBLE_ENABLED
1077+
default n
1078+
help
1079+
When BLE and Wireless protocol/IEEE 802.15.4 operate in coexistence, BLE preemption
1080+
can disrupt the GATT context,causing the service discovery callback to not be invoked.
1081+
A temporary list is maintained to preserve the GATT context and use it in case of preemption.
1082+
10741083
menu "Host-controller Transport"
10751084
config BT_NIMBLE_TRANSPORT_UART
10761085
bool "Enable Uart Transport"

components/bt/host/nimble/port/include/esp_nimble_cfg.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,14 @@
19531953
#endif
19541954
#endif
19551955

1956+
#ifndef MYNEWT_VAL_BLE_GATTC_PROC_PREEMPTION_PROTECT
1957+
#ifdef CONFIG_BT_NIMBLE_GATTC_PROC_PREEMPTION_PROTECT
1958+
#define MYNEWT_VAL_BLE_GATTC_PROC_PREEMPTION_PROTECT CONFIG_BT_NIMBLE_GATTC_PROC_PREEMPTION_PROTECT
1959+
#else
1960+
#define MYNEWT_VAL_BLE_GATTC_PROC_PREEMPTION_PROTECT (0)
1961+
#endif
1962+
#endif
1963+
19561964
#ifndef MYNEWT_VAL_BLE_HOST_ALLOW_CONNECT_WITH_SCAN
19571965
#ifdef CONFIG_BT_NIMBLE_HOST_ALLOW_CONNECT_WITH_SCAN
19581966
#define MYNEWT_VAL_BLE_HOST_ALLOW_CONNECT_WITH_SCAN CONFIG_BT_NIMBLE_HOST_ALLOW_CONNECT_WITH_SCAN

0 commit comments

Comments
 (0)