Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/nimble/esp_port/esp-hci/src/na_hci_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#ifdef ESP_PLATFORM
#include "syscfg/syscfg.h"
#if CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
#if CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT && CONFIG_BT_BLUEDROID_ENABLED

#include <stdio.h>
#include <string.h>
Expand Down
3 changes: 2 additions & 1 deletion src/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

#include <syscfg/syscfg.h>
#ifdef ESP_PLATFORM
#if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3)
# if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && \
!defined(CONFIG_IDF_TARGET_ESP32S3) && CONFIG_BT_BLUEDROID_ENABLED

#include <assert.h>
#include <string.h>
Expand Down
8 changes: 2 additions & 6 deletions src/nimble/porting/nimble/src/nimble_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,12 @@ esp_err_t esp_nimble_init(void)
os_mempool_module_init();
os_msys_init();

#elif CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
#elif CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT && CONFIG_BT_BLUEDROID_ENABLED
hci_transport_deinit();
na_hci_transport_init(HCI_TRANSPORT_VHCI);
int na_npl_freertos_mempool_init(void);
na_npl_freertos_mempool_init();
#ifdef CONFIG_BT_BLUEDROID_ENABLED
ble_npl_eventq_init(&g_eventq_dflt);
#endif
#endif

ble_transport_ll_init();
Expand Down Expand Up @@ -143,13 +141,11 @@ esp_err_t esp_nimble_deinit(void)

ble_transport_ll_deinit();

#if CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
#if CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT && CONFIG_BT_BLUEDROID_ENABLED
na_hci_transport_deinit();
void na_npl_freertos_mempool_deinit(void);
na_npl_freertos_mempool_deinit();
#ifdef CONFIG_BT_BLUEDROID_ENABLED
ble_npl_eventq_deinit(&g_eventq_dflt);
#endif
#endif
return ESP_OK;
}
Expand Down
4 changes: 3 additions & 1 deletion src/nimble/porting/npl/freertos/src/npl_os_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,11 +661,12 @@ static os_membuf_t *ble_freertos_mutex_buf = NULL;

static uint16_t ble_freertos_total_event_cnt = 0;

#if CONFIG_BT_BLUEDROID_ENABLED
int na_npl_freertos_mempool_init(void)
{
int rc = -1;
// These values taken from esp-idf: bt/nimble/porting/npl/freertos/src/npl_os_freertos.c
uint16_t ble_total_evt_count = 19;
uint16_t ble_total_evt_count = 80;
uint16_t ble_total_co_count = 8;
uint16_t ble_total_evtq_count = 3;
uint16_t ble_total_sem_count = 10;
Expand Down Expand Up @@ -816,5 +817,6 @@ na_npl_freertos_eventq_init(struct ble_npl_eventq *evq)
xQueueReset(eventq->q);
}
}
#endif /* CONFIG_BT_BLUEDROID_ENABLED */

#endif