Skip to content

Use old freertos porting layer for all but new esp mcu's. #984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 1 addition & 8 deletions docs/Command_line_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,7 @@ Sets the core the NimBLE host stack will run on
`CONFIG_BT_NIMBLE_TASK_STACK_SIZE`

Set the task stack size for the NimBLE core.
- Default is 4096
<br/>

`CONFIG_NIMBLE_STACK_USE_MEM_POOLS`

Enable the use of memory pools for stack operations. This will use slightly more RAM but may provide more stability.

- Options: 0 or 1, default is disabled (0)
- Default is 4096
<br/>

### Extended advertising settings, For use with ESP32C3, ESP32S3, ESP32H2 ONLY!
Expand Down
4 changes: 4 additions & 0 deletions src/nimble/nimble/host/src/ble_hs.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,11 @@ ble_hs_enqueue_hci_event(uint8_t *hci_evt)
struct ble_npl_event *ev;

ev = os_memblock_get(&ble_hs_hci_ev_pool);
#if CONFIG_BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT
if (ev && ble_hs_evq->eventq) {
#else
if (ev && ble_hs_evq->q) {
#endif
memset (ev, 0, sizeof *ev);
ble_npl_event_init(ev, ble_hs_event_rx_hci_ev, hci_evt);
ble_npl_eventq_put(ble_hs_evq, ev);
Expand Down
30 changes: 0 additions & 30 deletions src/nimble/porting/nimble/src/nimble_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,30 +93,6 @@ esp_err_t esp_nimble_init(void)
esp_err_t ret;
#endif
#if !SOC_ESP_NIMBLE_CONTROLLER || !CONFIG_BT_CONTROLLER_ENABLED
/* Initialize the function pointers for OS porting */
npl_freertos_funcs_init();

npl_freertos_mempool_init();

#if false // Arduino disable
#if CONFIG_BT_CONTROLLER_ENABLED
if(esp_nimble_hci_init() != ESP_OK) {
ESP_LOGE(NIMBLE_PORT_LOG_TAG, "hci inits failed\n");
return ESP_FAIL;
}
#else
ret = ble_buf_alloc();
if (ret != ESP_OK) {
ble_buf_free();
return ESP_FAIL;
}
ble_transport_init();
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
ble_adv_list_init();
#endif
#endif
#endif // Arduino disable

/* Initialize default event queue */
ble_npl_eventq_init(&g_eventq_dflt);
/* Initialize the global memory pool */
Expand Down Expand Up @@ -162,9 +138,6 @@ esp_err_t esp_nimble_deinit(void)
ble_npl_eventq_deinit(&g_eventq_dflt);
#endif
ble_hs_deinit();
#if !SOC_ESP_NIMBLE_CONTROLLER || !CONFIG_BT_CONTROLLER_ENABLED
npl_freertos_funcs_deinit();
#endif

ble_transport_ll_deinit();
return ESP_OK;
Expand Down Expand Up @@ -345,9 +318,6 @@ nimble_port_get_dflt_eventq(void)
void
nimble_port_init(void)
{
npl_freertos_funcs_init();
npl_freertos_mempool_init();

/* Initialize default event queue */
ble_npl_eventq_init(&g_eventq_dflt);
/* Initialize the global memory pool */
Expand Down
Loading