fix(ble): always init the default os queue for all of controllers

This commit is contained in:
ShenWeilong
2026-05-05 00:05:41 +08:00
committed by BLE BOT
parent d1894abdc1
commit b3409aa6e3
5 changed files with 6 additions and 55 deletions
+1 -14
View File
@@ -869,12 +869,6 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
goto free_mem;
}
#if CONFIG_BT_NIMBLE_ENABLED
/* ble_npl_eventq_init() needs to use npl functions in rom and
* must be called after esp_bt_controller_init().
*/
ble_npl_eventq_init(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
/* Enable BT-related clocks */
modem_clock_module_enable(PERIPH_BT_MODULE);
modem_clock_module_mac_reset(PERIPH_BT_MODULE);
@@ -959,9 +953,7 @@ modem_deint:
esp_phy_modem_deinit();
// modem_clock_deselect_lp_clock_source(PERIPH_BT_MODULE);
modem_clock_module_disable(PERIPH_BT_MODULE);
#if CONFIG_BT_NIMBLE_ENABLED
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
free_mem:
npl_freertos_mempool_deinit();
esp_unregister_npl_funcs();
@@ -993,11 +985,6 @@ esp_err_t esp_bt_controller_deinit(void)
esp_bt_controller_log_deinit();
#endif // CONFIG_BT_LE_CONTROLLER_LOG_ENABLED
#if CONFIG_BT_NIMBLE_ENABLED
/* De-initialize default event queue */
ble_npl_eventq_deinit(nimble_port_get_dflt_eventq());
#endif // CONFIG_BT_NIMBLE_ENABLED
esp_unregister_npl_funcs();
esp_unregister_ext_funcs();