Skip to content

Commit

Permalink
Make sure the default event queue is initialized.
Browse files Browse the repository at this point in the history
In IDF the event queue is initialized by the controller code.
We arent using that here since Arduino uses bluedroid and therefore is not initializing the queue.
  • Loading branch information
h2zero committed Mar 7, 2024
1 parent 5b20f4a commit aef5a34
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/nimble/porting/nimble/src/nimble_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,23 @@ esp_err_t esp_nimble_init(void)
ble_transport_init();
#if MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
ble_adv_list_init();
#endif
#endif
#endif // MYNEWT_VAL(BLE_QUEUE_CONG_CHECK)
#endif // CONFIG_BT_CONTROLLER_ENABLED
#endif // !SOC_ESP_NIMBLE_CONTROLLER || !CONFIG_BT_CONTROLLER_ENABLED

/* Initialize default event queue */
/* Included for Arduino since the default event queue is not initialized
* in the Arduino core when bludroid is used.
*/
ble_npl_eventq_init(&g_eventq_dflt);

#if !SOC_ESP_NIMBLE_CONTROLLER || !CONFIG_BT_CONTROLLER_ENABLED
/* Initialize the global memory pool */
os_mempool_module_init();
os_msys_init_();

#endif
#endif // !SOC_ESP_NIMBLE_CONTROLLER || !CONFIG_BT_CONTROLLER_ENABLED

/* Initialize the host */
ble_transport_hs_init();
#if CONFIG_BT_CONTROLLER_DISABLED && CONFIG_BT_NIMBLE_TRANSPORT_UART
Expand Down

0 comments on commit aef5a34

Please sign in to comment.