mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Fix blufi crash caused by the break change
This commit is contained in:
@@ -109,7 +109,13 @@ void bleprph_host_task(void *param)
|
||||
|
||||
esp_err_t esp_blufi_host_init(void)
|
||||
{
|
||||
nimble_port_init();
|
||||
esp_err_t err;
|
||||
err = esp_nimble_init();
|
||||
if (err) {
|
||||
BLUFI_ERROR("%s failed: %s\n", __func__, esp_err_to_name(err));
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
/* Initialize the NimBLE host configuration. */
|
||||
ble_hs_cfg.reset_cb = blufi_on_reset;
|
||||
ble_hs_cfg.sync_cb = blufi_on_sync;
|
||||
@@ -146,7 +152,11 @@ esp_err_t esp_blufi_host_init(void)
|
||||
|
||||
esp_blufi_btc_init();
|
||||
|
||||
nimble_port_freertos_init(bleprph_host_task);
|
||||
err = esp_nimble_enable(bleprph_host_task);
|
||||
if (err) {
|
||||
BLUFI_ERROR("%s failed: %s\n", __func__, esp_err_to_name(err));
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user