mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-02 23:30:02 +00:00
fix(nimble): fix esp_hid_device example when static_to_dynamic enabled
This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user