fix(nimble): fix esp_hid_device example when static_to_dynamic enabled

This commit is contained in:
Astha Verma
2026-01-21 16:46:54 +05:30
parent bec112ac57
commit 039d2d62ed
2 changed files with 11 additions and 8 deletions
+4 -7
View File
@@ -153,6 +153,10 @@ esp_err_t esp_nimble_init(void)
#if MYNEWT_VAL(BLE_STATIC_TO_DYNAMIC)
/* Reset deinit flag at start of new init cycle */
ble_npl_reset_deinit_flag();
if (ble_npl_ensure_ctx()) {
return ESP_FAIL;
}
#endif
#if CONFIG_BT_CONTROLLER_DISABLED
@@ -303,13 +307,6 @@ nimble_port_init(void)
}
#endif
#if MYNEWT_VAL(BLE_STATIC_TO_DYNAMIC)
ret = ble_npl_ensure_ctx();
if (ret != ESP_OK) {
return ret;
}
#endif
ret = esp_nimble_init();
if (ret != ESP_OK) {